Function calling problem
hi,
i created class file , in constructor loading xml file , on load of xml calling different function in same class, not executing can please tell me problem.
here code given below.
class myclass
{
private var myxml:xml;
public function myclass()
{
myxml = new xml()
myxml.load("myxml")
myxml.onload = function()
{
displatext() // function not calling
}
}
public function displatext()
{
trace("welcome")
}
}
i created class file , in constructor loading xml file , on load of xml calling different function in same class, not executing can please tell me problem.
here code given below.
class myclass
{
private var myxml:xml;
public function myclass()
{
myxml = new xml()
myxml.load("myxml")
myxml.onload = function()
{
displatext() // function not calling
}
}
public function displatext()
{
trace("welcome")
}
}
inside call handlers class members out of scope. either use local reference current object or delegate class solve this. see attached code examples.
More discussions in ActionScript 1 and 2
adobe
Comments
Post a Comment