angular-swfobject

SWFObject directive for AngularJS

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
133Feb 23, 2016Sep 23, 2014Minified + gzip package size for angular-swfobject in KB

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');

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.