Skipping Scenes with AS

Hi all.

Glad to be part of this forum :evil: .

Now on with this weird issue:

I have 5 simple Scenes in my movie:

  1. Preloader
  2. Site Load 1
    3: Site Load 2
    4: Site Load 3
    5: MAIN

Let me explain: The prelaoder loads all the movie - works fine.
Site Load 1, 2 and 3 are different ways in which the site loads up. ( To make some variety in the way the user sees the site being drawn into the screen) Once any of the “Site Load” has finished, it is sent to MAIN.

The code in PRELOADER to make this work is as follows:

var SiteLoad = Math.ceil(Math.random()*3);

switch (SiteLoad)
case 1 :
gotoAndPlay(“Site Load 1”, 1);
case 2 :
gotoAndPlay(“Site Load 2”, 1);
case 3 :
gotoAndPlay(“Site Load 3”, 1);

All of this works fine in Flash. However, when you look at the SWF in the browser, it seems to just play through all the scenes in order, ignoring the AS command above. :*(

Any ideas?


Oh, and frame labels are not working either :-\

Its really weird, the SWF alone works just fine, but when opened from the browser, it doesnt…

Scenes always caused trouble, and noone ever know why. Anyway, your method isn’t very logical: you load 2 scenes that you are not going to use, isn’t it? So why not load only the loading sequence that you are going to use, as an external movie, and keep everything in one scene?

pom :asian:

Pom, you are right, theoretically it makes more sense to load only what one is going to use. However, because my 3 Scenes contain all the same material, (just loaded in different order) it doesnt really matter.

I solved the problem with the scenes.

I beleive this is actually a flash MX bug.

In the preloader where my code to randomly select the scene it was supposed to load, i had this action on frame 1 of the preloader. I moved it to frame 2 and it worked…

Now it all works, with scenes, by using frame labels.

Flash might be cool, but something are just inexplicable nuisances.