EragonZZZZ -> RE: Flash Q&A thread 3 (2/28/2007 18:16:05)
|
If you mean create them at runtime, then yes. 1. Draw your thingy and convert it to a symbol (select > press F8) 2. Right click the symbol in the Library and select Linkage 3. Check the box, "Export for Actionscript". It's okay if other boxes check too, but you don't need to. 4. The "Instance Name" field is how you will refer to it in your code. Change it as desired. 5. On the first frame of the timeline, type this code: Target.attachMovie("MovieName", "InstanceName", Depth, {_x:0,_y:0}) What this does: Target: The movie clip (or _root) that you wish to attach the movie to. -Movie Name: Quotes required unless a variable. The "Instance name" (remember, whatever you changed it to) of the clip you want to attach -Instance Name: Quotes required if not a variable. The new name of the movie clip you will attach (what you will refer to it as later on in code) Can be anything. -Depth: Depth for the new movie clip. -_x,_y: Optional. Position for new clip. Default is the upper right corner of Target Hope this helped!
|
|
|
|