Groups | Blog | Home
all groups > flash actionscript > september 2004 >

flash actionscript : Load Movie with scene info?


swiil
9/3/2004 9:01:36 PM
Can i load a movie with a scene specification?

Thanks!
chrism59
9/3/2004 9:40:25 PM
Yes... If you place a label in the frame you want to go into. After you load
the movie you can use the loaded_mc.gotoAndPlay("label_lbl") to get the the
scene you want.

You will have to use the MovieClipLoader and the use the onLoadComplete to
trigger the goto statement
kglad
9/4/2004 5:35:38 AM
chrism's info is accurate except you don't need to use the MovieClipLoader.
you do need to use something to ensure your external movie has completed
loading before executing your gotoAndPlay() statement, though. and because
scene information is not available in your published movie, you do need to use
a frame label (or number if your frame is in your first scene).
swiil
9/6/2004 1:18:20 PM
I havent created the set up yet... what i want to do is change info out in a
content panel, however I have a menu system of links that runs in my main scene
file.

I originally crated this not thinking it would go this far... nor did i know
anything about flash when i started. So now i have to think 'creativly'.

Do you guys have suggestions on how to swap info in and out on a content panel
and perhaps keep some nice looking transitions?

Thanks again,
Chris
kglad
9/6/2004 3:43:09 PM
swiil
9/6/2004 4:11:54 PM
Its not a component, just a term I made up.


I figured it out with

movieclip.gotoandplay(2)
The first frame randomly loads a picture.

The next biggest problem i have is with the Press release button... If you
spend a minute and drag your mouse over it you will see what i mean.

http://www.sapc.edu/Flash/new/main.swf

Thanks for all the suggestions and help!
Chris
swiil
9/6/2004 4:18:10 PM
Scratch the last one... I fixed the button stupid mistake...

One final question remains...

Any one have a method for setting up a random picture loader? Ideally Id like
to just throw images in a folder and let my flash app handle the rest...
kglad
9/6/2004 4:24:15 PM
if you name your pictures judiciously this is easy enough. for example, if
your pictures are pic1.jpg, pic2.jpg,...,picN.jpg you can use:

targetMC.loadMovie("pic"+Math.ceil(Math.random()*N)+".jpg");
swiil
9/6/2004 8:17:11 PM
How do i limit the random number... I have pic1.jpeg through 5...

kglad
9/6/2004 8:53:02 PM
AddThis Social Bookmark Button