Hello, I am using AS3 & Flash CS3. I have 6 frames. In the first frame I initialize my netconnection and netstream along with a button (bttn_rec) to start recording. When the record button is clicked it starts recording and it calls gotoAndStop(10) to go to the second frame which has the following code:
bttn_stop.addEventListener(MouseEvent.CLICK, onClick_stop);
function onClick_stop(event:MouseEvent):void
{
ns.pause();
ns.seek(0);
ns.close();
gotoAndStop(20);
}
At this point the bttn_stop button is enabled but when clicked, to execute this code, the netstream (ns) is no longer recognized or defined.
What can I do to execute this code from the first frame when my bttn_stop button is clicked? or is there a better way to do this?
Thanks in advance,
Louis