Preload issue

I have a preloader script that loads a SWF file presentation.
The preloader works, but it starts playing the SWF prematurely when
it reaches 8%. You can see an example here:
www.lemieux-design.net/ips/ips_preload.html
Example
Here's the code I'm using:
preloader_mc.stop();
preloader_mc.visible = false;
var swf:String = "test.swf";
var myURL:URLRequest = new URLRequest(swf);
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.OPEN,
initialize);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,
inProgress);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
completed);
loader.load(myURL);
function initialize(e:Event):void {
preloader_mc.visible = true;
function inProgress(e:ProgressEvent):void {
var percentage:uint = (e.bytesLoaded/e.bytesTotal)*100;
preloader_mc.loader_txt.text = percentage.toString() + "%";
preloader_mc.pbar.scaleX = percentage/100;
function completed(e:Event):void {
preloader_mc.visible = false;
addChild(loader);
Any suggestions?

I'm not sure what you mean. The loader object is holding the
loaded swf. There's nothing else to call on. So the following
doesn't work:
loader.play();
Are you saying I should do something like this:
MovieClip(loader.contentLoaderInfo.play());

Similar Messages

  • [svn:osmf:] 14713: Fixed preloader issue with work around.

    Revision: 14713
    Revision: 14713
    Author:   [email protected]
    Date:     2010-03-11 12:44:27 -0800 (Thu, 11 Mar 2010)
    Log Message:
    Fixed preloader issue with work around.   Underlying flash player bug filed.  https://bugs.adobe.com/jira/browse/FP-4114
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FP-4114
    Modified Paths:
        osmf/trunk/apps/samples/framework/ExamplePlayer/org/osmf/examples/AllExamples.as

    Thanks Very much for the reply.
    This issue came to development (we) through Support team only. Did you mean DB Team Support?.
    Also please let us know about the workaround suggested by DB Team.
    Thanks in advance.
    Joseph George

  • Flash CS5 AS3 Preloader Issues

    Hi.
    I'm a complete novice with Flash and at risk at looking like 'Dumbest Poster of the Year', I'm requesting help/advic over a couple of issues.
    My first concern is with a very simple preloader I've made for a movie. Here is the code (posted in first frame of movie; nothing else is in the frame except for the preloader itself):
    import flash.events.Event;
    stop();
    addEventListener(Event.ENTER_FRAME, loaderF);
    function loaderF(e:Event):void{
    var toLoad:Number = loaderInfo.bytesTotal;
    var loaded:Number = loaderInfo.bytesLoaded;
    var total:Number = loaded/toLoad;
    if(loaded == toLoad) {
      removeEventListener(Event.ENTER_FRAME, loaderF);
      gotoAndPlay(2);
    } else {
      PreLoader.PreLoaderFill.scaleX = total;
      PreLoader.PercentLoaded.text = Math.floor(total*100) + "%";
    When I simulate a download, the preloader works fine in all the settings except for 'T1'. On this setting, the movie loads to about 20% then the preloader stops, the movie begins and I receive the following error message in the output panel:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at FlashFront1_fla::MainTimeline/loaderF() .
    The movie itself plays fine on all settings, including 'T1'. Debug doesn't report any issues on preloader or movie.
    Can anybody give me any idea what the source of the issue is? Should I even be concerned about it givne that the movie plays without a problem?
    My second question relates to the 'Simulate Download' pre-settings in Flash. I know their are people out there still on 56K dial-up, or with 'broadband' running at 500 KBS (in the UK at least), but nevertheless, the download simulation settings seem like they are all geared to internet as it was in 1997 and are hardly reflective of the capacity of modern connections. Why is this?
    My movie is not large (about 320KB). Should I even be bothering with a preloader or am I wasting my time for a small minority audience (much like the web designers who still produce sites for the 12 people in the world still browsing in 800 x 600 res)?
    Thanks for any help/advice.

    Flash movies stream down and finish "loading" when the first frame and content that loads on the first frame is available, though frame 1001 might not be downloaded yet. You would think you'd be kinda safe with frame 2 on a T1, but I think the issue is things aren't updating in the right order  rather than things not really being downloaded. Heck, it could even just be the T1 simulation that's causing problems.
    Debug Movie probably isn't showing issues because it slows the timing enough to make everything ok. You could try trace statements too to see how far the code gets.
    Also, you might try a full scale AS3 loader like this one http://www.republicofcode.com/tutorials/flash/as3loader/
    I've found the Event.COMPLETE listener for the loader like this:
    my_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, finishLoading);
    to be pretty accurate so far in regards to content truly being loaded where as previous methods gave false positives for loading.

  • Image preload issue

    I've built a flash site for a video company. Due to the
    design and fact they want high quality videos on the site, the
    final file is a monstrous 9 megs! I've built a preloader into the
    site which seems to work fine, except for one issue.
    I built a 3D navigation into the site which was imported from
    Swift 3D as a series of numbered picts. I would assume that the
    preloader would, well, "preload" the images so once the site is
    loaded, it would play smoothly, however, this is not the case. The
    first time the picts run, they are very choppy, but then every
    subsequent time it's run, it plays smooth and great.
    So, here's the obvious question... How can I make it so that
    the picts run smoothly the FIRST time?
    Thanks in advance!

    > I only want the photos/images on individual
    > pages to load when I select on a specific Spry tab.
    that's the issue, they are spry tabs on ONE page.
    all the images are on that ONE page.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • Help! - as3 IE preloader issues

    Ok,
    So, I work for the NPS, and they have an outdated CMS. I have no rights  to upload an .html file, or edit one that the CMS makes.
    SO, I am forced to use their little deal to display my .swf files.
    Problem:
    http://www.nps.gov/glca/photosmultimedia/ehikes.htm
    I made an eHike in as3 Flash CS4. It has two scenes, the first scene is  the preload, second is splash content and ehike content. The problem is I  cant get the preloader to display in IE. I have all actionscript  content exported to the second frame, as talked about here:
    http://www.senocular.com/flash/tutor...preloaderstart
    and it works fine in firefox.......
    GRRRR....
    I have tried many different ways to load the preloader..... Here is what  I'm currently using....
    there is a simple text field for the percentage, and a simple 100 frame  animation. preloader_mc
    stop();
    var preLoaderPercent:Number = 0;
    addEventListener(Event.ENTER_FRAME, loadComplete);
    function loadComplete(e:Event):void {
        if (this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal) {
        removeEventListener(Event.ENTER_FRAME, loadComplete);
        this.loaderInfo.removeEventListener(Event.COMPLETE, loadComplete);
        this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, loadProgress);
        gotoAndPlay("splash", "content");
    }//loadComplete
    this.loaderInfo.addEventListener(Event.COMPLETE, loadComplete);
    this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
    function loadProgress(e:ProgressEvent):void {
        preLoaderPercent = e.bytesLoaded / e.bytesTotal;
        load_txt.text = Math.ceil(preLoaderPercent * 100) + "%";
        var animstop:Number = Math.floor(preLoaderPercent*100);
        preloader_mc.gotoAndStop(animstop);
    The CMS lets you decide in the popup window if it is resizeable or not.  This works in IE (stopping people from resizing), but not in firefox,  people can resize it. Is there any way to disable the resize in AS3?  Again, I understand that your supposed to export the .html file with  these settings, but I have no permissions to upload or create new .html  files.
    Anyone who will help me with this - Thanks
    David

    The problem is talked about here:
    http://stackoverflow.com/questions/460677/serving-raw-swf-files-displays-in-firefox-but-no t-in-ie
    Solution was to preload with an external .swf
    Cheers

  • Flash Preloader Issue

    I have tried several methods of flash preloading for some
    large flash movies I have. The loader indicator flashes for just a
    brief moment and then there is blank data until the file loads. I
    am using Go-live CS2. I had a friend publish the same code using a
    different site and a different editor and it works. Does Go-live do
    something weird to preloaders? Or, is it possible that my site
    providers server is blocking script to prevent it from working? Any
    ideas would be appreciated. If you have a suggestion of a preloader
    that is for dummies like me, please send me a link. Thanks!

    http://www.actionscript.org/resources/articles/54/1/Smooth-PreLoader/Page1.html

  • Preloader Issues in IE 9?

    I'm publishing a RoboHelp project that includes topics with embedded Captivate movies, all built in Captivate 5. Each movie includes the default preloader animation. I'm publishing to WebHelp Pro.
    When I publish the project and open in FireFox, I see the preloader animation.
    When I publish the project and open in IE 9, the preloader animation does not appear. Instead, I see an image placeholder image. If I wait, the movie will start. However, our users aren't going to know to wait without a preloader animation.
    Any idea why the preloader wouldn't work in IE 9?

    What version of Flash have you installed? The latest version 10.2 has additional support for IE9. You can download it at http://www.adobe.com/support/flashplayer/downloads.html

  • Preloader issues...

    Hey guys!
    I'm new to this site and to the whole flash/scripting
    business. I finished a website using flash, and the final touch I
    need to add is a pre-loader.
    I used this tutorial to get me started:
    http://www.lukamaras.com/tutorials/p...preloader.html
    Now, at first I thought I incorrectly created the preloader.
    I then downloaded his pre-loading example, which works, and then
    tried preloading my *.swf instead of his. It produced the same
    problem that my code did! It wouldn't preload properly.
    The file I want to pre-load is about 5.2 megs. What's
    happening is, it starts to pre-load a small amount, and then jumps
    to the file I would like to have preloaded, and only most of it is
    missing. (menu buttons load etc., but no graphics loaded with it)
    My first assumption is that I am not specifying the proper amount
    of bytes or something in the code to be downloaded?
    So, if his pre-loader works, am I doing something wrong with
    my 5.2 meg swf? Do I have to export the swf with any particular
    settings applied to it?
    This is the code that is in the pre-loader, Action/Frame 1:
    siteLoader.loadMovie("MyHomePage4.swf");
    loadingBar._xscale = 1;
    loadingBar.onEnterFrame = function() {
    kBytesLoaded = this._parent.siteLoader.getBytesLoaded() /
    1024;
    kBytesTotal = this._parent.siteLoader.getBytesTotal() / 1024;
    percentage = Math.round(kBytesLoaded/kBytesTotal*100);
    this._xscale = percentage;
    if (percentage == 99) {
    delete this.onEnterFrame;
    Thanks for any help guys, I really would love to finish
    this..

    insert a keyframe to frame 2 of your loaded swf and move all
    content from frame 1 to frame 2. then add a stop() to the loaded
    swf's first frame.
    in showContent execute a play() method applied to your
    loader's content property (cast as a movieclip):
    MovieClip(myLoader.content).play();

  • Preloader issue

    Hello,
    I have followed the tutorial to include a preloader in my webpages of my website. The spinning icon works on my desktop, but is not visible when the site is uploaded online.
    <!doctype html>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
              <head>
                        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
                        <title>My website</title>
                        <link rel="stylesheet" type="text/css" href="includes/marquee.css" />
            <link rel="stylesheet" type="text/css" href="includes/preloader.css" media="screen, print"/>
                        <script type="text/javascript" src="includes/jquery-1.6.min.js"></script>
                        <script type="text/javascript" src="includes/farinspace/jquery.imgpreload.min.js"></script>
                        <script type="text/javascript" src="includes/marquee.js"></script>
              </head>
              <body>
        <!-- Preloader -->
    <div id="preloader">
              <div id="status">&nbsp</div>
    </div>
    <div>    CONTENT is HERE </div>
    <script type="text/javascript">
        //<![CDATA[
            $(window).load(function() { // makes sure the whole site is loaded
                $('#status').fadeOut(); // will first fade out the loading animation
                $('#preloader').delay(350).fadeOut('slow'); // will fade out the white DIV that covers the website.
                $('body').delay(350).css({'overflow':'visible'});
        //]]>
    </script>
            </body>
    </html>
    The only item I did not include as per the tutorial, is:
    <!-- jQuery Plugin -->
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
    This is because when the above plugin is included, it creates some conflicts, and my webpage wont be visible.
    Thanks

    Without seeing your URL, it's impossible to say for sure...  some things to check:
    It could be your page is loading so fast, the animation doesn't have time to appear.
    Did you upload the scripts and animated gif to your site?
    Are you sure the paths to supporting files are all correct?
    Have you tested the preloader on a plain vanilla page without any other plugins that may be causing conflicts?
    Nancy O.

  • Enormous First Frame (348kbs) + preloader issues

    Hi, all, and thanks for your help in advance.
    I've created a pretty simple website that is now giving me fits, as every preloader I've used is still preceeded by a lengthy span of blank white screen. I researched to find out that meant my first frame was overloaded with components that were set to load BEFORE the preloader, which makes sense, but I cannot for the life of me figure out what components they are. I don't have the attach.movie components they mentioned, etc.
    Would someone mind taking a looking at my .fla and telling me what the heck is causing my first frame to be so load heavy?  I did a bandwidth check, and sure enough, it's 348 kbs. I wouldn't ask this if I hadn't spent all night looking up tutorials and trying to solve my problem myself. Any ideas would be helpful, too.
    You can download the .fla (it's under 5 gigs, but Adobe says the content type is not allowed, apparently) here:
    [URL=http://depositfiles.com/files/jo67jzeru]http://depositfiles.com/files/jo67jzeru[/URL]
    Thanks!
    - Jennifer

    There are three frames containing actionscript.
    This is the very first frame of the preloader movie:
    //Calculates the amount to load and how much is loaded
    percentLoaded = Math.round(_root.getBytesLoaded() / _root.getBytesTotal() * 100);
    //Sets the width of the bar
    this.myWidth(this.loadBar, percentLoaded * 1.94);
    this.myMove(this.mc_loadNum, percentLoaded * 1.9 -8);
    mc_loadNum.loadNum.text = percentLoaded;
    // FUNCTIONS
    function myWidth(moveObj, newWidth) {
         moveObj.w = moveObj._width;
         moveObj.dwidth = newWidth-moveObj.w;
         moveObj.t = 0;
         NFRAMES = 6;
         moveObj.onEnterFrame = function() {
              if (moveObj.t++<NFRAMES) {
                   moveObj._width = easeOutQuad(moveObj.t, moveObj.w, moveObj.dwidth, NFRAMES);
              } else {
                   delete this.onEnterFrame;
    function myMove(moveObj, newX) {
         moveObj.x = moveObj._x;
         moveObj.dx = newX-moveObj.x;
         moveObj.t = 0;
         NFRAMES = 6;
         moveObj.onEnterFrame = function() {
              if (moveObj.t++<NFRAMES) {
                   moveObj._x = easeOutQuad(moveObj.t, moveObj.x, moveObj.dx, NFRAMES);
              } else {
                   delete this.onEnterFrame;
    easeOutQuad = function (time, beginX, changeX, durationX) {
         if ((time /= durationX/2)<1) {
              return changeX/2*time*time+beginX;
         return -changeX/2*((--time)*(time-2)-1)+beginX;
    and then in the second:
    if (percentLoaded < 100 ) {
         gotoAndPlay("loading");
    and then in the last frame of the preloader video, following all loadbar tweens, etc., in it's own frame:
    _root.gotoAndPlay(2);

  • Preloader Issues Flash CS3 Actionscript 2

    My preloader is acting all sorts of strange. I have other
    layers that are supposed to be visible at the same time as the
    preloader, and sometimes they are there, but sometimes only the
    dynamic text box of the preloader shows and nothing else. It seems
    to happen about every other time I load or refresh the page.
    Can anyone tell me why this might be happening? It's working
    half the time.
    Is it something with the way my layers are ordered that the
    rest aren't showing up?
    Here is the link to the site:
    www.kathryngillespie.com
    I know it takes a while to load on some connections...I'm a
    flash newbie and I'm going to go back and change the section with
    the images and optimize them better to get the size down.
    I can also email a picture of my time line setup because I
    don't see an option to post it here.
    Thanks in advance!

    I found the solution!
    it's vista who makes it lag :(
    i set the compatibily to windows XP and now it runs fast as
    hell :D

  • AS2 / AS3 Flash Preloader issue.

    [ moved from AS1/2 forum ]
    Hi every one,
    I'm testing the new capabilities on Flash Pro CS6. And I'm stuck around here as most of my coding are AS1 / AS2 and when I try to make the coding for AS3 one part of my pre-loading is not functional any more. Basically the Dynamic Text does not shows up. Maybe if you take a look into my code you can tell me where I'm wrong.
    This is the new AS3 code for my preload scene. I have created this stage to load just one image on the 2nd frame. And it works except for the text that it does not displays the text inside the following instances: percent_txt, ofBytes_txt and totalBytes_txt
    I appreciate any ideas you may provide to me pls.
    stop();
    addEventListener(Event.ENTER_FRAME, loaderF);
    function loaderF(e:Event):void{
              var toLoad:Number = loaderInfo.bytesTotal;
              var loaded:Number = loaderInfo.bytesLoaded;
              var total:Number = loaded/toLoad;
              if(loaded == toLoad) {
      removeEventListener(Event.ENTER_FRAME, loaderF);
                        gotoAndStop(2);
              } else {
                        preloader_mc.preloaderFill_mc.scaleX = total;
                        preloader_mc.percent_txt.text = Math.floor(total*100)+ "%";
                        preloader_mc.ofBytes_txt.text = loaded + "bytes";
                        preloader_mc.totalBytes_txt.text = toLoad + "bytes";
    This is the result when testing,
    Thank you so much and kind regards !!
    Joel.

    You have to set the values initally
    stop();
    addEventListener(Event.ENTER_FRAME, loaderF);
    function loaderF(e:Event):void{
              var toLoad:Number = loaderInfo.bytesTotal;
              var loaded:Number = loaderInfo.bytesLoaded;
              var total:Number = loaded/toLoad;
              preloader_mc.preloaderFill_mc.scaleX = total; 
              preloader_mc.percent_txt.text = Math.floor(total*100)+ "%";
              preloader_mc.ofBytes_txt.text = loaded + "bytes";
              preloader_mc.totalBytes_txt.text = toLoad + "bytes";
         if(loaded == toLoad) {
           removeEventListener(Event.ENTER_FRAME, loaderF);
                        gotoAndStop(2);
    what you original code was saying was after all the info was loaded to then set the text to the variables listed, you have to set it first and once the info is finally loaded go to the second frame.

  • Could someone take a look at this preloading issue?

    Hi guys,
    I'm working on a site that's going to have lot of images
    loaded into the same area. When the user clicks on the image it
    will shrink and reveal other images and a text field. The problem
    I'm having is that after my preloader finishes it seems to blink
    all the stuff that is supposed to be underneath the big picture and
    then it shows the big picture.
    Here's a link so you can see what I'm talking about:
    http://www.stationarynotes.com/studioI/preloader.html
    You can also go to
    http://www.stationarynotes.com/studioI/
    to download my .fla files. If anyone would be kind enough to
    look at this really quick for me I would greatly appreciate it.
    Thanks guys.

    i don't see a problem.

  • I am noticing a Bunch of Preloader Problems With Captivate 5

    That are not being answered on the Adobe forums and they all seem to be some what related. I am have major preloader issues and wish this would be resolved.
    http://forums.adobe.com/message/3595269
    http://forums.adobe.com/message/3209686
    http://forums.adobe.com/thread/471103
    There are more. Some go back to Captivate 4 and most seem to be related to Action Script three. I am having all of the problems in the above three forums and have yet to find a answer.
    I am using Captivate 5 and Connect Pro 8 on premise.
    It is critical that I get my preloaders to function properly because my clients think that something is wrong when they have to wait more than a few seconds with out see some sign of progress. Thanks.

    Here are some more that are not answered.
    http://forums.adobe.com/message/2954752
    http://forums.adobe.com/thread/467275
    http://forums.adobe.com/message/3139989

  • Preloader Freezes, then 'Unresponsive Script' Warning

    Hi folks-
    This is my first Edge Animate project.
    I have created a simple cross-fading 'slide show' with moving text overlays using the most recent upgrade of Edge Animate 3.0.0.  8 slides.  The stage isn't that huge: 748x334 pixels.  There is one .png overlay with a transparent interior to create the framing; the 8 slides revealed underneath are all Q50 'saved for web' jpgs averaging under 40kB each.  I have used one of the simple preloaders in the included library and published for web.
    My problem presents regardless of which browser I use (tried the latest versions of Firefox, IE, Safari, Chrome and Opera), and whether I run the published .html solo (hosted on my server), or embedded in the final web page it's destined for.  Also, I get the same result when I use Ctrl-Enter from within Edge Animate to preview in my default browser (Firefox).
    The problem is that the preloader gif only runs briefly, then freezes, followed by up to a minute of waiting (sometimes even more) before the first slide appears and the animation begins.  Solo'd, it's just the frozen animated gif during the wait.  Embedded in the final web page, the whole page, including navigation, is unresponsive until after the wait is over.
    Depending on the browser, I will get various warnings.  In Firefox I get the 'Unresponsive Script' warning and it identifies the unresponsive scripts as:
    http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js:4
    Or
    http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js:5
    Or
    http://animate.adobe.com/runtime/3.0.0/edge.3.0.0.min.js:166
    Or
    http://animate.adobe.com/runtime/3.0.0/edge.3.0.0.min.js:45
    Sometimes I've selected 'cancel script'; sometimes I've selected 'wait for script to finish';  it doesn't seem to matter which one I select.  Sometimes it works immediately after making either selection;  In some cases I get the warning message 2-3 times before it finally works.
    I've tried both hosting the runtime files myself and on Adobe CDN.  I've also tried 'Immediate' and 'Polite' for the preloader.  It makes no difference.
    I've also disabled all add-ons in Firefox and the result is the same, though it may take less time to recover from the freeze.
    I ran a speed test and my current download speed is 13mbps, so I can't believe my paltry image files are taking this long to load...and even if they were, shouldn't the preloader continue to animate during the load?
    Has anyone else seen this behavior? I sure am hoping for a solution~!
    When I created something similar to this in Flash a couple years ago, it didn't even need a preloader it loaded up and ran so fast...
    Quite Puzzled,
           bOB

    hi bOB,
    I know your post has been long time ago, however recently I'm having the same issue you had, except the errors messages you're getting, my preloader stays at the same point unless I hit reload page on the browser and finally loads it. Are you still having the preloader issue even with the most recent Edge Animate version?
    Thanks,
    Paco

Maybe you are looking for

  • How can I Find/Replace a word on all cast members together rather than one at a time?

    I currently use Director 11.5.9 with Windows 7 64 bit I have some director movies I programmed years ago.  I included the file extension .dir when I used "go to movie" statements (I didn't know any better at that time).  For example, I would write, g

  • How to make use of SE37- Function Module & how to find out the table?

    Hi , 1.Could anyone help me what's this SE37-Function module is all about,How to make use of this? For Eg,If i want to delete a BOM permanently from the system then I have to use the Function module CM_DB_DEL_FROM_ROOT_BOM. But after giving the parti

  • Delete Parameter IDs from Memory

    Hello, does anyone know if there is a transaction to delete certain parameter IDs from the memory?? I am talking about the parameters you can set in the code with "SET PARAMETER ID...."... thanks in advance rudy

  • BT Hub 2.0 going off constantly

    Hi We recently have had an upgrade to our "local" network as the email described that I received, but since then my BT hub "clicks" all the lights go out and then over a few minutes comes back on, sometimes with the broadband light flashing orange fo

  • Embedding iPix images

    Hi all, I am embedding an iPix image (.ipx) into a page and when I preview it locally, it works, but when I upload to my host it does not. Having checked it with IE it shows a file access error. Any ideas anyone? My code is below. The IpixViewer.clas