Copy link to clipboard
Copied
I have created a swf Animation... With its proper instance names.... I have loaded this Swf file in Flash Builder Swf Loader... And i am changing the Text dynamically on button clicks in Flash builder.... But now the Problem is I am able to Change the Text to some other Text but once the Swf completes its cycle... The Text is Again Reset to The original Text.... Please Help.... If you didn't understand the question ill be happy to explain more. | . |
Copy link to clipboard
Copied
How is the animation designed? Is it designed to reset and/or restart from the beginning? Does the Loader have anything to do in the way of listening for completion and reloading the animation?
Copy link to clipboard
Copied
Animation is simple ... I mean i have written no script for restarting or stopping ... Its just simple design i can send... Loader have nothing to do with it... Its something missing in animation im sure of that..I am inserting the link of the swf please check it out.. : Dropbox - MomiahFinal3.swf
Copy link to clipboard
Copied
Can't see the code you have on any frames of your SWF but if you're ever using ActionScript in the SWF to set the value of a TextField then every time the playhead runs over that script the code is of course going to set the text again. Otherwise any text you place in a dynamic/input TextField is not going to be reset on loop just in the IDE.
A sample provided (Flash Pro CC / FB 4.7 Premium):
http://www.ertp.com/tmp/SWFText.zip
Example trace:
[SWF] \SWFText\bin-debug\assets\Text.swf - 1,029 bytes after decompression
Text.swf - frame 1 - text: This is where my text will go.
[SWF] \SWFText\bin-debug\SWFText.swf - 1,942 bytes after decompression
Text.swf - frame 1 - text: This is where my text will go.
Text.swf - frame 1 - text: 5 seconds later...
Text.swf - frame 1 - text: 10 seconds later...
I used an ActionScript project (for Web) as to not require AIR.
That simply loads assets/Text.swf into a Loader which has a dynamic TextField (myTxt) already on the timeline and extended on the timeline so it can loop. After loaded I set the text in that TextField after 5 seconds and after 10 seconds.
During all of this, a trace() statement is on frame 1 in the SWF that fires off displaying the text in myTxt TextField. Flash Builder is setting the text after 5 and 10 seconds and the SWF is looping while retaining the text being set in Flash Builder. So there is no problem doing what you're talking about.
"Something else" is resetting your text. Be sure frame scripts or other events aren't resetting it. Also of course any "keyframes" you add in (aside frame 1) will reset text if the playhead runs over them. The TextField must continuously exist with only the initial keyframe it was created on and the loop must return within that keyframe range.
Otherwise to get around all of that, generate your TextField yourself in ActionScript so the timeline and keyframes have no bearing on it's existence or properties, such as Text.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now