-
AS3 Multiple Objects of name 'X' do task on clickEvent
Multiple Objects of name 'X' do task on clickEvent
I have a number of dynamically created MC's (buttons)
I would like that if one were clicked that ALL of them would do an action.
public function clickEvent(e:MouseEvent):void
{
if(strTitle=="Portal Test"){
// all Objects named Section do task
}else{
var objPage:MovieClip = new standardPage(stage);
objPage.x=stageRef.width/2;
objPage.y=200;
stage.addChild(objPage);
objPage.init(0,0,"");
}
}
My first instinct was a global variable (but) obviously a bad idea as its apparently... difficult to do
There must be a way.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|