How would I use innheritance? One thing I miss very much from Actionscript 3 , Is that doing this is as simple as:
var rHolder:Array = new Array();
for(var i:int=0;i<10;i++){
rHolder.push( new Object() );
rHolder[i].data= "my data goes here";
rHolder[i].info = "my info";
rHolder[i].movieClip = new card(); // card here being the movieClip class // new on AS3
}
var rHolder:Array = new Array();
for(var i:int=0;i<10;i++){
rHolder.push( new Object() );
rHolder[i].data= "my data goes here";
rHolder[i].info = "my info";
rHolder[i].movieClip = new card(); // card here being the movieClip class // new on AS3
}
To copy to clipboard, switch view to plain text mode
Is there a way I can simulate that?
Another option is maybe to create a array with the info in order that the GraphicsItem's are being made:
new array;
for(...)
array[i] = " QGraphicsItem just created data";
new array;
for(...)
create QGraphicsItem;
array[i] = " QGraphicsItem just created data";
To copy to clipboard, switch view to plain text mode
Then:
int num = this items number in order of creation;
myFunction( array[num]);
}
When QGraphicsItem is double clicked{
int num = this items number in order of creation;
myFunction( array[num]);
}
To copy to clipboard, switch view to plain text mode
I dont know...
Bookmarks