Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Actionscript / July 2008



Tip: Looking for answers? Try searching our database.

flash loader questions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DelinquentMe - 27 Jul 2008 23:20 GMT
hey all

so i've got this movie clip that i made a load screen with :
totalBytes = _root.getBytesTotal();
loadedBytes = _root.getBytesLoaded();
percentDone = int(loadedBytes / totalBytes * 100);
percentBar.gotoAndStop(percentDone);
ifFrameLoaded("Scene 2", 1){
    percentBar.gotoAndPlay(percentDone);
    gotoAndPlay("Scene 2", 1);
} // End of ifFrameLoaded

the level0 of Scene2 is 1 frame

for some reason all the rollovers that worked before the loader was placed in,
no longer work

any suggestions as to why this is happening?
kglad - 28 Jul 2008 00:34 GMT
where's ifFrameLoaded() and display its code using the attach code option in this forum?
DelinquentMe - 28 Jul 2008 15:16 GMT
the ifFrameLoaded() is in the first frame of Scene1
scene 1 consists of 2 frames and the loading bar
the second frame contains the gotoAndPlay(1); to loop it

Scene 2 has the actual movie im looking to play contained in it

im not too sure which code you're looking for because thats about the extent
of the code for scene 1

im just not too sure why the movie stops playing after it goes to scene2
DelinquentMe - 28 Jul 2008 15:17 GMT
PS i like your website but it confuses me lol
DelinquentMe - 28 Jul 2008 15:23 GMT
duhh i got ya

heres the code with the code viewer

totalBytes = _root.getBytesTotal();
loadedBytes = _root.getBytesLoaded();
percentDone = int(loadedBytes / totalBytes * 100);
percentBar.gotoAndStop(percentDone);
ifFrameLoaded("Scene 3", 1){
    percentBar.gotoAndPlay(percentDone);
    gotoAndPlay("Scene 2", 1);
}
// End of ifFrameLoaded
kglad - 28 Jul 2008 15:36 GMT
ifFrameLoaded() must be a function and it must be defined when your preloader
code executes.

what frame number is "Scene 3", frame 1?  use that in an if-statement instead
of ifFrameLoaded() and label "Scene 2", frame 1 and use that label in a goto
method:

_root.gotoAndPlay("scene2_frame1");  // <- label this frame
DelinquentMe - 28 Jul 2008 16:03 GMT
what frame number is "Scene 3", frame 1?

im not sure i follow -- isnt it obvious its frame 1?
haha im sorry maybe im missing something :)

and how do i use it in an " if " when i need to test if the frame is loaded?

i labeled the "Scene 3" frame 1 as "SPLASH" which is what needs to be tested
to see if its loaded -- i apologize but the code i pasted previously was me
testing some things out...

code 1 definitely doesn't work lol

code 2 is how its supposed to be

is there any reason why the frame label ("SPLASH") doesn't work in the
ifFrameLoaded but the explicit ("Scene 2", 1( does?

//code 1

totalBytes = _root.getBytesTotal();
loadedBytes = _root.getBytesLoaded();
percentDone = int(loadedBytes / totalBytes * 100);
percentBar.gotoAndStop(percentDone);
if (ifFrameLoaded("Scene 3", 1) == true){
    percentBar.gotoAndPlay(percentDone);
    _root.gotoAndPlay("SPLASH");
}

//code 2

totalBytes = _root.getBytesTotal();
loadedBytes = _root.getBytesLoaded();
percentDone = int(loadedBytes / totalBytes * 100);
percentBar.gotoAndStop(percentDone);
ifFrameLoaded("Scene 2", 1){
    percentBar.gotoAndPlay(percentDone);
    _root.gotoAndPlay("SPLASH");
}
kglad - 28 Jul 2008 16:09 GMT
no, it's not frame 1.  only your first scenes first frame is frame 1.

if "Scene3",frame1 has the label "SPLASH" use:

_root.gotoAndStop("SPLASH");
trace(_root._currentframe);

to determine the frame number of "SPLASH".  report the results.

both of your code snippets are going to fail because you keep trying to use
ifFrameLoaded() when no such function exists and code 2 doesn't make any sense,
assuming Scene2 plays before Scene3.

what logic are you using when you appear to test if Scene2 is loaded and, if
so, play Scene3 which, presumably, is not yet loaded?
DelinquentMe - 28 Jul 2008 16:29 GMT
haha god im sorry kglad the scene 3 thing was me testing if i could just add a
blank scene and have the loader go to Scene 2 THEN have scene 2 just go to
scene 3 (it didnt work lol )

but i now only have 2 scenes :)

ur really showing me up here lol

[q][i]Originally posted by: [b][b]kglad[/b][/b][/i]
to determine the frame number of "SPLASH".  report the results.
[/q]

3 is what it returned

i thought ifFrameLoaded() is a flash inherent function and therefore it would
always be accessible?
kglad - 28 Jul 2008 16:39 GMT
ifFrameLoaded() is before my time (which means it's ok for flash player 4).  
but i suspect it has bugs because from flash 6 until flash 9, all scene
handling with actionscript has had bugs.

i'm not sure how much preloading you're going to be doing because you're only
preloading what's on frames 2 and 3 of your swf.  but, if that's what you want
to do use:

totalBytes = _root.getBytesTotal();
loadedBytes = _root.getBytesLoaded();
percentDone = int(loadedBytes / totalBytes * 100);
percentBar.gotoAndStop(percentDone);
if(_root._framesloaded==3){
    percentBar.gotoAndPlay(percentDone);
    _root.gotoAndPlay("SPLASH");
}
DelinquentMe - 28 Jul 2008 18:53 GMT
i figured it out

the _root of "Scene 3" simply has 1 frame -- i changed the

_root.gotoAndPlay("SPLASH");

to

_root.gotoAndStop("SPLASH");

and everything is Graaayyy vah
kglad - 28 Jul 2008 18:57 GMT
nyperiodontics - 31 Jul 2008 01:32 GMT
I am up loading the swf files to a web to Lunar pages I can see the movie in my hard drive when I run a test but not on the website. Can you please assist it is a very important project, thanks
DelinquentMe - 31 Jul 2008 02:51 GMT
nyperiodontics

you might want to try posting a new forum topic unless its related to this flash loader question and in that case if youd like to give a littel more info maybe i can help
kglad - 31 Jul 2008 07:20 GMT
are you ftp'ing your files?  if so, is your ftp client supplying an error message?

and post one file name that you see on your harddrive and not on your server after trying to upload.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.