Groups | Blog | Home
all groups > flash actionscript > january 2005 >

flash actionscript : Loading movie forward and back


+NSurveyor
1/17/2005 7:54:25 AM
barn wrote the code so that it would go back to the first movie. What do you
want to happen? Have the button stop functioning after there are no more
movies?

on (press) {
if(nMovieCounter<arMovies.length
_root.mcMovie.loadMovie(arMovies[(nMovieCounter++)]);
}else{
this.enabled = false;
}
}

--
NSurvervor
- |\|5(_)|2\/3\|/()|2 -

(Using Newsgroup, because web-based Forums are 'under maintainence')
[quoted text, click to view]

dahaus
1/17/2005 8:13:39 AM
Hi all,
i need help. I want load a multiple movies (test1.swf, test2.swf, etc...)
into the stage.

i use this script i found !!!

_global.arMovies = new Array
("test1.swf","test2.swf","test3.swf","test4.swf","test5.swf","test6.swf");
_global.nMovieCounter = 0;
mcMovie.loadMovie(arMovies[nMovieCounter++]);

and then i use action for next button
on(press){
_root.mcMovie.loadMovie(arMovies[nMovieCounter++]);
}


but it does not function properly, when i click 7-times it happens nothing.

I need setup a maximum count and minimun count for better work.

Any Idea how it makes ?

I need load movies forward and backward dynamicaly.

Thanks, and sorry for my english :-):confused;
barn
1/17/2005 9:15:20 AM
You might consider this for the button action:


on (press) {
_root.mcMovie.loadMovie(arMovies[(nMovieCounter++)%arMovies.length]);
dahaus
1/17/2005 9:42:26 AM
Thanks, but it does not work.
When i press button more than the count of Array. When i press button again i start from first movie :-(

it is a better way how it makes,
Byron Canfield
1/17/2005 11:07:52 AM

[quoted text, click to view]
again i start from first movie :-(
I think you need to better defined your specification, then, because we
could go on citing ways of doing things from now until the cows came home
and still not correctly guess what you're trying to do.


--
--------
Reality will not be altered to comply with preconceived notions.

Byron "Barn" Canfield

AddThis Social Bookmark Button