【发布时间】:2009-09-08 18:35:39
【问题描述】:
请帮忙?看来我的回调函数没有被调用......返回。我正在使用 jQuery 和 Flash 8。要访问 Flash 对象,我正在使用 jquery swfobject 插件,c.f. (http://jquery.thewikies.com/swfobject/examples)。如果您认为我一开始就没有正确访问 SWF,请推荐有关我将如何执行此操作的代码。谢谢!
JavaScript 代码:
$("#songplayer").flash("callCueSong(" + songid + ")");
Flash 代码:
import flash.external.*;
ExternalInterface.addCallback('callCueSong', null, cueSong);
stop();
pause = false;
pp_btn.hitArea = pause_hit_area;
love_btn.hitArea = love_hit_area;
_root.display_txt.backgroundColor = 0xffffff;
function cueSong(songid) {
trace('Cueing track ' + songid);
_root.sid = songid;
_root.sound_mc.songStarter('sent', false);
}
MovieClip.prototype.songStarter = function(next_direction, feedback) {
// code goes here
}
【问题讨论】:
标签: javascript jquery flash actionscript externalinterface