Participant
April 27, 2020
Question
Separate AS3
- April 27, 2020
- 1 reply
- 335 views
Hi ... i'm trying to move AS3 to separate file
but i always got error
Line 13 1120: Access of undefined property loader.
Line 13 1120: Access of undefined property handle_loadComplete.
Line 14 1120: Access of undefined property loader.
this is my code
package
{
import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.text.TextField;// ini untuk dynamic text
import se.svt.caspar.template.CasparTemplate;
public class ParsingXML extends CasparTemplate
{
private var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, handle_loadComplete);
loader.load(new URLRequest("pembuktian.txt"));
private function handle_loadComplete(e:Event):void
{
myTextField.text = e.target.data;
}
}
}
before i move to separate file i had test it inside .fla file and it work
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, handle_loadComplete);
loader.load(new URLRequest("pembuktian.txt"));
function handle_loadComplete(e:Event):void
{
myTextField.text = e.target.data;
}
is there anyone can point me into right direction
comment and help would be appreciate
Best Regard
Gilar Kadarsah | Indonesia
Note: i also upload the AS3 File and FLA File incase need to open it
