Sure, it’d be something like this:

 

class component1

{

  public var numberone : Number;

}

 

class component2

{

  public var comp1 : component1;

 

  function readNumberOne() : Void

  {

    Var num : Number = comp1.numberone;

    //do what you want

  }

}

 

class parent

{

  var comp1: component1;

  var comp1 : component2;

 

  function parent()

  {

    Comp1 = new component1();

    Comp2 = new component2();

    Comp2.comp1 = comp1;

  }

}

 

That help?

 

Matt


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, April 11, 2005 9:46 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] question about the import statement and action s cript files

 

All I really want to do in a nutshell is have one action script component set a value for a variable and then have another action script component be able to recognize the value of that variable. I mean lets say you have an action script component thats taking up too much memory so you make another action script, ok. What I want to do is to have the first action set a value for a variable lets call the variable numberone ok and the first action script component sets the value of numberone to 24. It works great until the second action script component tries to access it all I get is either a NaN or its undefined does that make sense?



Yahoo! Groups Links

Reply via email to