Hi,
I got stuck at the moment and don’t know how to solve the following issue:
I have my main swf (“index.swf”) and loaded another swf as a submenu (“submenu.swf”) into it.
I want to click on one of the thumbnails within submenu, unload the swf (“submenu.swf”) and want to go back to the mainSwf and call a certain frame(“frameTest”).
index.swf->submenu.swf->click btn:
unload: submenu.swf
goto: index.swf->“frame”
It does go back to the mainSwf but just won’t stop at the named frame(“f05_work”)!
Does it have anything to do with the Depth?
Does anybody have an idea what the code is for the thumbnail button within the swf(submenu)?
btAd1.onRelease = function():Void{
loadMovieNum(“index.swf”,0);
this._parent.unloadMovieNum(“submenu.swf”,1);
if (getBytesLoaded(“index.swf”)){
this.stop(“frame”);
}
}
Thanks.
this is the MC you are in,
so if you say this within a movie you are unloading, this is being destroyed
you would have to use _root
or this._parent
[quote=randomagain;2329026]this is the MC you are in,
so if you say this within a movie you are unloading, this is being destroyed
you would have to use _root
or this._parent[/quote]
Thanks first of all for your response.
It doesn’t do anything different. I am unloading the submenu.swf and not the index.swf.
It starts playing the index.swf but won’t jump to the particular frame??!
Is there anything else I can do?
cheers
I am a bit curious as to why you are using this.stop(“frame”) instead of this.gotoAndStop(“frame”)
I tried it with gotoAndStop but it doesn’t work.
I’ll say it once I’ll say it again, timeline and AS do not mix
you will have to put all your pages on one frame, then tell every page or segment to ._visible = false, and the one you want to ._visible = true
I don’t understand why you are unloading and loading movies here there and everywhere either
also unless I am incorrect it looks like you are telling to load and go to a frame, which will not work
[quote=randomagain;2329549]I’ll say it once I’ll say it again, timeline and AS do not mix
you will have to put all your pages on one frame, then tell every page or segment to ._visible = false, and the one you want to ._visible = true
I don’t understand why you are unloading and loading movies here there and everywhere either
also unless I am incorrect it looks like you are telling to load and go to a frame, which will not work[/quote]
What do you mean, when you say timeline and AS do not mix? That really does not make any sense. Also unloading and loading of Swfs is typical when file size and load time is a concern and should be used whenever appropriate.
Putting all assets on one frame is bad practice not only for coding and editing, but also for load times and user experience.
[quote=mcMoving;2329005]Hi,
I got stuck at the moment and don’t know how to solve the following issue:
I have my main swf (“index.swf”) and loaded another swf as a submenu (“submenu.swf”) into it.
I want to click on one of the thumbnails within submenu, unload the swf (“submenu.swf”) and want to go back to the mainSwf and call a certain frame(“frameTest”).
index.swf->submenu.swf->click btn:
unload: submenu.swf
goto: index.swf->“frame”
It does go back to the mainSwf but just won’t stop at the named frame(“f05_work”)!
Does it have anything to do with the Depth?
Does anybody have an idea what the code is for the thumbnail button within the swf(submenu)?
btAd1.onRelease = function():Void{
loadMovieNum(“index.swf”,0);
this._parent.unloadMovieNum(“submenu.swf”,1);
if (getBytesLoaded(“index.swf”)){
this.stop(“frame”);
}
}
Thanks.[/quote]
If you can post your file I will take a look and fix and comment what I did for you.
I got the answer.I actually got rid of everything and just put in the following code:
btAd1.onRelease = function():Void{
_parent._parent._parent.gotoAndStop(“frame”);
}
This code is enough as the submenu.swf is loaded into a container within the index.swf anyway. So now it stops at the “frame” on the main timeline.
But now I have another question, hope this doesn’t bother you guys!
On the “frame” is a movieclip called mcClip.
After I called “frame” (main timeline) I’d like to play mcClip and stop at “frame20”.
(It’s important that I call the “frame20” as another button will call “frame30”.)
I thought the code would look like this but it doesn’t work!:
btAd1.onRelease = function():Void{
_parent._parent._parent.gotoAndStop(“frame”);
if(onEnterFrame(“frame”)){
mcClip.gotoAndStop(“frame20”);
}
}
any ideas?