something block
i attachmovie on button movie clip(z) visible on position (300,300). if there on (300,300), movie clip(z) has go somewhere else (300,400). script follow:
if (something._x==300&&something._y==300){z._x=300;z._y=400;}
my problem: substitute "something". "something" can movie clip/text/graphic/button & etc ?
i think need loop through. syntax says still use as2, let me write code out.
// code begins
for(a in _root){ // if inside movieclip may need change "_root" accordingly
if(_root[a]._x==300 && _root[a]._y==300){
z._x=300;
z._y=400;
}
}
//code ends
hope helps.
best of luck
More discussions in Adobe Animate CC - General
adobe
Comments
Post a Comment