FORUMS: list search recent posts

getURL within movie clip after MP3 animation finishes

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Julie MacKenzie
getURL within movie clip after MP3 animation finishes
on Feb 7, 2010 at 7:02:45 am

Please help if you can...!

I have an equalizer animation in flash that plays with an MP3 file. On the stage is a movie clip with an instance name of "flashAmp". The #include file is a text file that calls on the MP3 file name and thats all.

What I need to do is get the animation to link to/redirect to the index.html page after the MP3 has finished playing. I have tried the stop action and getURL action in many different ways and different keyframes, but I cant seem to get the index.html to load AFTER the MP3 track ends.

Here is the code to the movie clip (the only place where there is action script in the flash file). What am I doing wrong??

onClipEvent (load) {
//This is the only line of code you probably need to change.
//Type in the name of the txt file output by FlashAmp.

#include "collage.txt"


//hides the controller.
_visible = false;
//sets up a sound object, loads the .mp3 file and starts the sound.
this.faTrack = new Sound();
//use attachSound if the sound is in the library and linked.
//use loadSound if the sound is an external .mp3.
//ie comment out one of the next 2 lines.
this.faTrack.loadSound(faFile, true);
//following is a list of variables you can use from the include file.

onClipEvent (enterFrame) {
//works out where the sound is up to in terms of frames.
gFrame = Math.floor((this.faTrack.position/50000)*fps);
//vol = the fraction of volume to adjust the spectrum values.
vol = this.faTrack.getVolume() / 100;

//sets the variables at the root level for every band.
for(i=0; i < numBands; i++) {
if(stereo == 1){
//if stereo sets _root.gAmpLeft0, _root.gAmpLeft1, _root.gAmpRight0, _root.gAmpRight1 etc
set("_root.gAmpLeft" + i, spectrumLeft[gFrame][i] * vol );
set("_root.gAmpRight" + i, spectrumRight[gFrame][i] * vol );
//if mono sets _root.gAmp0, _root.gAmp1, _root.gAmp2, _root.gAmp3 etc
set("_root.gAmp" + i, spectrum[gFrame][i] * vol);

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved