Zurück   Flashforum > Flash > ActionScript > ActionScript 2

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 04-01-2012, 17:36   #1 (permalink)
Neuer User
 
Registriert seit: Jan 2012
Beiträge: 1
gfx.io.GameDelegate

Hi guys,

I have a question about how to use gfx.io.GameDelegate...

I am experienced C++ programmer but I am quite new to flash programming and action script....

So I like to ask what I plan to do below is possible or not...

I have 2 swfs files which are hosted from a game engine....

One of the swf files (lets say a.swf) defines the following code...

Code:
gfx.io.GameDelegate.addCallBack("Invent.setStock", this, "_onSetStock");
_onSetStock is defined function in a.swf.

Now I have another swf file, lets say b.swf, hosted also from the same game engine (both loaded to the memory at the same time....) but didn't know anything about each other, there is no import or anything like that.....

Now I want to introduce new functionality to b.swf and call _onSetStock on a.swf from b.swf with gfx.io.GameDelegate.call...

Code:
gfx.io.GameDelegate.call("Invent.setStock", __items);
Is this possible?

I don't know too much about the class loading mechanism of flash but it a.swf and b.swf are loaded from the same class loader (hosted in the same game engine should be like that actually), and while is static gfx.io.GameDelegate.call, I should able to call it actually....
posthumecaver ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 15:55 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele