Flex / FlashEff2 - FES3DCamSquareFocus issue

Posted by marianvasile 
Flex / FlashEff2 - FES3DCamSquareFocus issue
December 03, 2009 11:40PM
First of all congratulations for this amazing product!

I've been playing with effects and I ran into a small snag -- if I try to apply FES3DCamSquareFocus to a relatively large image (650x397px) the effect would not run. I've tried lower rez with scale=true, and it seems to be working for a couple of cycles with 300x257 after which the image disappears.

Is there a limit to the resolution of the images used with FlashEff2? Or should I check the jpeg export params?
Just need a hint where to look for troubleshooting this (both FlashPlayer 9 and 10 fail, on Mac OS / Safari, Firefox and Win 7 / IE / Firefox).

Here's my code to replicate this issue: the current rez allows for 2 or 3 cycles to run, after which the effect breaks and nothing gets displayed. If you change rez to 650 x 397 the effect won't run at all or will display the first couple of frame.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="[www.adobe.com]; layout="absolute" creationComplete="init()" frameRate="30">
<mx:Image width="300" height="257" source="101ideas.jpg" id="myImage" autoLoad="true" scaleContent="true" complete="loadComplete()" x="100" y="100"/>
<mx:Script>
<![CDATA[
import com.jumpeye.flashEff2.symbol.fe3D.camSquareFocus.FES3DCamSquareFocus;
import mx.effects.Effect;
import FlashEff2Flex;
import com.jumpeye.flashEff2.symbol.fe3D.camSquareFocus.FES3DCamSquareFocus;
import com.jumpeye.flashEff2.symbol.equalizer.FESEqualizer;
import com.jumpeye.Events.FLASHEFFEvents;
private var myEffect:FlashEff2Flex;
private var showEffect:FES3DCamSquareFocus;
private var hideEffect:FESEqualizer;
private function loadComplete():void {
myEffect = new FlashEff2Flex();
myEffect.hideDelay = 3;
myEffect.addEventListener(FLASHEFFEvents.TRANSITION_END, restartShowEffect);
showEffect = new FES3DCamSquareFocus();
showEffect.preset = 14;
showEffect.squareWidth = 40;
showEffect.squareHeight = 40;
showEffect.tweenDuration = 3;
showEffect.tweenType = 'Strong';
showEffect.easeType = 'easeInOut';
myEffect.showTransition = showEffect;
hideEffect = new FESEqualizer();
hideEffect.equalizerPercentage = 50;
hideEffect.tweenDuration = 2;
myEffect.hideTransition = hideEffect;
// The FlashEff2Flex instance MUST be added to the display list
// before setting the target object.
addChild(myEffect);
myEffect._targetInstanceName = "myImage";
}

private function restartShowEffect(evt:FLASHEFFEvents):void {
// Once the hide transition has endded, restart the show transition.
var effectInstance:FlashEff2Flex = evt.target as FlashEff2Flex;
if (effectInstance.currentTransitionType == "hide")
effectInstance.show();
}
]]>
</mx:Script>
</mx:Application>
Re: Flex / FlashEff2 - FES3DCamSquareFocus issue
December 04, 2009 01:12AM
Troubleshooting: it appears that the actual screen coordinates of the image are the main factor causing the effect to break. I have successfully applied the effect on 650x397 px image, with just changing x and y on this line:

<mx:Image width="650" height="397" source="101ideas.jpg" id="myImage" autoLoad="true" scaleContent="true" complete="loadComplete()" x="400" y="400"/>
Re: Flex / FlashEff2 - FES3DCamSquareFocus issue
December 04, 2009 03:54PM
marianvasile,

It seems that issue is somehow related to the preset "parameter" when it is set to "random" 14. Please try to use another preset and let me know if that issue persists. Thank you.
Re: Flex / FlashEff2 - FES3DCamSquareFocus issue
December 04, 2009 09:58PM
I've tried all presets down from 14 to 1. The presets 10 and 4 worked fine, all others failed immediately or after drawing a few animation frames. The only change I could make to have these other presets work was to set the display coords in the center of the screen, instead of (x,y) (100,100). See the troubleshooting info in my previous post.
Re: Flex / FlashEff2 - FES3DCamSquareFocus issue
December 16, 2009 01:51AM
Thank you benji for the solution to this issue (see solution thread in Flex forum here: [www.flasheff.com])
Sorry, you do not have permission to post/reply in this forum.