Thanks for the reply.
sorry to be confusing. I am grabbing the variables, that are constantly changing, out of the swf(mp3 player) and using them in a javascript function.
Just so that i understand:
AS3:
Code:
private function getCurrentTrack():String{
return currentTrack;
}
private function getIsPlaying():Boolean{
return isPlaying;
}
Javascript or AS3?:
Code:
ExternalInterface.addCallback("getCurrentTrack", getCurrentTrack);
ExternalInterface.addCallback("getIsPlaying", getIsPlaying);
Currently i am using this:
AS3:
Code:
public function initFunction() {
updateStatusToPage();
}
private function getCurrentTrack():String{
return currentTrack;
}
private function getIsPlaying():Boolean{
return isPlaying;
}
private function updateStatusToPage() {
ExternalInterface.addCallback("getCurrentTrack", getCurrentTrack);
ExternalInterface.addCallback("getIsPlaying", getIsPlaying);
var result:Boolean = ExternalInterface.call("jsFunction_Update");
trace (ExternalInterface.available); // Trace = TRUE
}
javascript:
Code:
<script language="javascript">
function jsFunction_Update() {
javascript:updateStatus(currentTrack, isPlaying);
return false;
}
</script>
then the idea is that dynamically form the outside script i can pass:
Code:
javascript:updateStatus(4, true);
when i go to another page so that it will continue where i left off on my playlist
see any reason this isnt working. I'm just not familiar with talking outside of my swf.
thanks again