i load some swf in the main file from an array and its working well. and i need to add next and previous button for loading other swf’s.i add next and previous buttons and next button is working fine, it stop after loading last swf and stop tracing and all.but previous buttons is not working fine. it is keep clickable and keep tracing values in minus and going backward.any help will be honorable thank you my code is herei did not wrote my loading script because i only need to know about previous buttonthank youvar myMovies:Array=[“panel 1.swf”, “panel 2.swf”, “panel 3.swf”, “panel 4.swf”, “panel 5.swf”, “panel 6.swf”, “panel 7.swf”, “panel 8.swf”];var index:int=0;var numberOfPages:Number = 1;panel_control.text = “01”;next_mc.addEventListener(MouseEvent.CLICK, next_movieclip); pre_mc.addEventListener(MouseEvent.CLICK, privious_movieclip); function next_movieclip(e:MouseEvent){if(numberOfPages < myMovies.length - 0){ numberOfPages++; panel_control.text = “0”+ numberOfPages ; index = (index + 1)%(myMovies.length); loader.unloadAndStop(); trace(numberOfPages); loadSWF(); }}function privious_movieclip(e:MouseEvent){ if(numberOfPages < myMovies.length + 8){ numberOfPages–; panel_control.text = “0”+ numberOfPages ; index = (index - 1)%(myMovies.length); loader.unloadAndStop(); trace(numberOfPages); loadSWF(); }}
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
as3 - external swf array - next & prev button | 0 | 140 | September 14, 2010 | |
Need help with an array and external swf's
|
0 | 73 | February 28, 2009 | |
Messing up with some slideshow scripts | 0 | 105 | May 19, 2009 | |
Loading swfs
|
0 | 115 | October 11, 2011 | |
Unloading external swf
|
0 | 49 | November 17, 2008 |