Loading External AS File

  • Rabid Dog
  • Web Master
  • Web Master
  • User avatar
  • Posts: 3245
  • Loc: South Africa

Post 3+ Months Ago

I used to know how to do it then I got buried in PHP. I have tried searching google and had no luck.

Please can someone tell me how to load an external actionscript file. I know it is relatively simple and I am going to kick myself when I see it ;)

Thanks a million
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Rabid Dog
  • Web Master
  • Web Master
  • User avatar
  • Posts: 3245
  • Loc: South Africa

Post 3+ Months Ago

okay so it was simple #include "filename"

thanks anyways
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

Just in case you're not aware of how to do this, :P

Adding the include statement & methods to the actions library & color syntax to the actions panel is easy as this,
Code: [ Select ]
<customactions>
    <actionspanel>
        <folder name="Easing Movement" id="easeMovement" index="true" tiptext="Methods For Easing Movement" VERSION="6">
            <string name="Class Include" tiptext="Load Class" helpid="" text="#include &quot;easeMovement.as&quot;\n" version="6"/>
            <folder name="Methods" id="easeMoveMeths" index="true" tiptext="Methods For Easing Movement" VERSION="6">
                <string name="easeX" tiptext="Ease _y Position" helpid="" text=".easeX( % Position, Speed % );" object="MovieClip" version="6"/>
                <string name="easeY" tiptext="Ease _y Position" helpid="" text=".easeY( % Position, Speed % );" object="MovieClip" version="6"/>
            </folder>
        </folder>     
    </actionspanel>
    <colorsyntax>
        <identifier text="easeX"/>
        <identifier text="easeY"/>
    </colorsyntax>
</customactions>
  1. <customactions>
  2.     <actionspanel>
  3.         <folder name="Easing Movement" id="easeMovement" index="true" tiptext="Methods For Easing Movement" VERSION="6">
  4.             <string name="Class Include" tiptext="Load Class" helpid="" text="#include &quot;easeMovement.as&quot;\n" version="6"/>
  5.             <folder name="Methods" id="easeMoveMeths" index="true" tiptext="Methods For Easing Movement" VERSION="6">
  6.                 <string name="easeX" tiptext="Ease _y Position" helpid="" text=".easeX( % Position, Speed % );" object="MovieClip" version="6"/>
  7.                 <string name="easeY" tiptext="Ease _y Position" helpid="" text=".easeY( % Position, Speed % );" object="MovieClip" version="6"/>
  8.             </folder>
  9.         </folder>     
  10.     </actionspanel>
  11.     <colorsyntax>
  12.         <identifier text="easeX"/>
  13.         <identifier text="easeY"/>
  14.     </colorsyntax>
  15. </customactions>


I'm sure you know to save .as files in the "%pathToFlash%\Configuration\Include" folder. Your version of the code above gets saved as an XML file in "C:\Documents and Settings\%userName%\Application Data\Macromedia\Flash MX\Configuration\ActionsPanel\CustomActions" folder. ("Application Data" is normally a hidden folder !, WinXPs path is slightly different & i'm not sure what it is)

The attributes of that file are pretty self explainitory to anyone who would get any use from this. :)
  • Rabid Dog
  • Web Master
  • Web Master
  • User avatar
  • Posts: 3245
  • Loc: South Africa

Post 3+ Months Ago

Thanks!
  • gladden
  • Beginner
  • Beginner
  • gladden
  • Posts: 44

Post 3+ Months Ago

#include is the syntax for AS 1. If you prefer you can use import statement with AS2 (newer version of ActionScript)
  • Rabid Dog
  • Web Master
  • Web Master
  • User avatar
  • Posts: 3245
  • Loc: South Africa

Post 3+ Months Ago

Is import dynamic or also only used at compile time?

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 19 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.