Home
> FlashEff 2.0 Flex
> Topic
How to make a slideshow with FlashEff2 Flex?
Posted by wbpepo
How to make a slideshow with FlashEff2 Flex? July 22, 2011 12:03PM | Registered: 15 years ago Posts: 1 |
I'll like the effects of FlashEff2 and I'm trying to make nice transitions between 3 images using FlashEff2 for Flex. Kind of a slideshow.
One image with show- and hide transitions works well.
However, how to apply Flash2Eff - effects so one image transfers nicely in another?
I've tried
1. one FlashEff2 effect, and in the transition-end handler change the target of the effect instance to a new image. No luck.
2. for each image, when loaded, trying to attach a new FlashEff2 effect. No luck.
Does someone has some snippet code (Flex and/or AS3 code)?
Thanks,
Peter
One image with show- and hide transitions works well.
However, how to apply Flash2Eff - effects so one image transfers nicely in another?
I've tried
1. one FlashEff2 effect, and in the transition-end handler change the target of the effect instance to a new image. No luck.
2. for each image, when loaded, trying to attach a new FlashEff2 effect. No luck.
Does someone has some snippet code (Flex and/or AS3 code)?
Thanks,
Peter
Re: How to make a slideshow with FlashEff2 Flex? September 16, 2011 11:05AM | Registered: 13 years ago Posts: 25 |
There is a swap() method and you are able to influence the behaviour via the swapType property.
FlashEff2.SWAP_TYPE_SHOW for example allows you to create cross fading effects
FlashEff2.SWAP_TYPE_HIDE_AND_SHOW is for playing parallelly a hide transition on the "old" element and a swap/show transition on the "new" element.
This snippet demonstrates the use:
FlashEff2.SWAP_TYPE_SHOW for example allows you to create cross fading effects
FlashEff2.SWAP_TYPE_HIDE_AND_SHOW is for playing parallelly a hide transition on the "old" element and a swap/show transition on the "new" element.
This snippet demonstrates the use:
function setupEffect():void { ... effect.showAutoPlay = false; effect.hideAutoPlay = false; effect.showTransition = ... effect.hideTransition = ... effect.swapTransition = ... ... } function showNextImage(bitmapData:BitmapData):void { // Swap images currentImage = currentImage == image1 ? image2 : image1; currentImage.source = bitmapData; // Force validation of pending updates (imageContainer is a parent element of image1 and image2) imageContainer.validateNow(); if (effect.target == null) { // Always use a show transition for the first time effect.target = currentImage; effect.show(); } else { effect.swap(currentImage, FlashEff2.SWAP_TYPE_HIDE_AND_SHOW /* FlashEff2.SWAP_TYPE_SHOW */); } }
Re: How to make a slideshow with FlashEff2 Flex? December 14, 2011 08:38PM | Registered: 12 years ago Posts: 3 |
Sorry, you do not have permission to post/reply in this forum.