开发者

ActionScript 2 - Please help with external AS file

I've tried all weekend to get th开发者_如何学编程is work. What I'm trying to do is to get flash to pull the actionscript from an external as file.

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


Are you trying to load the external AS file at runtime? This is not possible -- you have to compile the AS file into a SWF, and then load the SWF. Then the parent SWF can call functions in the child (loaded) SWF.

If you're trying to load the AS from an external file at compile time, that's different -- there are two different ways: you can "import" or "include" the code.

http://www.jeffryhouser.com/index.cfm/2007/10/2/ActionScript-3-Imports-vs-Includes

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜