Refer to SWFObject github.com/swfobject/swfobject for core library information, this read-me only covers the “new” stuff.
>> bower install hokey.angular-swfobject
All of the pre-existing samples provided on the source repo have been removed on this project. I don’t use them for myt own purposes. If someone wishes to add them back and pair them with appropriate documentation, be my guest.
The core service that contains the same core logic as swfObject classic. The service has been “angularized”. Angular is the only pre-requiste of this module.
angular.module('sampleApp',['angular-swfobject']) .service('consumingSvc', ['swfobject',function(swfobject){ //Here's usage of the loading promise swfObject.loadedPromise.then(function loadedSuccessfully(){ console.log('eureka!'); }); function swfLoadSuccessCb = function swfLoadSuccessCb(e){ //do something here on successful callback } return { embed: function embed(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarObj, parObj, attObj, callbackFn){ swfobject.embedSWF(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarObj, parObj, attObj, swfLoadSuccessCb); } }; }]);
* Use of deprecated callee replaced with named functions
* Private member: flashLoaded * Public exposed as a service property: loadedPromise
* Public function: overrideDetection * Resets a controlling bool and recalls testPlayerVersion