Repositioning Text animation on a loop

Posted by andy2099 
Repositioning Text animation on a loop
November 01, 2012 03:39PM
Hi,

I am trying to reposition myText:TextField and resizing it when it loops. Unfortunately, this does not work. Do you have any solutions for me?

Basically, the text I have is drawn from an XML - and i would like it to reposition base on the x and y coordinate I give in the xml file. Within the loop, I state myText.x and myText.y , however these commands dont appear to have any effect.

Please help.

PS: Does Flasheff work on iphone app?
Re: Repositioning Text animation on a loop
November 05, 2012 12:54PM
Try to reposition the flasheff instance which is used for applying the effect on your text instead of the textfield itself.
eg effect.x=14 and effect.y=120
effect->flasheff's instance name
FlashEff is a flash component so it only work in adobe flash cs and the swf files generated only works on devices that are supporting flash player.
Re: Repositioning Text animation on a loop
November 05, 2012 08:06PM
This works!
New problem : Some multiline text loaded from the xml does not show the whole paragraph on effect.show ...only when effect.hide plays , can you see the full paragraph for an instant.

Any ideas?

Ps : regarding iphone : Can i implement flasheff in my app that is published using flash pro? Will it work?
Re: Repositioning Text animation on a loop
November 05, 2012 08:57PM
here is my code...sometimes it cuts out the last line of the paragraph at line 3, sometimes line 4...sometimes line 6...lol. I am not sure whats going on.

var txtFormat:TextFormat = new TextFormat(); //declaring the variable to store the formating for text
txtFormat.font = "Times New Roman";
txtFormat.align = "left";
txtFormat.color = 0xFFFFFF;
txtFormat.size = 60;
txtFormat.leading = -25;
var myText:TextField = new TextField(); //declaring the textfield variable, assigning the textformat variable to it
myText.type = "dynamic";
myText.embedFonts = true;
myText.antiAliasType = "advanced";
myText.multiline = true;
myText.wordWrap = true;
myText.autoSize = "center";
toplayer.addChild(myText);
myText.defaultTextFormat = txtFormat;
myText.htmlText = "The quick brown fox jumps over the lazy dog";
myText.height = 900;
myText.width = 550;
myText.x = 300;
myText.y = ((stage.stageHeight - myText.height)/6)*5-150;
Re: Repositioning Text animation on a loop
November 12, 2012 01:43PM
Did you add/embed the font in your Flash library?
Re: Repositioning Text animation on a loop
November 12, 2012 02:13PM
Hi kneo,

Yes I did. You are correct - it works fine as it - its when I put it inside a loop when things go wonky.
Randomly - part of my paragraph goes missing on 'show' animation, and then returns for a brief flash on 'hide animation'. So i know its there - and was read from the xml. It just wasnt animated.

I worked around it by adding the empty textfield on to the stage , instead of declaring it in actionscript. For some reason, that made it work.

If you have any information about why this happens, I'd be interested - but for now, problem solved...
Sorry, you do not have permission to post/reply in this forum.