In a nutshell ... I have an eventListener on a particular movieClip that triggers the timeline to play when clicked.?This should play through a short tween, then hit another piece of actionscript in the last frame of that scene, which should take you to the next scene.?I also have an audio file loaded into a soundChannel, as well as a few timers that operate a click prompt over the movieClip already mentioned.?My bug is that if you click on said movieClip before the soundChannel is finished playing, all functions properly.?However, if you wait for the sound to finish, this initiates a few timers that cause a prompt to fade in, telling you to click on the movieClip.?If you click on it, still, everything works fine.?But once the timers complete their work, and the click prompt fades back out, the tweens do not operate properly.?If you then click on the movieClip, the timeline seems to play doubletime until coming to a stop() action in the next scene.
Check out the page at http://www.archildrens.org/scouting-out-surgery/
If anyone has any thoughts, they would be greatly appreciated!?I can provide code if it would help.
Thanks in advance for any help you might bring.
Tweens play too fast when jumping from...Anyone have any thoughts on what might be causing this??I am beating my head against the wall at this point.
Here is some AS 3 from the first scene of my .fla
stop();
//LOAD IN TRANSITION MUSIC
var transMusicReq:URLRequest = new URLRequest(''_Audio/_Music/FunTrans.mp3'');
var transMusic:Sound = new Sound();
transMusic.load(transMusicReq);
//ESTABLISH BUTTON HIGHLIGHT GLOW SETTINGS
var buttonHighlight:GlowFilter = new GlowFilter();
buttonHighlight.color = 0x006699;
buttonHighlight.alpha = 1;
buttonHighlight.blurX = 8;
buttonHighlight.blurY = 8;
buttonHighlight.quality = BitmapFilterQuality.MEDIUM;
//SET CHARACTERISTICS FOR SCOUT BUTTON
scout_mc1.buttonMode = true;
//CREATE TIMERS TO REGULATE FADING OF INFO BUBBLE UPON ROLLOVER OF SCOUT BUTTON
var bubbleOnTimer:Timer = new Timer(50, 10);
bubbleOnTimer.addEventListener(TimerEvent.TIMER, bubbleAnimateOn);
bubbleOnTimer.addEventListener(TimerEvent.TIMER_COMPLETE, bubbleTimerStart);
var bubbleTimer:Timer = new Timer(3000, 1);
bubbleTimer.addEventListener(TimerEvent.TIMER_COMPLETE, bubbleAnimateOff);
var bubbleOffTimer:Timer = new Timer(50, 10);
bubbleOffTimer.addEventListener(TimerEvent.TIMER, bubbleFadeOut);
bubbleOffTimer.addEventListener(TimerEvent.TIMER_COMPLETE, timersReset);
function bubbleAnimateOn(event:TimerEvent):void
{
infoBubble.alpha += .1;
}
function bubbleTimerStart(event:TimerEvent):void
{
bubbleTimer.start();
}
function bubbleAnimateOff(event:TimerEvent):void
{
bubbleOffTimer.start();
}
function bubbleFadeOut(event:TimerEvent):void
{
infoBubble.alpha -= .1;
}
function timersReset (event:TimerEvent):void
{
bubbleOnTimer.reset();
bubbleOffTimer.reset();
bubbleTimer.reset();
}
//SET ROLLOVER AND ROLLOUT BEHAVIORS FOR SCOUT BUTTON
scout_mc1.addEventListener(MouseEvent.ROLL_OVER, highlightScout);
function highlightScout(event:MouseEvent):void
{
scout_mc1.filters = [buttonHighlight];
bubbleOnTimer.start();
}
scout_mc1.addEventListener(MouseEvent.ROLL_OUT, unHighlightScout);
function unHighlightScout(event:MouseEvent):void
{
scout_mc1.filters = [];
}
//LOAD IN AND PLAY INITIAL WELCOME VOICE OVER UPON STARTING SWF PLAYBACK
var welcomeVoiceReq:URLRequest = new URLRequest(''_Audio/_VoiceOverFinal/SOS_VO1-1.mp3'');
var welcomeVoice:Sound = new Sound();
welcomeVoice.load(welcomeVoiceReq);
var channelWelcome:SoundChannel = new SoundChannel();
channelWelcome = welcomeVoice.play();
//ADD BEHAVIOR TO FADE ON SCOUT INFO BUBBLE AFTER WELCOME MESSAGE PLAYS
channelWelcome.addEventListener(Event.SOUND_COMPLETE, fadeOnInfo);
function fadeOnInfo(event:Event)
{
bubbleOnTimer.start();
}
//SET onCLICK BEHAVIOR
scout_mc1.addEventListener(MouseEvent.CLICK, onScoutClick);
function onScoutClick(event:MouseEvent):void
{
scout_mc1.removeEventListener(MouseEvent.ROLL_OVER, highlightScout);
scout_mc1.removeEventListener(MouseEvent.ROLL_OUT, unHighlightScout);
scout_mc1.removeEventListener(MouseEvent.CLICK, onScoutClick);
bubbleOnTimer.stop();
bubbleOffTimer.stop();
bubbleTimer.stop();
infoBubble.alpha = 0;
channelWelcome.stop();
transMusic.play();
play();
scout_mc2.gotoAndPlay(''sitToStand'');
}
Any thoughts on what I might be doing wrong here?
Tweens play too fast when jumping from...Okay ... any experts out there want to take a crack at this one??I am still trying to troubleshoot, but I'm really banging my head against a wall here.
No comments:
Post a Comment