External external problems
I know there are many articles and forum posts (many of them from me) regarding ExternalInterface, I think I'll add one more ...
I have a small flash app (button) that is configured to check for ExternalInterface accessibility and works fine. I also have a larger, more complex flash mp3 player that I'm trying to use ExternalInterface with; it's not that great. The question is, where is the problem? My working externalInterface code looks like this:
import flash.external.ExternalInterface
myBtn.onRelease = function(){
chkAvail();
}
function chkAvail() {
var myText:TextField = this.createTextField('myText', this.getNextHighestDepth(), 100, 100, 300, 21);
ExternalInterface.call("alert",'EI works!!");
myText.text = String(ExternalInterface.available);
}
And it all works great. My mp3 player code looks like this (excerpt, full code is posted here ): Above -
import flash.external.ExternalInterface;
and where i want to call javascript-
function loadPlaylist(){
//attempting to make external js call
ExternalInterface.call("alert", "Hello World!1");
//
track_display_mc.display_txt.text = LOADING_PLAYLIST_MSG;
if(track_display_mc.display_txt._width>track_display_mc.mask_mc._width){
track_display_mc.onEnterFrame = scrollTitle;
}else{...
So why does the former work and not the latter? I feel like I am calling them correctly from html. Could there be a problem importing flash.external.ExternalInterface? Should I include this in the .flv where the .as is imported / included and not in the actual ActionScript? All help / ideas are appreciated ...
a source to share