Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to play MovieClip animation which is not on the main timeline
    text
    copied!<p><img src="https://i.stack.imgur.com/Qxikr.png" alt="enter image description here">On my main timeline, I have a 'background' layer, a 'play' layer an an 'actions' layer. In the 'play' layer, there is a MovieClip whose instance name is playButton. All layers on the main timeline only have one frame.</p> <p>In the actions layer on the main timeline, this is what is there</p> <pre><code>import flash.events.MouseEvent; import flashx.textLayout.formats.Float; function playButtonClicked(evt:MouseEvent) { backgroundMC.analysisScreenMC.play(); } playButton.addEventListener(MouseEvent.CLICK, playButtonClicked); </code></pre> <p>In the background layer, there is a MovieClip called backgroundMC. Inside backgroundMC (if you double click backgroundMC) there is another MovieClip whole instance name is analysisScreenMC and it has two layers, an 'actions' layer and an 'answers' layer. Both these layers have 13 frames. The 'answers' layer is a motion tween, and basically makes analysisScreenMC fade out to 50% opacity. The actions layer in analysisScreenMC is just this</p> <pre><code>stop(); </code></pre> <p>(without stop(); the animation plays over and over again)</p> <p>Now, when I run the animation, nothing happens even if I click the play button. Any idea why?</p> <p>Note: I also tried doing this</p> <pre><code>function playButtonClicked(evt:MouseEvent) { trace('clicked'); backgroundMC.analysisScreenMC.play(); } </code></pre> <p>and it does in fact trace 'clicked' every time I click the play button.</p> <p>Below is an image of the timeline of analysisScreenMC.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload