A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: Script causes flash player to run slowly

  1. #1
    Junior Member
    Join Date
    Nov 2004
    Location
    Jax, Fl
    Posts
    13

    Script causes flash player to run slowly

    I have created this movie by midifying one from this website...

    The premise is that it takes a certain amount of movies and shows each one randomly until they have all been shown.

    I modified the movie so that it would load exterior JPEGS rather than show images from the library. Now I am getting a warning that the movie is causing flash player to run slowly.

    I am using 105 images so one might jump to the conclusion that this is why however if I modify it to run only 10 is has the same problem. Perhaps someone with a better understanding of Actionscript could help me out?

    I am using Flash MX but i think the original movie I pulled was much older as the syntax used is unfamiliar to me.

    The files are available at

    http://site228.webhost4life.com/stri...site/stamp.zip

    Frame one:
    i = "0";
    shown = f-1;
    while (Number(i)<Number(f)) {
    set("shown" add i, "false");
    i = Number(i)+1;
    }
    trace("reset");


    Frame Two:
    Number = "0";
    while (Number(Number)<Number(n)) {
    rand = random(f);
    while (eval("shown" add rand) eq "true") {
    rand = random(f);
    }
    shown = shown-1;
    set("shown" add rand, "true");
    tellTarget ("s0") {
    gotoAndStop(Number(../:rand)+1);
    }
    Number = Number(Number)+1;
    trace("shown" add rand add "=" add eval("shown" add rand));
    }


    Frame 132:
    Number = "0";
    while (Number(Number)<Number(n)) {
    rand = random(f);
    while (eval("shown" add rand) eq "true") {
    rand = random(f);
    }
    shown = shown-1;
    set("shown" add rand, "true");
    tellTarget ("s1") {
    gotoAndStop(Number(../:rand)+1);
    }
    Number = Number(Number)+1;
    trace("shown" add rand add "=" add eval("shown" add rand));
    }

    Last frame has gotoandPlay(2). The S1 and S2 are both instances of a movieclip that loads a different JPEG into a holder on every frame.
    Last edited by nooneSavage; 11-04-2004 at 08:19 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center