header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
kittiek8
Points:10
Posts:0

6/16/2010 10:34:42 PM

Title: Flash Publishing Problems


Hiya!

I am trying to design a flash file to be uploaded onto a website. Im a beginner at Flash, and although the actual animation went ok, now that it has come to getting it ready to be uploaded I am having alot of problems!!

My main problem is that I think the clip is starting before it has fully loaded - I have timed the music into the clip, but the starting music is playing early and out of time. This is my main and most important problem.

Also, because the file is quite big, I wanted to put a loading bar on the start. So i used the actionscript
"ifFrameLoaded (159){
gotoAndPlay (2); // frame 2 has the 25% graphic for the loading screen
}"
and used 5 different graphics for each percentage. But it doesnt seem to be working, as the bars load quickly, and then there is a long wait before the movie plays.

I was actually hoping that using this code for the loading bar would stop the animation delay from happening because I was using the actionscript below to say to only start the animation after the last frame had loaded (= frame 635).
"ifFrameLoaded (635){
gotoAndPlay (5); // frame 5 has the 100% graphic for the loading screen
}"


My last problem is that the replay button (which plays fine in the swf file) is not showing up correctly. It was just a stock one I got through flash. But this problem isnt as important as the others.

If you want to have a look at what I am talking about it is on:
http://deadin60seconds.com.au/Redo15loader.html

Thanks so much!! I would greatly apreciate any ideas :)
Kate



1
Rex
Points: 1280
Posts:0
6/17/2010 3:29:17 AM



kittiek8 , you should first create a movieclip with "progressBar" as instance name which will contain 5 frames for each of your 5 step progress. In first frame of this movieclip add stop(); so that initally its stopped and show first design of progress bar.

Then in root in frame 2 use the code



bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
//keep the movie in loop until its loaded completely 
if (bytes_loaded == bytes_total) {
	//file is loaded now
	this.gotoAndPlay(3);
}else{
	this.gotoAndPlay(1);
}
//move the progress bar by checking the size percentage of loaded file
if(Math.round(getPercent*100) == 25){
	progressBar.gotoAndStop(2);
}else if(Math.round(getPercent*100) == 50){
	progressBar.gotoAndStop(3);
}else if(Math.round(getPercent*100) == 75){
	progressBar.gotoAndStop(4);
}else if(Math.round(getPercent*100) == 100){
	progressBar.gotoAndStop(5);
}



Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 3+0 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions