English 中文(简体)
从AS3集装箱中接通AS2功能
原标题:Call to an AS2 function from the AS3 container

I m 试图从<条码>AS3 集装箱中指定一个功能,该功能应当称作旧的<代码>AS2 SWF,这些功能不能被编辑成像,而我们谈论的是1,000个 s文档,但从上看,在上指定一个功能的方法确实存在?

我知道,通过在《地方环境/代码>的可能办法,即:,但正如我说过的那样,可以 t上所有Swf文档,因此,我很想知道是否还有其他选择。

问题回答

如果您的集装箱绝对必须用AS3书写,那么你就可以在AS2中制造另一个中间集装箱,可以直接与现有的1,000个小型钻石公司联系,然后可以与那些使用当地作物技术的人联系。

下面的法典就是这方面的一个简单例子,但由于一个问题,即:在装入AS3 ARV1号标语时,似乎没有发生火灾,我不得不实施一个相当简单的投票制度。 有关这个问题的问题见:。 为什么在装入AS3包装材料时,C射线照射电会不会发生火灾?

child_as2.swf——我们试图装上1 000份AS2文件。 它确定了我们想要在装满负荷时获得的根本性职能:

stop();

function playMovie() {
    play();
}

jun_as2.swf - Themedia AS2 file that contained LocalConnection Code to Bridge between the AVER1 and AVER2îtimes. 由于上述事件,该儿童在装满时和当具备已知的根基功能时,都会发现自己。 重要的是,第一次投票要求检查Progress被忽略,因为这将回去不正确的进展价值,见:rel=“nofollow noretinger”http://help.adobe.com/en_US/AS2LCR/Flash_10.0/00001380.html

var container:MovieClip = createEmptyMovieClip("container", 10);
var mcLoader:MovieClipLoader = new MovieClipLoader();
var loadStarted:Boolean;
var checkingInt:Number;

function checkProgress() {
    var progObj:Object = mcLoader.getProgress(container);
    if(progObj.bytesLoaded == progObj.bytesTotal && loadStarted) {
        //load complete, wait for loadInit
        if(typeof(container.playMovie) == "function") {
            //loadInit
            clearInterval(checkingInt);
            container.playMovie();
        }
    }
    //ensures the first loop is ignored due to inaccuracy with reporting
    loadStarted = true;
}

//LocalConnection code
var myLC:LocalConnection = new LocalConnection();

myLC.loadChild = function() {
    loadStarted = false;
    mcLoader.loadClip("child_as2.swf", container);
    checkingInt = setInterval(checkProgress,5);
}

myLC.connect("AVM");

www.un.org/Depts/DGACM/index_french.htm 这把母体装入了ARV1的物体,并通过地方委员会与它联系。

var myLC:LocalConnection = new LocalConnection();

var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT,onLoaded);
loader.load(new URLRequest("parent_as2.swf"));
addChild(loader);


function onLoaded(event:Event):void {
    //setTimeout hack to circumvent #2000 Security context error
    setTimeout(function() {
        myLC.send("AVM", "loadChild");
    },1);
}

我不会这样说。 我的唯一建议是使......失败。 1 000个小型渔业基金会,在那里执行当地环境逻辑,或许在共同的SWC中,如果设计得当,重组小型渔业基金会并从那里撤出。

You can make a as2 swf to make the localconnections. This swf can call your external as2 files and return responces to as3 file. Example below, hope it helps.

下面的代码从我以前所做的一个项目中排出。 它使用2个文档连接服务器。 排除一些守则,希望你能够找到解决办法。

// AS3 FILE
// local connection instance to communicate to AVM1 movie
var AVM_lc:LocalConnection = new LocalConnection();
AVM_lc.client = this;

// loader loads AVM1 movie
var loader:Loader = new Loader();
loader.load(new URLRequest("log2.swf"));
//addChild(loader);
// when AVM1 movie is clicked, call stopPlayback
stage.addEventListener(MouseEvent.CLICK, stopPlayback);

function stopPlayback(event:MouseEvent):void {
    // send login event to "AVM2toAVM1" connection
    AVM_lc.send("AVM2toAVM1", "logIn","[email protected]" , "123123");

}

function resulFunc(a:*){
    trace(a + " *-*-*-*-");
}
AVM_lc.connect("AVM1TO");



// AS2 FILE - log2.swf

var AVM_lc:LocalConnection = new LocalConnection();

AVM_lc.logIn = function(a , b){ 
    trace("login : " , a , " - " , b);

}
AVM_lc.connect("AVM2toAVM1");

function sendDataToAs3():Void{
    AVM_lc.send("AVM1TO", "resulFunc", "test value");
}




相关问题
Disable button tooltip in AS3

I want to disable the tooltip on certain buttons. The tooltip manager seems to be an all or nothing solution. Is it possible to disable the tooltip for just one or two buttons?

Sorting twodimensional Array in AS3

So, i have a two-dimensional Array of ID s and vote count - voteArray[i][0] = ID, voteArray[i][1] = vote count I want the top 3 voted items to be displayed in different colors, so i have a 2nd Array -...

Virtual Tour using sketch up, ajax, flash technologies

I want to know if there are existing technology that make your 3d models in sketch into virtual tours, using either Ajax or Flash for web presentation. If there s none, which will be a good approach ...

AS3 try/catch out of memory

I m loading a few huge images on my flex/as3 app, but I can t manage to catch the error when the flash player runs out of memory. Here is the what I was thinking might work (I use ???? because i dont ...

Red5 Security Tutorial

I am looking for a step by step tutorial on securing Red5 from intrusion. This seems to be a question that comes up alot in a google search, but is never really answered in a way that makes sense to ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

visible property of DisplayObject

For example I have a hierarchy of movie clips. mc1 is a child of mc, and mc2 is a child of mc1. Turns out that when I set mc1.visible = false; mc2.visible stays true. Is that supposed to happen?...

热门标签