# Please help. how do you pass a value from a class in a package to the .fla file

**URL:** <https://forum.kirupa.com/t/please-help-how-do-you-pass-a-value-from-a-class-in-a-package-to-the-fla-file/328557>\
**Category:** Uncategorized\
**Created:** [May 25, 2012, 6:31pm UTC](https://forum.kirupa.com/t/please-help-how-do-you-pass-a-value-from-a-class-in-a-package-to-the-fla-file/328557 "2012-05-25T18:31:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![what\_the\_fresh](https://avatars.discourse-cdn.com/v4/letter/w/ecc23a/32.png) [@what\_the\_fresh](https://forum.kirupa.com/u/what_the_fresh)\
**Post date:** [May 25, 2012, 6:31pm UTC](https://forum.kirupa.com/t/please-help-how-do-you-pass-a-value-from-a-class-in-a-package-to-the-fla-file/328557/1 "2012-05-25T18:31:02Z")

</div>

this s killing me and it might be simple for some of you guys. been on this since morning and I’m about to go crazy.

I’m having problem returning a value from a class. the problem is that i can’t get the value from the function inside the function. How would I manage to return the value from the inside function to the ‘get function’ to the fla file?  
\<as3\>

public function get value():String  
{  
//i declared variable on top and then move here to see if it work here. no  
var \_tempValue:String;  
\_stream.addEventListener(NetStatusEvent.NET\_STATUS, statusHandler);  
function statusHandler(event:NetStatusEvent)  
{  
switch (event.info.code)  
{  
case “NetStream.Play.Start”:  
trace (“begin”); //I’m getting in here. yes

//want to pass \_tempValue to the fla file. not working  
\_tempValue = String(“begin”);  
break;  
case “NetStream.Play.Stop”:  
trace (“stop”);//I’m getting in here. yes  
//want to pass \_tempValue to the fla file. not working  
\_tempValue = String(“stop”);  
SoundMixer.stopAll();  
removeChild(\_video);  
\_video = null;  
\_stream.close();  
break;  
}  
}//END statusHandler  
\_value = \_tempValue;  
return \_value; //this will pass to fla if it gets value

}//END get value()

\</as3\>
