0
votes

Any sample code to do so ? I can only see example for passing simple variable.

Let's say I have a movieClip M1 and a movieClip M2 loaded by M1. Then M2 will create an instance of a class c that will be passed to MovieClip M1 by calling a predefined method.

I'm totally new to actionscript so I'd need to know the exact syntax and event to do so.

2
Are there words missing from your question? I think you should elaborate!Paul Dixon
ok thanks for the remark I have elaborated.user310291

2 Answers

1
votes

You can pass them the same way you pass simple variables.

function myFunction(a:CustomClass):void
{
  trace("received " + a.toString());
}

var c:CustomClass = new CustomClass("blah", 42);
myFunciton(c);
0
votes
import my.class.a;

class b {
    var test:A = new A;
}

this is an abstract version, hope you can use it.