How to load an object from library by clicking on a button?
how can load , unload object ( picture ) our library clicking on button , unload clicking on other button using as2.
thanks help
assign button instance name (eg, btn) , assign library object linkage id - right click library symbol>click properties>tick export actionscript>assign linkage id (eg, mc_id) , click ok. use:
var tl:movieclip=this;
btn.onrelease=function(){
tl.attachmovie("mc_id","mc",tl.getnexthighestdepth());
}
// remove, mc.removemovieclip();
More discussions in ActionScript 1 and 2
adobe
Comments
Post a Comment