View Full Version : How to unload movie on root from child?
JamesO
January 25th, 2005, 05:54 PM
I'm loading a movie in externally. The external movie has a button to unload itself from the main movie. It loads into _root.calContainer. The button is called xButton. This is the script that's not working:
_this.xButton.onRelease = function() {
_global.calContainer.unloadMovie;
}
I've also tried. _root.calContainer to no avail.
scotty
January 26th, 2005, 06:29 AM
xButton.onRelease = function() {
this._parent.unloadMovie;
}
?
scotty(-:
JamesO
January 26th, 2005, 01:26 PM
Unfortunately that doesn't work. This one's really bugging me... aslandrums.com/yosemite is my mockup so far. If you click the calendar button, you'll see what I'm trying to do. The calendar loads in, and I'd like to unload it when you click the x.
scotty
January 26th, 2005, 01:54 PM
There was a typo in my previous post
xButton.onRelease = function() {
this._parent.unloadMovie();
}
should work if xButton is in the maintimeline of the swf you're loading...
scotty(-:
JamesO
January 26th, 2005, 04:37 PM
It still doesn't. I appreciate the help, bro.
scotty
January 26th, 2005, 04:42 PM
Can you post the fla with the button?
scotty(-:
scotty
January 27th, 2005, 06:31 AM
There were a few things wrong:)
You had the code on the button i/o the frame.
The instance name of the button is xbutton i/o xButton.
And the code I gave should have worked if the button was in the maintimeline, but it is in the calender mc...
So, if you put this on a frame in the calender mc, it works:)
xbutton.onRelease = function() {
this._parent._parent.unloadMovie();
};
scotty(-:
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.