Groups | Blog | Home
all groups > flash exchange extensions > october 2005 >

flash exchange extensions : OOP Actionscript 2 question



stephan.k
10/15/2005 7:54:37 PM
Dear Forum

I have an OOP question. I am trying to make a class that manages my videos.
The main public function of it would be the getFlv() funtion wich goes into the
Database and retries a path to a flv file. Pretty straighforward.

Now since there is a little delay between the return and the call of the
function how would I most elegantly solve the return issue? I am trying to
avoid writing a loop to check whether some variable has changed... but even
then I wouldn't know how to pass the variable back to the place where it's
needed... I guess it's also a question of scope of variable.

Here is the code>>


/////////////////////////////////

class com.website.VideoManager {


//various variables
[...]

public function VideoManager(){
}


public function getFLV():String{
str = connectToDb();
return str;
}

private function connectToDb():String{
sendLV = new LoadVars();

dbDate = new Date()
dbRand =
String(dbDate.getYear()+""+dbDate.getMonth()+""+dbDate.getHours()+""+dbDate.getM
inutes()+""+dbDate.getSeconds()+""+dbDate.getMilliseconds())

sendLV.id = dbId;
sendLV.rand = dbRand;

var con:String = "bin/flash_db_get.php";

recXML = new XML();
recXML.ignoreWhite=true;

sendLV.sendAndLoad(con,recXML);
recXML.onLoad = function():String{
return String(this)
}
}

}
Randy1969
10/17/2005 12:00:00 AM
AddThis Social Bookmark Button