bonder
December 3rd, 2009, 02:33 PM
Okay, So i have a gallery on my root timeline
The gallery is called work_mc. Inside of work_mc I have various buttons. There is a different section on different frames. For example, ALL is on frame one, PRINT is on frame two, motion is on frame three.
In the root here is the code:
Code:
work_mc.urbanthmb_mc.addEventListener(MouseEvent.C LICK, clickHandler);
work_mc.urbanthmb_mc.buttonMode = true;
function clickHandler(event:MouseEvent):void {
if (!workss_mc) {
workss_mc = new mc_workss();
workss_mc.addEventListener("closeButtonClick", onCloseClick);
workss_mc.x = 225;
workss_mc.y = 200;
}
work_mc.gotoAndStop("urbanflats");
addChild(workss_mc);
removeChild(work_mc);
}
function onCloseClick(e:Event):void {
trace("clickedtrue");
if (!work_mc) {
work_mc = new mc_work();
work_mc.x = 225;
work_mc.y = 200;
}
removeChild(workss_mc);
addChild(work_mc);
}
This is targeting the buttons that are on frame 1. How do I get to the buttons that are on frame 3? I tried just using the movieclip names but this doesnt seem to work?
http://www.actionscript.org/forums/images/statusicon/user_online.gif http://www.actionscript.org/forums/images/buttons/quote.gif (http://www.actionscript.org/forums/newreply.php3?do=newreply&p=947842)
The gallery is called work_mc. Inside of work_mc I have various buttons. There is a different section on different frames. For example, ALL is on frame one, PRINT is on frame two, motion is on frame three.
In the root here is the code:
Code:
work_mc.urbanthmb_mc.addEventListener(MouseEvent.C LICK, clickHandler);
work_mc.urbanthmb_mc.buttonMode = true;
function clickHandler(event:MouseEvent):void {
if (!workss_mc) {
workss_mc = new mc_workss();
workss_mc.addEventListener("closeButtonClick", onCloseClick);
workss_mc.x = 225;
workss_mc.y = 200;
}
work_mc.gotoAndStop("urbanflats");
addChild(workss_mc);
removeChild(work_mc);
}
function onCloseClick(e:Event):void {
trace("clickedtrue");
if (!work_mc) {
work_mc = new mc_work();
work_mc.x = 225;
work_mc.y = 200;
}
removeChild(workss_mc);
addChild(work_mc);
}
This is targeting the buttons that are on frame 1. How do I get to the buttons that are on frame 3? I tried just using the movieclip names but this doesnt seem to work?
http://www.actionscript.org/forums/images/statusicon/user_online.gif http://www.actionscript.org/forums/images/buttons/quote.gif (http://www.actionscript.org/forums/newreply.php3?do=newreply&p=947842)