|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Pre-loader Problems loading external SWF's
Please could anyone help. I have created an interface which loads an external SWF into a window on the click of a button. The movie being loaded is quite big so I put a pre-loader on the beginning of it.
At first it loaded ok, the pre-loader appeared and the percentage counted up with the loading bar. For some reason now When I click on the button to load the external SWF there is a big pause and then I get the following message. "The script in this movie is causing Macromedia Flash Player 7 to run slowly. If it continues to run, your computer may become unresponsive. Do you want to abort the script?" I have un-installed and then re-installed Flash Player 7 with no joy. Any ideas?? the script in my pre-loader is as follows: frame1 bytes_loaded = Math.round(this.getBytesLoaded()); bytes_total = Math.round(this.getBytesTotal()); getPercent = bytes_loaded/bytes_total; this.loadBar._width = getPercent*100; this.loadText = Math.round(getPercent*100)+"%"; if (bytes_loaded == bytes_total) { this.gotoAndPlay(3); }1 frame2 this.gotoAndPlay(1);1 frame3 gotoAndPlay("Scene02", 1); |
|
#2
|
|||
|
|||
|
frame1
bytes_loaded = Math.round(this.getBytesLoaded()); bytes_total = Math.round(this.getBytesTotal()); getPercent = bytes_loaded/bytes_total; loadBar._width = getPercent*100; loadText = Math.round(getPercent*100)+"%"; if (bytes_loaded == bytes_total) { gotoAndStop(3); } frame2 gotoAndPlay(1); frame3 gotoAndPlay("Scene02", 1); you had a 1 after the first if statement, typo maybe...same after frame2's gotoandPlay. The error you get normally happens when you do something like have a while loop that never ends or a for loop that never terminates. anything like that in there? because your using round it could be that the two values are never identicle in your first if statement. you could try something like: if(bytes_loaded > bytes_total - 25){} just hack a value you reckon is right off. could be dead low like 0.5, 1 etc. trial n error. -Tann |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Pre-loader Problems loading external SWF's |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|