Ah thanks for all the help everyone.
I'm slowly coming around to classes, as has been confused about when
and when not to use classes and how to access the information from
each other. interesting.
Thanks again :)
On Thu, Jun 12, 2008 at 3:38 PM, Merrill, Jason
<[EMAIL PROTECTED]> wrote:
>>>You'
>>You'd need to instantiate the other class and then access it,
>>like this:
That's one way, the other way is to use static variables:
package com
{
class MyClass
{
public static var name:String = "Johnny";
//or declare as a public
You'd need to instantiate the other class and then access it, like this:
package test {
public class test2 extends Sprite {
public function test2(){
var testInstance:test = new test();
trace(testInstance.hello);
}
}
}
Also, it's good practic
package test
{
public class test2 extends Sprite
{
var testInstance:test = new test;
trace(testInstance.hello);
}
}
--
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chatty
4 matches
Mail list logo