# A question about document class

**URL:** <https://forum.kirupa.com/t/a-question-about-document-class/243384>\
**Category:** Uncategorized\
**Created:** [November 6, 2007, 2:46pm UTC](https://forum.kirupa.com/t/a-question-about-document-class/243384 "2007-11-06T14:46:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sger\_error](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@sger\_error](https://forum.kirupa.com/u/sger_error)\
**Post date:** [November 6, 2007, 2:46pm UTC](https://forum.kirupa.com/t/a-question-about-document-class/243384/1 "2007-11-06T14:46:39Z")

</div>

hello

i have one generic class (GenericDocumentClass.as) as my document class for all external .swfs that i’m using which contains a public var test:String

for example in sample.swf

package {

public class Sample extends GenericDocumentClass{  
public function Sample(){  
var hello:Hello = new Hello();  
addChild(hello);  
}

}

}

in the hello class im using the following syntax Sample(root).test (to retrieve the value of test string) but is null.

the sample.swf is loaded into Main.swf

any help?
