Note that there are some explanatory texts on larger screens.

plurals
  1. POActionscript 3 - Access of undefined property error
    primarykey
    data
    text
    <p>In my timeline, I have a 'background' layer, an 'actions' layer and a 'play' layer (all have just 1 frame). The background layer has a MovieClip called backgroundMC and when you double click the MovieClip, there is a MovieClip called analysisScreenMC. In the timeline for analysisScreenMC, there is a folder called 'Title Bar' and inside 'Title Bar' there is a layer called 'answers' which has a motion tween which makes analysisScreenMC fade out to 50% in a span on 15 frames. </p> <p>The 'play' layer just has a MovieClip called playButton. </p> <p>Now, when playButton is clicked, I want to play analysisScreenMC so that it fades out. Here is what I tried.</p> <pre><code>import flash.events.MouseEvent; import flashx.textLayout.formats.Float; function playButtonClicked(evt:MouseEvent):void { analysisScreenMC.play(); } playButton.addEventListener(MouseEvent.CLICK, playButtonClicked); </code></pre> <p>when I run this, it gives me an error saying 'Access of undefined property analysisScreenMC.'</p> <p>Any idea on how to fix this?</p> <p>Note: I am using Adobe Flash CS 5 and Actionscript 3.</p> <p>Edit: When I put</p> <pre><code>trace("backgroundMC="+ backgroundMC+", backgroundMC.analysisScreenMC="+ backgroundMC.analysisScreenMC); </code></pre> <p>inside the </p> <pre><code>function playButtonClicked </code></pre> <p>this is what it traces</p> <pre><code>backgroundMC=[object analysisScreenInside_1], backgroundMC.analysisScreenMC=[object MovieClip] </code></pre> <p>analysisScreenMC is the instance name of analysisScreenInside</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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