all groups > flash actionscript > march 2006 >
You're in the

flash actionscript

group:

media control


media control L_ogistics
3/17/2006 8:51:14 PM
flash actionscript:
I have created several .SWF files that play music tracks and scrolling text
that describes track.
I intend to have a forward and back button to load these files into my main
flash file as a track list being controlled by a forward and backward buttons.
Also a stop and play button.
I can load one file in using the

on (release) {
loadMovieNum("audio/140_Track.swf", 50);

but how do I use actionscript to switch tracks being played in a orderly
fashion. And have the control of stopping and starting the tracks
Re: media control L_ogistics
3/18/2006 7:55:15 PM
Is there anyone that knows or point the direction the actionscript I would use
to load swf files being used to load sound tracks into a flash movie that
contains a forward and rewind button to control the swf files. I can easily
load in 1 movie and use the (unloadmovie) script to unload it but what about
the rest.
Re: Help! if any 1 can media control Wolf van Ween
3/19/2006 12:00:00 AM
It can be done with your tracks loaded into different levels by loadMovieNum.
For instance, the code to stop the one you load in your code above would be
simply
level50.stop(); and you play it again with level50.play(); You can set the
fast forward button to skip 10 frames with
on(release){ level50.gotoAndPlay(level50._currentframe+10);}

Having said all that, I think it would be easier if you don't use loadMovieNum
but the MovieClipLoader class. Reason being that it allows you better control
whether a movie is already loaded fully etc.

Cheers,
Wolf
Re: Help! if any 1 can media control L_ogistics
3/19/2006 4:04:45 AM
Re: Help! if any 1 can media control L_ogistics
3/20/2006 1:31:24 PM
Thanks for that it's put me on the right path i think. But im having problems
loading in my swf's into an array you could'nt explain more this area.
Remember im a junior member if that so my knowledge of actionscript is still
growing
Re: Help! if any 1 can media control Wolf van Ween
3/20/2006 2:48:27 PM
Ok, what did I mean with this array? You construct your movieClips in the old
way, using either attachMovie (using symbols already in the library) or
createEmptyMovieClip and then loadMovie (using external content). But, you save
a reference to each of these clips in an array. This enables you to change
these movieClip's parameters or call their methods later with a much easier
syntax. You don't have to remember what was their name, who was their parent
and so on.
Have a look at the attached (pretty useless) example. It takes 3 symbols from
the library (called "Symbol0"...), and attaches them to root with a new name
("_root.0_mc"...). Later I can easily change their position using the area
reference, as you can see. I don't need to construct their names again like in
the attachMovie call.
I guess you can see how that makes loops and so much easier to write and read.
You can of course also write movieArr.gotoAndPlay("intro"); and so on.
Hope that helps
Wolf

var movieArr:Array = new Array(3);
for(i=0;i<=2;i++) {
movieArr[i] = _root.attachMovie("Symbol"+i,i+"_mc",i);
}
movieArr[0]._x = 200;
movieArr[2]._y = 300;
Re: Help! if any 1 can media control L_ogistics
4/12/2006 3:50:45 PM
Wats up wolf I have used ur method of an array but slightly modified and found
sucess.
I created an array on the first frrame

Tracks = new Array()
Tracks = "audio/140Track.swf"
Tracks = "audio/GhettoMoon.swf"
Tracks = "audio/LondonTing.swf"
Tracks = "audio/LondonUnited.swf"

then on my media controls I placed:
on(release)
{if (i<4) {
i = i+1;}
else {
i=0; }
loadMovieNum(Tracks,99);
}
The other controls(buttons) had similar code.
This works lovely thanks alot for that mate helped me a treat
AddThis Social Bookmark Button