This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Flash Site Design > September 2005 > basic action script for a site





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author basic action script for a site
danbo2233

2005-09-16, 7:54 am

Hi everyone, I am a flash user and I occasional dabble with action script to
perform tasks as and when I need to.

I have always had problems with a preloader and am wondering if anyone can
help.

I have downloaded a preloader that someone has very kindly added a tutorial on
how to add it to my fla. it says that in frame 1 of my movie I have to adjust
the following:
-------------------------------------
percent_loaded = 1;
total_frames = 113;
value = 13;
LOADED_FRAME = 3;
-------------------------------------
right here is the problem, my movie spans over 3 scenes and the value of the
'total_frames' that I have added is the value of all my frames over the 3
scenes added up.

this dosnt seem to work, is there a 'total_scenes' value or am I completley
missing the plot.

jcavardfromneta

2005-09-16, 7:37 pm

--------- in your first frame --------
var total_frame = this.getBytesTotal();
var loaded_frame = this.getBytesLoaded();
var percent = math.round(this.getBytesLoaded() / this.getBytesTotal() *100) ;

if( loaded_frame == total_frame){
gotoAndPlay(3);
}


--------- frame 2 -------
gotoAndPlay(1);

---------- frame 3 --------
you put what your main scene, or whatever

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews