Something like this?

 

Component1.mxml

<mx:VBox …>

  <mx:Number id=”numberone” />

</mx:VBox>

 

Class Component2

{

  Public var comp1 : Component1;

  …

}

 

App.mxml

<mx:Application …>

  <Component1 id=”comp1” />

   <Component2 id=”comp2” comp1=”{comp1}” />

</mx:Application>

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 12, 2005 6:59 AM
To: [email protected]
Subject: Re: [flexcoders] question about the import statement and action s cript files

 

In a message dated 4/12/2005 12:53:39 AM Eastern Standard Time, [EMAIL PROTECTED] writes:

Looks about like it would help but one question is component one meant to be the mxml file

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

 



Yahoo! Groups Links

Reply via email to