Hi,

your class B instance will need a reference to an instance of Class A,
unless your nextPrev property is static.

If nextPrev is static, Class B can do ClassA.nextPrev (assuming the property
is public).
If nextPrev is not static, you'll need to do new ClassB (myClassAInstance)
and access the instance of A within B.

Another option is a separate method doSomething (pClassA:ClassA) {
pClassA.nextPrev = whatever; }

JC

On Tue, Oct 20, 2009 at 12:03 PM, Sajid Saiyed <sajid.fl...@gmail.com>wrote:

> Hi,
> I have a basic problem that I cant figure out how...
>
> I have a ClassA and ClassB (both extend Sprite)
>
> ClassA has a property called "nextPrev:Boolean"
>
> Inside ClassA I create an instance of ClassB like this:
>
> public var myB:ClassB = new ClassB();
>
> Now, is it possible that I can have a method inside ClassB that can
> set the "nextPrev" property inside ClassA?
> Dont know if this is possible...
> 44444
> Regards
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to