Main Content
Linking
Linking enables Actionscript and Flash to use elements in the Library without them being 'in play' beforehand. This is particularly useful when you may or may not need an element, as in the case of:
- Sounds (non background) eg. Gunshots
- attachMovieClip() > (AS2) creating a Movie Clip from a library definition rather than using one already existing in the frame. This is a pretty advanced function, so you will probably not need it.
- Displaying virtually anything in AS3
To make a library element ready to be accessed in Actionscript, make sure the library panel is open. Then, right click on the item you want to link. Depending on the version of Flash you use, you should get a menu looking something like this:
As you can see, the option you need to select is called "Linkage...". Click on it will bring up a slightly intimidating dialog(ue) box that looks a bit like the one picture below this tutorial, also depending on your version of Flash.
For most purposes in AS2 and for lots of purposes in AS3 the only thing you need to do is type in a name and tick the "Export for ActionScript" checkbox. This may be AS2.0 or AS3.0 - just tick it. Further information on the other components is in the tutorials that require it.
This makes the object/symbol able to be referenced. There you go! you now know how to link a symbol.
Harry.
Comments