-
[RESOLVED] Flash attachmovie problem [AS2]
I'm using Macromedia Flash Professional 8 and actionscript 2. I want a blinking text to appear if something happens, as an alert.
1)I converted a textfield of static text into a movie clip symbol. Its properties are:
name: blinktext
Linkage identifier: blinktext
Linkage: Export for Actionscript and Export in first frame, are checked.
The movie clip has only one layer of 3 keyframes; the second keyframe is empty and 1 & 3 are identical so that the text will blink. There's no instance of it in any scene. It's on the library and will be attached to a movie clip container.
2)I made a rectangle (with no stroke color) and converted it into a movie clip symbol called "holder" with instance name "holder". This will be my container for blinktext. I also removed the fill color from the container in order to make it invisible.
3)The actionscript (in the case of running the code inside if's block):
Code:
this.holder.attachMovie("blinktext","blinktext2",this.getNextHighestDepth());
When i run it, the movie clip will appear, but it will be stuck at the first keyframe (i know because i tried adding gotoAndPlay(2); actionscript on the first keyframe and it does goto the second keyframe and also gets stuck there).
As a result, i will see the text but it won't blink. However, if i place an instance of blinktext Movie Clip anywhere, the animation will work.
Any ideas?
-
Flash/Flex Developer
So your blinktext animation isn't playing at runtime, it just goes to the first frame and stop? Are you sure there aren't any stop commands in or around it that point to the blinktext?
Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.
-
Yeah there are stop commands but also play commands. However, by making a new simple .fla and copying the container and the movie clip, the animation works...
... so undoubtedly i did something wrong with stop commands. Thanks, i spotted the problem.
-
Flash/Flex Developer
Good work, can you mark this thread as closed.
Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|