Home
> FlashEff 2.0 Flex
> Topic
Compatible with Flex 4.5?
Posted by krumedia
Compatible with Flex 4.5? May 18, 2011 08:04PM | Registered: 13 years ago Posts: 25 |
Re: Compatible with Flex 4.5? May 19, 2011 11:37AM | Admin Registered: 16 years ago Posts: 547 |
I'm not sure if there will be another update in the near future, but there will be a new flasheff version (FlashEff 3.0) at the end of the year or in the beginning of the next year.
Anyway the package was already updated for version 4,so it's strange that it doesn't work with in 4.5. Perhaps you don't have the updated package, therefore try to download it again and see if the problem is still there.
Anyway the package was already updated for version 4,so it's strange that it doesn't work with in 4.5. Perhaps you don't have the updated package, therefore try to download it again and see if the problem is still there.
Re: Compatible with Flex 4.5? May 20, 2011 08:42PM | Registered: 13 years ago Posts: 25 |
Re: Compatible with Flex 4.5? May 24, 2011 08:35AM | Admin Registered: 16 years ago Posts: 547 |
Re: Compatible with Flex 4.5? June 01, 2011 09:33AM | Registered: 13 years ago Posts: 25 |
Re: Compatible with Flex 4.5? June 02, 2011 12:47PM | Admin Registered: 16 years ago Posts: 547 |
Unfortunately, we can't give you the source code. However try to set the target only after ADDED_TO_STAGE event triggers.
See this [screencast.com]
See this [screencast.com]
Re: Compatible with Flex 4.5? June 26, 2011 03:10AM | Registered: 14 years ago Posts: 3 |
I'm also in 4.5 and hoping to use the text patterns. All the symbol patterns work for me, but not the text patterns. I set the ADDED_TO_STAGE code like your screenshot suggested, and the instance was definitely added to stage before setting the target, but still nothing showed up. FLASHEFFEvents.TRANSITION_END was triggered, so I assume something is happening, but it's not visible.
Re: Compatible with Flex 4.5? June 29, 2011 07:14AM | Registered: 14 years ago Posts: 1 |
Re: Compatible with Flex 4.5? June 29, 2011 09:41AM | Admin Registered: 16 years ago Posts: 547 |
Re: Compatible with Flex 4.5? July 05, 2011 02:19AM | Registered: 12 years ago Posts: 2 |
I think we should be provided a solution to this. How would you make us wait until the end of year for a product we purchased? One of your developers should spend a day or two fixing the problem so everyone can use this with flash builder 4.5. I'm also pretty sure it's not something difficult to fix.
Here is my code: I don't even apply any filters or effects and still get a blank stage.
Edited 2 time(s). Last edit at 07/05/2011 02:22AM by user818901.
Here is my code: I don't even apply any filters or effects and still get a blank stage.
<?xml version="1.0" encoding="utf-8"?> <s:View xmlns:fx="[ns.adobe.com]; xmlns:s="library://ns.adobe.com/flex/spark" actionBarVisible="false" tabBarVisible="false"> <s:Image id="Testme" x="291" y="158" width="48" height="48" source="res/folder.png" complete="loadComplete()" name="Testme"/> <fx:Script> <![CDATA[ import FlashEff2Flex; import com.jumpeye.flashEff2.filter.dropShadow.FEFDropShadow; import com.jumpeye.flashEff2.filter.reflection.FEFReflection; import mx.core.UIComponent; private function loadComplete():void { var fe:FlashEff2Flex = new FlashEff2Flex(); fe.showAutoPlay = true; addElement(fe); fe._targetInstanceName ="Testme"; } ]]> </fx:Script> </s:View>
Edited 2 time(s). Last edit at 07/05/2011 02:22AM by user818901.
Re: Compatible with Flex 4.5? July 05, 2011 06:49PM | Registered: 12 years ago Posts: 3 |
I see you are trying to use this in a Spark View. I believe your issue and mine may be related. I am running an effect in a Spark TitleWindow that pops up via the PopUp Manager. The same code runs fine in the root application.
For a running example with view source enabled see this post.
You might try running your code in the root application to see if it runs any differently.
For a running example with view source enabled see this post.
You might try running your code in the root application to see if it runs any differently.
Re: Compatible with Flex 4.5? July 05, 2011 06:54PM | Registered: 12 years ago Posts: 2 |
I got it working yesterday. Thanks guys! I found an example that helped.
Here is my working code:
Edited 1 time(s). Last edit at 07/05/2011 06:56PM by user818901.
Here is my working code:
<?xml version="1.0" encoding="utf-8"?> <s:View xmlns:fx="[ns.adobe.com]; xmlns:s="library://ns.adobe.com/flex/spark" actionBarVisible="false" tabBarVisible="false"> <s:Image id="Testme" x="291" y="158" width="48" height="48" complete="loadComplete()" name="Testme" rotationX="0" source="res/folder.png"/> <fx:Script> <![CDATA[ import FlashEff2Flex; import com.jumpeye.flashEff2.filter.dropShadow.FEFDropShadow; import com.jumpeye.flashEff2.filter.reflection.FEFReflection; import com.jumpeye.flashEff2.symbol.sparkle.FESSparkle; import mx.core.UIComponent; private var fe:FlashEff2Flex; private function loadComplete():void { setStyle("backgroundColor",0x000000); fe = new FlashEff2Flex(); fe.addEventListener(Event.ADDED_TO_STAGE,init); addElement(fe); var pattern0:FESSparkle = new FESSparkle(); pattern0.preset=3; pattern0.maximumParticleSize=4; pattern0.maximumParticleSpread=50; pattern0.particleDiversity=30; pattern0.particleEmissionInterval=0.3; pattern0.particleTweenDuration=1; pattern0.glowAmount=20; pattern0.glowColor=16777215; pattern0.emitterSize=0; pattern0.tweenDuration=1.5; pattern0.tweenType='Strong'; pattern0.easeType='easeInOut'; fe.showTransition=pattern0; } private function init(event:Event):void{ fe._targetInstanceName ="Testme"; } ]]> </fx:Script> </s:View>
Edited 1 time(s). Last edit at 07/05/2011 06:56PM by user818901.
Re: Compatible with Flex 4.5? October 26, 2011 06:31PM | Registered: 13 years ago Posts: 2 |
Hi,
I'm trying to create a Text effect on Flex 4.5 for a label.
Did someone make it work? could share an example code?
I tryed all code combinations i could imagine and have never been able to animate any text.
Tried with the last cost posted, uning my text animation, but didn't worked either. It gets inside the ADDED_TO_STAGE init function, but my text still stays there, as static as allways...:(
I thought i bought this software just for do this :(
At least i see i'm not alone...but knowing programmers are busy with another projects makes me wanna look for an "immediate refund" button around the site :S that won't stop me from loosing my project and my client anyway..
Thank you
David
I'm trying to create a Text effect on Flex 4.5 for a label.
Did someone make it work? could share an example code?
I tryed all code combinations i could imagine and have never been able to animate any text.
Tried with the last cost posted, uning my text animation, but didn't worked either. It gets inside the ADDED_TO_STAGE init function, but my text still stays there, as static as allways...:(
I thought i bought this software just for do this :(
At least i see i'm not alone...but knowing programmers are busy with another projects makes me wanna look for an "immediate refund" button around the site :S that won't stop me from loosing my project and my client anyway..
Thank you
David
Re: Compatible with Flex 4.5? October 27, 2011 11:27AM | Admin Registered: 16 years ago Posts: 547 |
David,
Did you take a look at this post as well [www.flasheff.com] ? The solution from there surely should work even though you are trying to apply the effect on a textfield instead of an image.
Did you take a look at this post as well [www.flasheff.com] ? The solution from there surely should work even though you are trying to apply the effect on a textfield instead of an image.
Re: Compatible with Flex 4.5? November 24, 2011 07:55PM | Registered: 13 years ago Posts: 25 |
It seems Flasheff 2.0 does not work with the new text layout engine of Flash Player 10+. Therefore we have to work with the old TextField class.
You have to embed the font having the option embedAsCFF turned off.
You have to embed the font having the option embedAsCFF turned off.
// FlashEff2 setup myFlashEff2.target = myOldTextField.textField;
public class OldTextField extends UIComponent // or SpriteVisualElement??? { private static const FREAKING_PADDING:Number = 2; private var _textField:TextField; public function get textField():TextField { return _textField; } public function get htmlText():String { return _textField.htmlText; } public function set htmlText(value:String):void { _textField.htmlText = value == null ? "" : value; } public function OldTextField() { _textField = new TextField(); _textField.multiline = true; _textField.wordWrap = true; _textField.embedFonts = true; _textField.selectable = false; _textField.mouseEnabled = false; _textField.antiAliasType = AntiAliasType.ADVANCED; _textField.gridFitType = GridFitType.PIXEL; var textFormat:TextFormat = new TextFormat(); textFormat.font = "Verdana"; textFormat.color = 0xff0000; textFormat.rightMargin = 2; textFormat.size = 12; _textField.defaultTextFormat = textFormat; addChild(_textField); } override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth, unscaledHeight); _textField.x = -FREAKING_PADDING; _textField.y = -FREAKING_PADDING; _textField.width = unscaledWidth + FREAKING_PADDING + FREAKING_PADDING; _textField.height = unscaledHeight + FREAKING_PADDING + FREAKING_PADDING; } }
Re: Compatible with Flex 4.5? January 07, 2012 06:14AM | Registered: 12 years ago Posts: 5 |
Re: Compatible with Flex 4.5? January 07, 2012 11:15PM | Registered: 12 years ago Posts: 5 |
Re: Compatible with Flex 4.5? January 10, 2012 06:31AM | Registered: 12 years ago Posts: 5 |
The fonts have to be embedded (as pointed out to me by Florin). I managed to get the following code to work (embedded the fonts in two ways both of which work):
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="[www.adobe.com]; layout="absolute" xmlns:ns1="*" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#FFFFFF, #FFFFFF]">
<mx:Button x="186" y="60" label="JumpEyeTest1" id="JumpEyeBtn1" click="onJumpEyeTest1()"/>
<mx:Button x="356" y="60" label="JumpEyeTest2" id="JumpEyeBtn2" click="onJumpEyeTest2()"/>
<mx:Style>
@font-face {
src: url("../libs/Arial.ttf");
fontFamily: Arial;
advancedAntiAliasing:true;
}
.myStyle{
fontFamily: Arial;
fontSize:52pt;
}
</mx:Style>
<mx:Script>
import mx.core.UITextFormat;
import mx.core.UITextField;
import mx.messaging.AbstractConsumer;
import mx.managers.PopUpManager;
import mx.containers.Box;
import mx.effects.Move;
import mx.effects.Glow;
import mx.effects.Fade;
import mx.effects.Parallel;
import mx.effects.Zoom;
import FlashEff2Flex;
import com.jumpeye.Events.FLASHEFFEvents;
import com.jumpeye.flashEff2.text.magneticWind.FETMagneticWind;
public var fe:FlashEff2Flex;
[Embed(source='../libs/verdana.ttf',
fontName='Verdana',
mimeType='application/x-font'
)]
public var font1:Class;
private function onJumpEyeTest1():void{
var movieTitle:UITextField;
var txtFormat:UITextFormat;
movieTitle = new UITextField();
movieTitle.embedFonts=true;
movieTitle.x= 200;
movieTitle.y=200;
movieTitle.width = 200;
movieTitle.text = "TRY TO TEST THIS";
movieTitle.textColor=0;
txtFormat= new UITextFormat(this.systemManager);
var myFont:Font = new font1();
txtFormat.font= myFont.fontName;
var b1:Boolean = Application.application.systemManager.isFontFaceEmbedded(txtFormat);
movieTitle.setTextFormat(txtFormat);
movieTitle.defaultTextFormat=txtFormat;
fe = new FlashEff2Flex();
fe.addEventListener(FLASHEFFEvents.INIT, eventInit);
fe.addEventListener(Event.ADDED_TO_STAGE, stageInit);
fe.showAutoPlay=true;
fe.visible=true;
this.addChild(movieTitle);
this.addChild(fe);
var showEffect:FETMagneticWind = new FETMagneticWind();
showEffect.randomX = 200;
showEffect.randomY = 50;
showEffect.groupDuration = 1.5;
showEffect.tweenDuration = 2;
fe.target = movieTitle;
fe.showTransition=showEffect;
fe.show();
}
private function onJumpEyeTest2():void{
var movieTitle:UITextField;
var txtFormat:UITextFormat;
movieTitle = new UITextField();
movieTitle.embedFonts=true;
movieTitle.x= 200;
movieTitle.y=250;
movieTitle.width = 200;
movieTitle.text = "TRY TO TEST THIS";
movieTitle.textColor=0;
txtFormat= new UITextFormat(this.systemManager);
txtFormat.font= "Arial";
var b1:Boolean = Application.application.systemManager.isFontFaceEmbedded(txtFormat);
movieTitle.setTextFormat(txtFormat);
fe = new FlashEff2Flex();
fe.addEventListener(FLASHEFFEvents.INIT, eventInit);
fe.addEventListener(Event.ADDED_TO_STAGE, stageInit);
fe.showAutoPlay=true;
fe.visible=true;
this.addChild(movieTitle);
this.addChild(fe);
var showEffect:FETMagneticWind = new FETMagneticWind();
showEffect.randomX = 200;
showEffect.randomY = 50;
showEffect.groupDuration = 1.5;
showEffect.tweenDuration = 2;
fe.target = movieTitle;
fe.showTransition=showEffect;
fe.show();
}
private function eventInit():void{
}
private function stageInit(event:Event):void{
}
</mx:Script>
</mx:Application>
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="[www.adobe.com]; layout="absolute" xmlns:ns1="*" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#FFFFFF, #FFFFFF]">
<mx:Button x="186" y="60" label="JumpEyeTest1" id="JumpEyeBtn1" click="onJumpEyeTest1()"/>
<mx:Button x="356" y="60" label="JumpEyeTest2" id="JumpEyeBtn2" click="onJumpEyeTest2()"/>
<mx:Style>
@font-face {
src: url("../libs/Arial.ttf");
fontFamily: Arial;
advancedAntiAliasing:true;
}
.myStyle{
fontFamily: Arial;
fontSize:52pt;
}
</mx:Style>
<mx:Script>
import mx.core.UITextFormat;
import mx.core.UITextField;
import mx.messaging.AbstractConsumer;
import mx.managers.PopUpManager;
import mx.containers.Box;
import mx.effects.Move;
import mx.effects.Glow;
import mx.effects.Fade;
import mx.effects.Parallel;
import mx.effects.Zoom;
import FlashEff2Flex;
import com.jumpeye.Events.FLASHEFFEvents;
import com.jumpeye.flashEff2.text.magneticWind.FETMagneticWind;
public var fe:FlashEff2Flex;
[Embed(source='../libs/verdana.ttf',
fontName='Verdana',
mimeType='application/x-font'
)]
public var font1:Class;
private function onJumpEyeTest1():void{
var movieTitle:UITextField;
var txtFormat:UITextFormat;
movieTitle = new UITextField();
movieTitle.embedFonts=true;
movieTitle.x= 200;
movieTitle.y=200;
movieTitle.width = 200;
movieTitle.text = "TRY TO TEST THIS";
movieTitle.textColor=0;
txtFormat= new UITextFormat(this.systemManager);
var myFont:Font = new font1();
txtFormat.font= myFont.fontName;
var b1:Boolean = Application.application.systemManager.isFontFaceEmbedded(txtFormat);
movieTitle.setTextFormat(txtFormat);
movieTitle.defaultTextFormat=txtFormat;
fe = new FlashEff2Flex();
fe.addEventListener(FLASHEFFEvents.INIT, eventInit);
fe.addEventListener(Event.ADDED_TO_STAGE, stageInit);
fe.showAutoPlay=true;
fe.visible=true;
this.addChild(movieTitle);
this.addChild(fe);
var showEffect:FETMagneticWind = new FETMagneticWind();
showEffect.randomX = 200;
showEffect.randomY = 50;
showEffect.groupDuration = 1.5;
showEffect.tweenDuration = 2;
fe.target = movieTitle;
fe.showTransition=showEffect;
fe.show();
}
private function onJumpEyeTest2():void{
var movieTitle:UITextField;
var txtFormat:UITextFormat;
movieTitle = new UITextField();
movieTitle.embedFonts=true;
movieTitle.x= 200;
movieTitle.y=250;
movieTitle.width = 200;
movieTitle.text = "TRY TO TEST THIS";
movieTitle.textColor=0;
txtFormat= new UITextFormat(this.systemManager);
txtFormat.font= "Arial";
var b1:Boolean = Application.application.systemManager.isFontFaceEmbedded(txtFormat);
movieTitle.setTextFormat(txtFormat);
fe = new FlashEff2Flex();
fe.addEventListener(FLASHEFFEvents.INIT, eventInit);
fe.addEventListener(Event.ADDED_TO_STAGE, stageInit);
fe.showAutoPlay=true;
fe.visible=true;
this.addChild(movieTitle);
this.addChild(fe);
var showEffect:FETMagneticWind = new FETMagneticWind();
showEffect.randomX = 200;
showEffect.randomY = 50;
showEffect.groupDuration = 1.5;
showEffect.tweenDuration = 2;
fe.target = movieTitle;
fe.showTransition=showEffect;
fe.show();
}
private function eventInit():void{
}
private function stageInit(event:Event):void{
}
</mx:Script>
</mx:Application>
Sorry, you do not have permission to post/reply in this forum.