Home
> FlashEff 2.0
> Topic
Show Delay not working after loop
Posted by user1580680
Show Delay not working after loop August 04, 2013 04:03AM | Registered: 10 years ago Posts: 5 |
The Show delay works on first load, and after Hide transitions, the Show transition starts immediately with no delay. What gives?
I'm looping these Show/Hide transitions in as3 using this code:
// Import the necessary classes.
import com.jumpeye.Events.FLASHEFFEvents;
import com.jumpeye.flashEff2.symbol.squareEffect.FESSquareFade;
// Create the FlashEff2Code instance and add it to the stage. The FlashEff2Code
// component must be in the display list in order for it to work.
var effect:FlashEff2Code = new FlashEff2Code();
effect.addEventListener(FLASHEFFEvents.TRANSITION_END, replay);
addChild(effect);
// Create the show pattern instance (FESBrightSquares) and set it
// so the effect looks as you like.
var showEffect:FESSquareFade = new FESSquareFade();
showEffect.squareWidth = 270;
showEffect.squareHeight = 270;
showEffect.preset = 19; // random
showEffect.tweenDuration = 2;
// Create the hide pattern instance (FESSquareFade) and set it
// so the effect looks as you like.
var hideEffect:FESSquareFade = new FESSquareFade();
hideEffect.squareWidth = 270;
hideEffect.squareHeight = 270;
hideEffect.preset = 16; // random
hideEffect.tweenDuration = 2;
// Assign the show and hide transitions to the FlashEff2Code instance.
effect.showTransition = showEffect;
effect.hideTransition = hideEffect;
// There will be a 3 seconds pause between the show and hide transitions.
effect.showDelay = 6;
effect.hideDelay = 2;
// Set the target object to the FlashEff2Code instance. Once you do this,
// the show effect will start immediately (except the case when the
// show effect has a delay too).
effect._targetInstanceName = "pink_loop";
// When the "hide" transition ends, start the show effect again.
function replay(evt:FLASHEFFEvents):void {
if (effect.currentTransitionType == "hide")
effect.show();
}
I tried referencing the showDelay again with no luck, see below:
function replay(evt:FLASHEFFEvents):void {
if (effect.currentTransitionType == "hide")
effect.show();
effect.showDelay = 6;
}
I'm looping these Show/Hide transitions in as3 using this code:
// Import the necessary classes.
import com.jumpeye.Events.FLASHEFFEvents;
import com.jumpeye.flashEff2.symbol.squareEffect.FESSquareFade;
// Create the FlashEff2Code instance and add it to the stage. The FlashEff2Code
// component must be in the display list in order for it to work.
var effect:FlashEff2Code = new FlashEff2Code();
effect.addEventListener(FLASHEFFEvents.TRANSITION_END, replay);
addChild(effect);
// Create the show pattern instance (FESBrightSquares) and set it
// so the effect looks as you like.
var showEffect:FESSquareFade = new FESSquareFade();
showEffect.squareWidth = 270;
showEffect.squareHeight = 270;
showEffect.preset = 19; // random
showEffect.tweenDuration = 2;
// Create the hide pattern instance (FESSquareFade) and set it
// so the effect looks as you like.
var hideEffect:FESSquareFade = new FESSquareFade();
hideEffect.squareWidth = 270;
hideEffect.squareHeight = 270;
hideEffect.preset = 16; // random
hideEffect.tweenDuration = 2;
// Assign the show and hide transitions to the FlashEff2Code instance.
effect.showTransition = showEffect;
effect.hideTransition = hideEffect;
// There will be a 3 seconds pause between the show and hide transitions.
effect.showDelay = 6;
effect.hideDelay = 2;
// Set the target object to the FlashEff2Code instance. Once you do this,
// the show effect will start immediately (except the case when the
// show effect has a delay too).
effect._targetInstanceName = "pink_loop";
// When the "hide" transition ends, start the show effect again.
function replay(evt:FLASHEFFEvents):void {
if (effect.currentTransitionType == "hide")
effect.show();
}
I tried referencing the showDelay again with no luck, see below:
function replay(evt:FLASHEFFEvents):void {
if (effect.currentTransitionType == "hide")
effect.show();
effect.showDelay = 6;
}
Re: Show Delay not working after loop August 04, 2013 09:12AM | Registered: 10 years ago Posts: 5 |
Re: Show Delay not working after loop August 04, 2013 09:32AM | Registered: 10 years ago Posts: 5 |
Sorry, you do not have permission to post/reply in this forum.