Flash Track controller
- Started
- Last post
- 5 Responses
- hUtCh
Easy for some I'm sure. I've got to present a 'working' intro tomorrow for a CD Rom. I have three music variations and would like a simple 'select a track' at the beginning.
Flashkit seems to only offer the loading of external swfs which isn't an option for me.
I also need the selected track to remain silent until a certain point in the demo. ie: two scenes after the track has been initially selcted.
Any ideas? I'm sure there's an easy(ish) solution.
- hUtCh0
I'll get my P45 on my way out then...
- Stylus0
dude I'll help you out just give us a sec
- spiralstarez0
Totally simple...
There are many ways to accomplish this but just store it in a variable...
So something like this would go on the track buttons:
on (release) {
_path.variableName = this._name;
}you give each of the buttons for each of the songs each a different instanceName and then when it is clicked the variable becomes the instanceName of button 1,2, or 3 depending on which is clicked.
Then later in your timeline you just call the variable with whatever command to get it playing:
play(_path.variableName);
Then if you don't want to put the tracks in a movieclip you can just use the linkage properties from the library
- Stylus0
dude do this >>
have 3 buttons one for each track with this code
on (press){
selectedTrack="track1"
}
change the string to track 2 and 3 respectively.
>>
then when it gets to where you want to play them hae this code>>
myTrack=new Sound ()
myTrack.attachSound (selectedTrack)
myTrack.start (0,9999)
>>
In the library have the tracks linked with the identifiers "track1" "track2" etc
do you get it?