Skip navigation
Currently Being Moderated

CS5.5 Publish SWF including Main.AS script

May 2, 2012 2:07 PM



In Flash Pro CS5.5, I've created an Fla and scripted it (in AS3) using a separate AS file (package) which is linked. When I publish the SWF and both the SWF and AS files are in the same folder, it runs fine. If I separate out the SWF (without the AS file), and try to run it, it doesn't play (run the script).


How do I include (embed) the AS file into the published SWF so that wherever the SWF is located, it is self-contained so that it plays using the script from the AS file?



  • Currently Being Moderated
    May 3, 2012 1:24 AM   in reply to saratogacoach



    a compiled swf file is never accessing an .as script file. But check if you were using TLF textfields, then you need to have the 'textLayout_2.0.0.232.swz'-file in the same location as the swf.

    If you want to have everything included in the swf, select 'merge into code' for textLayout.swc in the ActionScript settings.


    Hope this helps.



    Mark as:
  • Currently Being Moderated
    May 3, 2012 4:23 AM   in reply to saratogacoach

    Hi again,


    if you can attach your zipped project, I may have a look.


    Without I can only assume issue might be with AS-Linkage in the library panel.




    Mark as:
  • Currently Being Moderated
    May 4, 2012 2:10 PM   in reply to saratogacoach

    even though you resolved your own issue (well done), here is how to include external .as files:


    include "[path]"


    put this at the top of your code with all the other "imports" and such

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points