Learning ActionScript
- Started
- Last post
- 3 Responses
- lw-d
Hi all,
I am learning ActionScript right now. I have taken a site I have built previously for a client and I am trying to rebuild it using AS to control dynamic features.
One thing I have learnt so far is that to control symbols using AS you need to give these symbols an instance name. My question is this, does the symbol have to be on the canvas/timeline before you can give it an instance name?
Thanks
- lw-d0
Linkage panel maybe?
- blaw0
you can used 'createEmptyMovieClip' to dynamically create, name and place an empty movieclip.
then use 'attachMovie' to attach a movie linked from your library.
- lw-d0
Instead of creating an empty movie to load into, I set the dimensions using actionscript:
// this creates a variable to hold the home navigation mc
var nav_home:MovieClip;
// attach the home navigation mc to the timeline
nav_home = this.attachMovie("nav_home", "nav_home_mc","1",{_x:25, _y:108.8});Not sure if this is the best way of doing it?