#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2008
    Posts
    76
    Rep Power
    7

    Question Please help with external AS file


    I've tried all weekend to get this work.
    What I'm trying to do is to get flash to pull the actionscript from an external as file.

    Code:
    stop();
    Stage.showMenu = false;
    
    submit_ta.password = true;
    
    myData = new LoadVars();
    myData.onLoad = function() {
    	bypass = this.myVariable;
    	tempbypass = this.myTempVariable;
    };
    myData.load("auth_code.php");
    
    submitBtn.onRelease = function() {
    	if (submit_ta.text == bypass) {
    		getURL("intro.html", "_self");
    		trace("rickyandkareine");
    	} else if (submit_ta.text == tempbypass) {
    		getURL("intro.html", "_self");
    	} else {
    		gotoAndStop(2);
    	}
    
    };
    Any help will greatly be appreciated.

    Thanks in advance
  2. #2
  3. No Profile Picture
    Gotta get to the next screen..
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2003
    Location
    Legion of Dynamic Discord
    Posts
    6,675
    Rep Power
    3164
    Hi, you would use the include statement to do that. You can read the full docs page on that here.

    If the external file was in the same directory as the fla file and it is called "cats.as" then inside your fla file you would use:

    #include "cats.as"
    Quis custodiet ipsos custodes?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2008
    Posts
    76
    Rep Power
    7
    thanks i'll give it a try.

IMN logo majestic logo threadwatch logo seochat tools logo