Announcement

Collapse
No announcement yet.

AS3 call method within GFxObject within GFxMovie?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    AS3 call method within GFxObject within GFxMovie?

    I'm looking to call a method within one of my GFxObject (referenced in my GFxMovie class)s from AS3.

    My movie class:
    Code:
    class MyMainHud extends GFxMoviePlayer;
    
    var MyHealthBarGFx HealthBar; //This gets set to contain my health bar flash object within WidgetInitialized().
    My GFxObject class (an example would be a health bar).
    Code:
    class MyHealthBarGFx extends GFxObject;
    
    simulated function TestMe()
    {
        `log("Howdy!");
    }
    Now I'm trying to call the TestMe method (from AS3) in my health bar class like so:
    Code:
    ExternalInterface.call("HealthBar.TestMe");
    It's currently not reaching the TestMe() method, although I can call methods within the MyMainHud class.

    Could anyone advise how I can call methods directly on the GFxObject, without having to have a routing method in MyMainHud?

    Thanks in advance

    #2
    For anyone who's interested, i have achieved this using widgets and delegates. See this thread for more details.

    Comment

    Working...
    X