rpadua
asked on
_level3.gotoAndPlay(11);
I have main.swf with lots of buttons wich loads different swfs at the same level. to be more eye candy, i've placed a "rollout" effect in every movie that is going to be loaded, begining on frame 11. that rollout effect should take place everytime the user select a different movie from wich is beeing shown. i hope you understand, my english is lousy.
so every button has the following action (and it works):
on (rollOver) {
_level3.gotoAndPlay(11);
}
on (release) {
if (_framesloaded >= _totalframes) {
loadMovieNum("newmovie.swf ",3);
}
}
It works but it's a bit weird, so i'd like the both actions take place " on (release) ". Bu when i do this:
on (release) {
_level3.gotoAndPlay(11);
loadMovieNum("newmovie.swf ",3);
}
this -> _level3.gotoAndPlay(11); -> doesn't happen. it skips that part and doesn't give me any error mesage.
How could i make this both things work under "on release"?
Thanks.
so every button has the following action (and it works):
on (rollOver) {
_level3.gotoAndPlay(11);
}
on (release) {
if (_framesloaded >= _totalframes) {
loadMovieNum("newmovie.swf
}
}
It works but it's a bit weird, so i'd like the both actions take place " on (release) ". Bu when i do this:
on (release) {
_level3.gotoAndPlay(11);
loadMovieNum("newmovie.swf
}
this -> _level3.gotoAndPlay(11); -> doesn't happen. it skips that part and doesn't give me any error mesage.
How could i make this both things work under "on release"?
Thanks.
Hi,
fix to your problem is here:
1.
copy following code on last frame where rollOut effect finishes..
---------
loadMovieNum(_level3.nextS WF,3);
--------
2.
add following code on button release
--------
on (release) {
if (_framesloaded >= _totalframes) {
_level3.nextSWF = "newmovie.swf";
_level3.gotoAndPlay(11);
}
}
----------
you are done...
Rgds
Aneesh
fix to your problem is here:
1.
copy following code on last frame where rollOut effect finishes..
---------
loadMovieNum(_level3.nextS
--------
2.
add following code on button release
--------
on (release) {
if (_framesloaded >= _totalframes) {
_level3.nextSWF = "newmovie.swf";
_level3.gotoAndPlay(11);
}
}
----------
you are done...
Rgds
Aneesh
ASKER
none of the comments worked :\
comments should work....
it depends that if you have implemented it right way...
ok ignore my previous comments...
here is another approach, which should be simpler to implement:
----------
just put following code on button release
---------
on (release) {
_root.nextSWF = "newmovie.swf";
_level3.gotoAndPlay(11);
_root.onEnterFrame = function()
{
if (_level3._currentframe == _level3._totalframes)
{
loadMovieNum(_root.nextSWF , 3);
delete _root.onEnterFrame;
}
};
}
-----------
Rgds
Aneesh
it depends that if you have implemented it right way...
ok ignore my previous comments...
here is another approach, which should be simpler to implement:
----------
just put following code on button release
---------
on (release) {
_root.nextSWF = "newmovie.swf";
_level3.gotoAndPlay(11);
_root.onEnterFrame = function()
{
if (_level3._currentframe == _level3._totalframes)
{
loadMovieNum(_root.nextSWF
delete _root.onEnterFrame;
}
};
}
-----------
Rgds
Aneesh
ASKER
you're not understanding.
BEFORE the button load a new movie, it should play the movie that is stoped on screen, since frame 11, and then, load the new movie.
and i can't just add the loadmovie action at the last frame when rollout finishes because, i donno wich movie the user wants to load after that one.
hope this will help...
BEFORE the button load a new movie, it should play the movie that is stoped on screen, since frame 11, and then, load the new movie.
and i can't just add the loadmovie action at the last frame when rollout finishes because, i donno wich movie the user wants to load after that one.
hope this will help...
Dear,
you are not understanding the provided code..
the action "loadMove" on last frame is actually loading the swf which is being received dynamically on button click..
if you will notice... in place of swf name a vriable is passed, which will hold the name of swf..
and button click update this variable with the swf name, and plays the rollout animation, when it reaches the end, it loads the swf which has been passed as variables....
if still not clear, i would request please upload all related source, I will do it for you...
you are not understanding the provided code..
the action "loadMove" on last frame is actually loading the swf which is being received dynamically on button click..
if you will notice... in place of swf name a vriable is passed, which will hold the name of swf..
and button click update this variable with the swf name, and plays the rollout animation, when it reaches the end, it loads the swf which has been passed as variables....
if still not clear, i would request please upload all related source, I will do it for you...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if you're going to check for frames loaded and include them in a runtime effect, I would suggest preloading everything first. It is very possible that your button is not doing anything because the condition is false. You can test that within your if statement by just adding some traces.
if (_framesloaded >= _totalframes) {
trace("true");
loadMovieNum("newmovie.swf
}else{
trace("false");
}
that will tell you if its even loaded. If you're getting false, then it would be best to just preload your assets so the user is not left waiting for a response. Does that make sense?