SWFObject directive for AngularJS
npm install angular-swfobjectMinimal usage:
`` html`
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.
` html`
swf-width="100%"
swf-height="100%"
swf-version="10.2">
You can also add additional parameters:
` html`
swf-params="{
wmode: 'opaque'
}">
Specify flash vars:
` html`
swf-vars="{
user: 'alice'
}">
Register a callback for swf load complete:
check swfobject.embedSWF callback documentation
` html`
swf-load="onLoadHandler(evt)"
>
###### http://learnswfobject.com/the-basics/adobes-express-install/
Specify expressInstallSwfurl :
` html`
xi-swf-url-str="expressInstall.swf"
>
Also supports defining controller level callbacks if using ExternalInterface for example:
View
` html`
swf-id="my-swf-id"
swf-callbacks="{'externalCallback': myCallback}">
Controller
` JavaScript`
angular.controller('MyCtrl', function ($scope) {
$scope.myCallback = function () {
console.log('Called from Flash');
}
});
ActionScript
` ActionScript``
ExternalInterface.call('externalCallback');