View Full Version : next and previous button cannot work well
karena
June 25th, 2004, 12:57 AM
my program is i can choose several movie to load and the movies are save in an array...
For example:
i choose movie 1 , 2 and 3.
Movie 1 was loaded. After i click 'next 'button, movie 2 will be show .Beside that,if i click 'previous' button, movie 1 will be show.
i facing a problem that my previous button is not back to my previous loaded movie but is trace my choices in arrays backward.
The next problem is, my first movie load to the second movie load will be a bit lagging. but the rest 1 is ok....
i can't solve this problem..please help....
rudester
June 25th, 2004, 02:07 AM
Do you have a on(release) action on a button? Are you loading swfs or are you simply moving from frame to frame?
rudester
June 25th, 2004, 02:39 AM
I suggest using the loadMovieNum method.
//this is for your button action
on(release){
loadMovieNum(movie1.swf, 0)
}
//for your replacement of swf's simply replace it within its own level
on(release){
loadMovieNum(movie2.swf, 0)
}
scotty
June 25th, 2004, 03:55 AM
You need a variable which defines what the current movie is.
Try the attached:)
scotty(-:
karena
June 25th, 2004, 04:23 AM
thankx scotty......u really help me in solving my problem...
but i have a nother question.....
Let's say i choose movie 1 ,2 and 3....the these 3 movies will load in a movie clip.For the mean while, i want my three choices will show in text like 'movie 1' ,'movie 2' and 'movie 3' are also showing below the movie clip that load movie while the three movie are loading.
How can i do that?
scotty
June 25th, 2004, 05:55 AM
You can use the same array for that.
If movies_array[curr] returns movie1.swf, you can split that string:
ch = moviesToShow_array[curr].split(".");
this returns a new array ch:
[movie1,swf]
so now you can say:
info.text = ch[0];
//returns movie1
scotty(-:
karena
June 25th, 2004, 06:10 AM
scotty...
er..what i mean is i want all my choices are show in text no matter which movie is loading....
scotty
June 25th, 2004, 08:08 AM
Ehm, I should read more carefully:stunned:
Put this in frame 2:
contents.loadMovie(moviesToShow_array[curr]);
for (i=0; i<moviesToShow_array.length; i++) {
this["ch"+i] = moviesToShow_array[i].split(".");
output.text += this["ch"+i][0]+" ";
}
stop();
scotty(-:
karena
June 25th, 2004, 12:03 PM
thankx scotty...
really thankx and ur help i really appreciate.....
scotty
June 25th, 2004, 03:38 PM
=)
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.