[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?