A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Error on preloader...

  1. #1
    Member
    Join Date
    Apr 2004
    Location
    UK
    Posts
    57

    Error on preloader...

    Hey,

    I know there are tones of post on preloader but this one is just very simple and still not working. After trying for hours I have to come to you master.

    I made preloader before with same AS and it was working fine. [Click here to check ].

    And this time i am using the same code with different scene name. but it's not working [Click here to see error version]

    Here is the code:
    Code:
    loadedbytes = getBytesLoaded();
    totalbytes = getBytesTotal();
    loadedkbytes = Math.ceil(loadedbytes/1000);
    totalkbytes = Math.ceil(totalbytes/1000);
    if (loadedbytes == totalbytes) {
    	_root.gotoAndPlay("jsn", 1);
    }
    frame = int(loadedbytes/(totalbytes/100));
    _root.loader.gotoAndStop(_root.frame);
    In above code it's not going to scene jsn that is the first error. So I made frame 4 with _root.gotoAndPlay("jsn", 1); and in above red line I changed it to _root.gotoAndPlay(4);

    So now it goes to frame 4 and THEN goes to scene jsn. ERROR with this one is that it keeps repeating the animation again and again until it loads all the bytes. (this animation is done in 100 frames at 30fps)

    what is the solution for this? Why _root.gotoAndPlay("jsn", 1); in main AS is not working and if I try that jumping from frame 4 to scene jsn WHY it's repeating animation?

    Please help guys.

  2. #2
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    Is the animation named _root.loader.? I mean the instance name is loader? And you shouldn't need _root.frame, just frame should work

  3. #3
    Member
    Join Date
    Apr 2004
    Location
    UK
    Posts
    57
    animations' instance name is loader and movie name is loader_mc

    I still can see why _root.gotoAndPlay("jsn", 1); is not working. It's very simple isn't it?

  4. #4
    Member
    Join Date
    Apr 2004
    Location
    UK
    Posts
    57
    ok, I found out what was wrong. It's silly and make me feel like stupid. I forgot to give instance name to one of the text field. DOH... Sorry for putting you guys in trouble. Here is what it looks like now click here

    what you think? need any chance in design or fonts? or it looks ok?

  5. #5
    It's a long way to the middle launchpad67's Avatar
    Join Date
    Oct 2004
    Location
    Prescott, Arizona
    Posts
    1,387
    pretty cool! nice job.

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