Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Preloader

Posted on 2003-03-04
5
Medium Priority
?
257 Views
Last Modified: 2010-04-03
I have this code for my preloader:
stop();
myInterval = setInterval(preloader,10);
function preloader() {
    if (_framesloaded>=_totalframes) {
        play();
        clearInterval();
    }
    progressBar._xscale=(_framesloaded/_totalframes)*100;
}
Probleme: My site is devided within few scenes. With  stop() actions inside. I named my progress bar ect,,, (this script worked before on a simple movie) But now all the stop() don't work anymore. The movie plays as there is no stop() at all!? I don't know what to do anymore.
0
Comment
Question by:bluewestern
  • 2
  • 2
5 Comments
 
LVL 5

Expert Comment

by:elhy
ID: 8070012
i think the mistake lies here if this is what u wrote for your preloader.

change clearInterval(); to clearInterval(myInterval);

0
 
LVL 9

Accepted Solution

by:
rexmor earned 150 total points
ID: 8070317
See to it that the preloader() function was not called after it loaded... because that function has "play()" command... There's should be a problem especially when the function was called during the enterframe. The preloader function should only called during the preload time, and put a stop on every scene when ever you want to stop.

regards,

rex
0
 

Author Comment

by:bluewestern
ID: 8075907
I thought actions were indepandant of the layer. I put my script in the same layer of the preloader and it works. Well, kind of... Only if I include my movie in an html page... Is that normal???
0
 
LVL 5

Expert Comment

by:elhy
ID: 8077274
sorry, i'm not following. are you referring to rexmor comment or mine?

if you do not mind, you can send me your fla file to take a look.

eunice@sgweb.net
0
 

Author Comment

by:bluewestern
ID: 8112450
It's ok. I solve my pb. Rexmor was right.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to how to record live broadcast.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question