A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Actionscript from txt file

  1. #1
    Junior Member
    Join Date
    Jun 2002
    Posts
    8

    Actionscript from txt file

    there are many tutorials about loading variables form txt file. but i want to import whole actionscripts from txt file.
    is there any possible way of writing all action script in a txt file and then put it in a precompiled swf?

    if it is any help, i want this bcz:
    i am writing a small simulator (for a controller u can say). The end user may write the code (actionscript) in a txt file and then he can just press simulate in the simulator flash file. and according to script written in the txt file, the simulator shows wht that code will do.

  2. #2
    Member
    Join Date
    Jun 2003
    Posts
    41
    yes you can include AS from an external editor. Whatever editor you use (ie. notepad), make sure that you save it with the .as extension.

    When you want to include the AS in a project use this:

    #include "full path & filename.as"

  3. #3
    FK Newb Beater
    Join Date
    Dec 2002
    Location
    Seattle
    Posts
    676
    Sorry, that's not possible. Flash Cannot import and compile actionscript after the swf has been published.

    SWA_Cowboy is correct by his statement but the actions in the .as file are compiled along with everything else.
    Just because you changed the code, doesn't mean it's yours

    Most Recent Work:
    Commercial tanning beds website

  4. #4
    I'm dope. Psytrix's Avatar
    Join Date
    Aug 2002
    Location
    Slidell, LA
    Posts
    309
    wait, how do you load variables from a text file?! link me to a tutorial! i used to be able to do it but i quit using flash for prolly a year i'd say...
    thanks?!

  5. #5
    FK Newb Beater
    Join Date
    Dec 2002
    Location
    Seattle
    Posts
    676
    Just type "load variables" while in the help file. RTFM
    Just because you changed the code, doesn't mean it's yours

    Most Recent Work:
    Commercial tanning beds website

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center