Banner Click

Posted by user781136 
Banner Click
June 08, 2011 11:12PM
Hi have created a banner looping but I cannot click on it while the transition is active or in a pause state which is 70 % of the time.

Is there something I can ad to my action script that will allow the click to complete at any stage of the transition.
fusion_btn.addEventListener(MouseEvent.CLICK, callLink);
function callLink(event:MouseEvent):void { 
  var url:String = "[www.xxx];;
  var request:URLRequest = new URLRequest(url);
  try {
    navigateToURL(request, '_blank');
  } catch (e:Error) {
    trace("Error occurred!"); 
  }
}



// Import the necessary classes.
import FlashEffNano;
import com.jumpeye.events.FlashEffNanoEvent;
import com.jumpeye.flashEffNano.symbol.FENSSquares;
import com.jumpeye.flashEffNano.symbol.FENSStripes;
// Create the FlashEffNano instance and add it to the stage. The FlashEffNano

// component must be in the display list in order for it to work.
var effect:FlashEffNano = new FlashEffNano();
effect.addEventListener(FlashEffNanoEvent.TRANSITION_END, replay);
// Automatically start the show and hide effects.
effect.showAutoPlay = true;
effect.hideAutoPlay = true;
addChild(effect);
// Set the target object to the FlashEffNano instance. This has to be done
// ONLY AFTER the FlashEffNano component instance has been added to the
// display list.
effect._targetInstanceName = "myImage";
// There will be a 3 seconds pause between the show and hide transitions.
effect.hideDelay = 4;
// Create the show pattern instance (FENSSquares) and set it
// so the effect looks as you like.
var showEffect:FENSSquares = new FENSSquares();
showEffect.squareWidth = 30;
showEffect.squareHeight = 30;
showEffect.offsetRotation = 0; // squares are not tilted
showEffect.tweenDuration = 2;
// Create the hide pattern instance (FENSStripes) and set it
// so the effect looks as you like.
var hideEffect:FENSStripes = new FENSStripes();
hideEffect.stripeThickness = 15;
hideEffect.preset = 3; // T2B
hideEffect.tweenDuration = 3;
// Set the two effect patterns for the show and hide effects on
// the FlashEffNano component instance.
effect.setTransition(showEffect, "show");
effect.setTransition(hideEffect, "hide");
// When the "hide" transition ends, start the show effect again.
function replay(evt:FlashEffNanoEvent):void {
if (evt.currentTransitionType == "hide") {
// Once the show and hide effect have been set on the component
// using
// FlashEffNano.setTranstion() or
// FlashEffNano.setTransitionByName(),
// you can start the show or hide effects simply by calling the
// FlashEffNano.show() and FlashEffNano.hide() methods.
effect.show();
}
}

Re: Banner Click
June 09, 2011 06:07AM
Probably that happens because "fusion_btn" is at a lower level than the animated content.
Try to add it at the top level and see it it works. If it doesn't please open a ticket and attach the fla file, so that I can take a look at it.
Sorry, you do not have permission to post/reply in this forum.