This content has been marked as final. Show 4 replies
I think what you are looking for is makeScriptedSprite()
if you're using director mx2004 then check out the method: makeScriptedSprite() in the help. That will allow you to create new sprites on-the-fly to which you can attach your behaviors for snapping to a grid, etc.
How do you go about inserting that into the script. i am a novice at this and to be honist dont realy have a clue about how to insert and what other peramiters it will need. at the moment the sprite is draggable which is what i want but as stated before when its dragged out from the left hand side it actualy drags the sprite so the user can't get anymore sprites that are of that type.(example they may want more than one window per wall) .
For instance, if sprite(20) is empty then at runtime you can...
This makes a sprite instance of the cast member myButton in sprite channel 20 at the location 100,200.
You can then add a Behavior from the cast by using...