angular-swfobject
v1.2.1
Published
SWFObject directive for AngularJS
Downloads
127
Readme
Angular SWFObject
Usage
Minimal usage:
<swf-object swf-url="my-swf.swf"></swf-object>
Width, height and version are required parameters for SWFObject. If these are not provided then angular-swfobject
defaults to: 800x600, version 10. You can override these.
<swf-object
swf-url="my-swf.swf"
swf-width="100%"
swf-height="100%"
swf-version="10.2"></swf-object>
You can also add additional parameters:
<swf-object
swf-url="my-swf.swf"
swf-params="{
wmode: 'opaque'
}"></swf-object>
Specify flash vars:
<swf-object
swf-url="my-swf.swf"
swf-vars="{
user: 'alice'
}"></swf-object>
Register a callback for swf load complete: check swfobject.embedSWF callback documentation
<swf-object
swf-url="my-swf.swf"
swf-load="onLoadHandler(evt)"
></swf-object>
http://learnswfobject.com/the-basics/adobes-express-install/
Specify expressInstallSwfurl :
<swf-object
swf-url="my-swf.swf"
<!--- optional expressInstall.swf packaged with swfobject -->
xi-swf-url-str="expressInstall.swf"
></swf-object>
Also supports defining controller level callbacks if using ExternalInterface
for example:
View
<swf-object
swf-url="my-swf.swf"
swf-id="my-swf-id"
swf-callbacks="{'externalCallback': myCallback}"></swf-object>
Controller
angular.controller('MyCtrl', function ($scope) {
$scope.myCallback = function () {
console.log('Called from Flash');
}
});
ActionScript
ExternalInterface.call('externalCallback');