Loading External AS File

  • Rabid Dog
  • Web Master
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3229
  • Loc: South Africa
  • Status: Offline

Post November 5th, 2004, 4:06 am

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
Watch me grow
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post November 5th, 2004, 4:06 am

  • Rabid Dog
  • Web Master
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3229
  • Loc: South Africa
  • Status: Offline

Post November 5th, 2004, 4:12 am

okay so it was simple #include "filename"

thanks anyways
Watch me grow
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post November 5th, 2004, 5:46 am

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. :)
Strong with this one, the sudo is.
  • Rabid Dog
  • Web Master
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3229
  • Loc: South Africa
  • Status: Offline

Post November 5th, 2004, 6:18 am

Thanks!
Watch me grow
  • gladden
  • Beginner
  • Beginner
  • No Avatar
  • Joined: May 20, 2004
  • Posts: 44
  • Status: Offline

Post November 5th, 2004, 9:35 am

#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
  • Joined: May 21, 2004
  • Posts: 3229
  • Loc: South Africa
  • Status: Offline

Post November 7th, 2004, 11:10 pm

Is import dynamic or also only used at compile time?
Watch me grow

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 51 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
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.