i'm just getting my feet wet, and running into a fundamental problem. i'm simply trying to control the flash player from javascript, and all the old controls i used to use (player.play(), player.pause(), etc) seem to be undefined for the object. all i want to do is load the flash player and then mute or unmute it from javascript, and i'm hoping not to muck with flash code (which I don't know).
here is what i'm doing: <div id="myObject"></div> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/ libs/swfobject/2.2/swfobject_src.js"></script> <script> function playerCallback(e){ //i'm trying to play, pause, or mute the player //var obj == document.getElementById("myObject"); //i've tried obj.play(), obj.pause(), obj.mute(), obj.sendEvent(), they're all not existing properties. } (function(){ var config = { player: "{$swf_file}", div: "myObject", width: "300", height: "250", version: "9.0.0", express: "{$swf_file}" }; var flashvars = { File: "{$flv_file}", Mode: "ondemand", AutoPlay: "true" }; var params = { allowFullScreen: "true", allowScriptAccess: "always" }; var attributes = { id: "myId" }; swfobject.embedSWF(config.player, config.div, config.width, config.height, config.version, config.express, flashvars, params, attributes, playerCallback); })(); the player and flv file load just fine, but no matter i try a callback function, window onload event, grab myObject or myId, i just can't figure out how to get to the basic player controls. i enumerate through the object tag properties and don't see any relevant methods or properties to use. i also tried this using traditional embeds instead of swfObject and i'm running into the same basic problem, so probably i either don't understand the new flash api, or the functionality has been removed somehow. i have flash 10 installed, running firefox 3.5. thanks in advance. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SWFObject" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/swfobject?hl=en -~----------~----~----~----~------~----~------~--~---
