Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 Flash AS3.0 Preloader problem, Preloader not working as it should

views
     
TSjunkieG
post Mar 30 2011, 04:35 PM, updated 15y ago

DIGITAL ERA
*******
Senior Member
2,687 posts

Joined: Jan 2003
From: Sue Bunk Jai Yaa!


Hi all,

Another problem while building Flash AS3.0 Preloader.

This is the script i got from the net. It was meant for picture file ie. Jpeg i think... sweat.gif

QUOTE
stop();

stage.addEventListener(Event.ENTER_FRAME, update);

function update(e:Event):void {


var loadedBytes:Number = stage.loaderInfo.bytesLoaded;
var totalBytes:Number = stage.loaderInfo.bytesTotal;

progress_mc.scaleX = loadedBytes / totalBytes;

percent_txt.text = Math.floor((loadedBytes / totalBytes) * 100) + "%";

if (loadedBytes == totalBytes) {
gotoAndPlay(5) ;
stage.removeEventListener(Event.ENTER_FRAME, update);
}
}


When I replace the Jpeg image with movie clip, the preloader gone cacat. I know this after simulating it under flash player. should if its not a movie clip, my preloader will working just fine

What did i do wrong? icon_question.gif

attached is the project file for your perusal.

Your assistance is highly appreciated. Please help cry.gif


Attached File(s)
Attached File  preloader_problem.zip ( 298.66k ) Number of downloads: 8
oelalmas
post Mar 30 2011, 05:33 PM

New Member
*
Junior Member
40 posts

Joined: Mar 2006
hi there

i am not a flash progrmmer but what you can do is create 2 files
one for preloader and the other for your movie clip/swf/jpg etc. it will save you time.

http://biochimistu.blogspot.com/2008/03/pr...-gif-files.html

then the other as your movie file(eg:test.swf)



the link above will help you undestand more....i am still using as2 since it's eqsier to get codes online.

as3 is a pain for me to understand

here is another link might help

http://blog.newmovieclip.com/2007/04/30/mo...g-in-flash-cs3/

try kirupa.com (forum)

cheers
shinkawa
post Mar 31 2011, 09:53 AM

parttime otaku
*****
Senior Member
855 posts

Joined: Jun 2008
i don have cs3 with me now.

have you check the

gotoAndPlay(5) ;

is it stoping at right place?
TSjunkieG
post Mar 31 2011, 10:38 AM

DIGITAL ERA
*******
Senior Member
2,687 posts

Joined: Jan 2003
From: Sue Bunk Jai Yaa!


hii shinkawa,

it is stopping at the assigned keyframe which is (5) however the preloader seems not to working properly.

@oelalmas, thanks, im looking at some of the tutorial. Personally I feel too technical for a designer like me. huhuuhhu!

appreciate you guys help!


mclelun
post Apr 1 2011, 10:54 AM

On my way
****
Senior Member
662 posts

Joined: Jan 2003
looking at the quote, I assume there is no problem with the preloading script. The problem might be in other part. but I cant open your flash file to view it.
TSjunkieG
post Apr 12 2011, 02:45 PM

DIGITAL ERA
*******
Senior Member
2,687 posts

Joined: Jan 2003
From: Sue Bunk Jai Yaa!


hi mclelun,

do u need me to save it on different version of flash?
shinkawa
post Apr 12 2011, 05:38 PM

parttime otaku
*****
Senior Member
855 posts

Joined: Jun 2008
QUOTE(mclelun @ Apr 1 2011, 11:54 AM)
looking at the quote, I assume there is no problem with the preloading script. The problem might be in other part. but I cant open your flash file  to view it.
*
+1


this is my preloader code
CODE
bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.loadBar._width = getPercent*100;
_root.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
_root.gotoAndStop(3);
}



event listener kacau? did the previous movieclip got instance name?

 

Change to:
| Lo-Fi Version
0.0187sec    0.72    6 queries    GZIP Disabled
Time is now: 14th December 2025 - 02:18 PM