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 | 142 | September 14, 2010 | |
Next and previous button cannot work well
|
0 | 87 | June 25, 2004 | |
Next and previous button cannot work well
|
0 | 70 | June 25, 2004 | |
External Swf randomly loading | 0 | 45 | April 17, 2008 | |
Loading swfs
|
0 | 133 | October 11, 2011 |