# SWF Playing and Ignoring ActionScript

**URL:** <https://forum.kirupa.com/t/swf-playing-and-ignoring-actionscript/322225>\
**Category:** flash\
**Created:** [May 14, 2011, 9:59pm UTC](https://forum.kirupa.com/t/swf-playing-and-ignoring-actionscript/322225 "2011-05-14T21:59:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![noahssite](https://avatars.discourse-cdn.com/v4/letter/n/9de053/32.png) [@noahssite](https://forum.kirupa.com/u/noahssite)\
**Post date:** [May 14, 2011, 9:59pm UTC](https://forum.kirupa.com/t/swf-playing-and-ignoring-actionscript/322225/1 "2011-05-14T21:59:22Z")

</div>

Hello,

I have an odd error. I wrote an application in Adobe AIR using Flash CS5. When I press Ctrl+Enter to run the application it works perfectly. However when I then examine the folder that the SWF was generated to and run that SWF by double-clicking it and opening it in Adobe Flash Player none of my ActionScript works. I have ActionScript that pauses a certain movieclip but instead the movieclip just plays and loops through all of its frames. I have a button that reacts to a MouseClick through an addEventListener however it is not working. I have placed ALL the actionscript on the first and only frame of the first and only layer of the main stage.

Why is the ActionScript being ignored when I run the individual auto-generated SWF? It works when I do Ctrl+Enter in the IDE.

EDIT: When I install the AIR file the application works. So I am assuming this is something to do with the AIR environment - certain dependancies etc… The reason I am not satisfied with simply giving people the AIR file is that I need to put this application on the Blackberry Playbook which requires a working SWF file. So what should I do?

Thanks,  
Noah NU
