|
-
Button inside movie clip inside scrollpane doesn't work in xml
This is sorta odd but I'm hoping somewhat easy to fix. This is in AS2 and is the last problem I have in a very small project of mine.
I have button called button01 inside a movieclip called movieclip01 which is the contentPath for a scrollpane called scrollpane01. I'd like the button to work, and depending on the code it will work in the normal .swf but won't when I embed my movie into xml.
If I put the code inside movieclip01
button01.onRelease=function(){
_root.gotoAndPlay("Frame Name");
}
It will work when I test it but not in the XML. So what I want to do is go to the main timeline where the scrollpane is and write the code there. That is where I'm stuck.
I've tried scrollpane01.movieclip01.button01 and tried movieclip01.button01 and also tried scrollpane01.button01. Just for giggles I also tried scrollpane01.movieclip01 but none of that works
Last night I had a similar problem with buttons inside a movieclip that was on the root stage. They worked in the swf but not when I embedded the file - so I found this which worked (typed in the root stage)
movieclip01.button01.onRelease=function(){
-
Look into using the lockroot function, should resolve it. I have no idea what you mean by "embed your file into XML"? Can you be more clear on that.. are you embedding it into another swf file or what exactly are you doing?
-
Don't know why I didn't think of that...and it made perfect sense too.
I kinda advertised this wrong though. I have an XML file which loads a swf file which loads my swf file. The problem was the lockroot..I set it to true and all seems to be well now I still have a couple more tests to do but am feeling good about this one.
Thanks!
-
Cool, glad I could 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
|