Preloader help need !

  • Daniel
  • Student
  • Student
  • Daniel
  • Posts: 91

Post 3+ Months Ago

Ok well I am making a simple preloader and here is the action code I used

Code: [ Select ]
if (getBytesLoaded()>=getBytesTotal())
{gotoAndPlay(51);
} else {
gotoAndPlay(1);
}
  1. if (getBytesLoaded()>=getBytesTotal())
  2. {gotoAndPlay(51);
  3. } else {
  4. gotoAndPlay(1);
  5. }


The problem is when I hit ctr enter twice to view it as it would look on a site it doesn't load the preloader until after the site is loaded i.e. the preloader doesn't work. Is my code wrong ? If you have msn please add me if you would be so kind as to help 1 on 1 mine is daniel181091@yahoo.co.uk
  • Tchuki
  • Mastermind
  • Mastermind
  • Tchuki
  • Posts: 1774
  • Loc: Edinburgh

Post 3+ Months Ago

How are you running the movie, off your local PC or over the net?

If you aren't physically downloading the movie off the net then the preloader won't work because all the information flash requires to play the movie is cached.
  • Daniel
  • Student
  • Student
  • Daniel
  • Posts: 91

Post 3+ Months Ago

I tested it on the net and it loads the movie then plays i.e. not the preloader while its loading...
  • voycieh
  • Novice
  • Novice
  • User avatar
  • Posts: 24
  • Loc: Poland, Warsaw

Post 3+ Months Ago

Try with this one...

onClipEvent (enterFrame){

mctotal = _root.getBytesTotal();
mcloaded = _root.getBytesLoaded();

mcpercent = Math.round((mcloaded / mctotal) * 100);
sto = mcpercent + "%" ;

progress_mc._xscale = mcpercent;

if (mcpercent == 100) {
_root.play(1);

}
}
"sto" - variable name of text field to display the %%%
"progress_mc" - is the instance name of the loader stripe...
set it's width to 100 and scale to 1% width.... for start.
  • Daniel
  • Student
  • Student
  • Daniel
  • Posts: 91

Post 3+ Months Ago

Sorry Im new to action script and didn't understand that. Can you please just say exactly what to put in ?

Code: [ Select ]
In this format
  • suzie
  • Guru
  • Guru
  • User avatar
  • Posts: 1134
  • Loc: England

Post 3+ Months Ago

I don't do Flash - I swish lol but all you should need to do is c/p voycieh's code and insert it into your Flash...which way I have no idea, sorry!
See in swish we would just go to 'script' if (sceneFrameLoaded("<current scene>",1)) {
gotoSceneAndPlay("Main Movie",1);
}
There is more to the script but I showed just a sample here for you to see.
Must be something similur in Flash. join a Flash newsgroups. see the questions getting answers - a great way to learn anything. loads out there!
Good luck!
:)
  • misatbt
  • Born
  • Born
  • User avatar
  • Posts: 3
  • Loc: NL

Post 3+ Months Ago

voycieh wrote:
Try with this one...

onClipEvent (enterFrame){

mctotal = _root.getBytesTotal();
mcloaded = _root.getBytesLoaded();

mcpercent = Math.round((mcloaded / mctotal) * 100);
sto = mcpercent + "%" ;

progress_mc._xscale = mcpercent;

if (mcpercent == 100) {
_root.play(1);

}
}
"sto" - variable name of text field to display the %%%
"progress_mc" - is the instance name of the loader stripe...
set it's width to 100 and scale to 1% width.... for start.



With this action script ya can put in your loading movie. Normally ya put in the first frame before ya wanna play ur movie.
Remember the instance of the movie in voycieh's action script :)
Thas all!
Hope can help ya!

Misa :)
  • voycieh
  • Novice
  • Novice
  • User avatar
  • Posts: 24
  • Loc: Poland, Warsaw

Post 3+ Months Ago

Ok! here's link to one of my favourites polish flash sites...

You can download *.fla file with preloader...

Press "pobierz" button :)

http://www.flashzone.pl/forum/fla.php?s ... ileID=109#

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 11 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.