Hi guys,
i can't get my head arroud my problem, because i want to have multiple blocks moving over my stage, but i want use just the one mc in the libary and my function, what adds a new block with random color, alpha and speed.
I think, that i have to use addChild();, but i have no idea how to use it properly.
To make it a easier i attached my file and i appreciate any help!!!
problem: same tween multiple times on...First you need to designate the object in the library as an item that can be loaded dynamically.
Right click on it in the library and select Linkage from the menu that appears. In the interface that appears, select Export for Actionscript. A Class name will automatically be assigned, which you can change as you like (lets just say you name it MyObject). This is the name you will use to call in the item from the library.
When you click OK to close that interface, it will come up with an indication saying it can't find the class so it will create one at complie time... click OK there to.?You're done preparing the object in the library.
To add the item to the stage, treat it like any other new object instance:
var newObject:MyObject = new MyObject();
newObject.x = .... etc...
this.addChild(newObject);
Thanks Ned Murphy,
i totaly forgot that, but i got it working now.
Cheers
You're welcome
No comments:
Post a Comment