Targeting a label deep inside other MCs
Using MX2004 Pro.
Can someone either tell me what I'm doing wrong, or point me to a thread?
I have the following setup:
_root.scrollPaneInstance.containerMC.contentMCInst ance
I want to target a specific frame in contentMC by pressing a button on the main timeline.
My button on the main timeline has the following code:
Code:
on(release){
gotoAndPlay("_root.scrollPaneInstance.containerMC.contentMCInstance.frameLabel)");
}
How do you enter a long path when the correct usage for gotoAndPlay is gotoAndPlay(framenumber) or gotoAndPlay("framelabel") ?
I've searched the board and found similar things but nothing seems to be working.
TIA.
Neumy
Senior Member
if that is your correct path:
code:
on(release){
_root.scrollPaneInstance.containerMC.contentMCInst ance.gotoAndPlay("frame label")//but put your frame label in there not "frame label"
}
Thanks for the quick resonse.
First off, I messed up in that I was trying to put the path INSIDE my gotoAndPlay(). Doh!
I tried your code, and several variations of the path, but still can't seem to make it work.
Would you be willing to look at my FLA?
If so, Go to frame 10 in the main timeline. The dummy button in the lower left of the main timeline should cause the movie inside the right scrollpane to jump to a different frame (you'll be able to tell by the date changing).
Thanks.
Neumy
Attached Files
Last edited by Neumy; 05-26-2004 at 11:43 PM .
Senior Member
hhmmm...I've never used components...but it seems like you can't assign an instance name to the stuff you load into your scrollpane so I have no idea how you could target it...sorry, maybe someone with component experience can help..
Adam
Thanks for looking.
Anybody else?
disMemberEd
To target the movie clip loaded into a component you usually use "content". So in your example, the path would be something like:
_root.scrollPaneInstance.content .gotoAndPlay(framenumberOrLabel);
if you want to control the movieclip contained in the scroll pane.
Cheers!
"On a long enough timeline, the survival rate drops to zero."
"The Flash timeline is long enough."
Skorp|oN,
I've actually got one more level down that I have to go:
_root.scrollPaneInstance.containerMC.contentMCInst ance
Does content have to be the last part of the path before the method?
Example:
_root.scrollPaneInstance.containerMC.content .gotoAndPlay(framenumberOrLabel); where "content" replaces containerMC in the path
OR
_root.scrollPaneInstance.content .contentMCInstance.gotoAndPlay(framenumberOrLabel) ; where content replaces contentMCInstance in the path
Looking at my FLA may make more sense if I don't.
Thanks for your help.
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