https://github.com/niceue/embedswf
Simple, modern flash dynamic embedding scheme.
https://github.com/niceue/embedswf
Last synced: 8 months ago
JSON representation
Simple, modern flash dynamic embedding scheme.
- Host: GitHub
- URL: https://github.com/niceue/embedswf
- Owner: niceue
- License: mit
- Created: 2013-04-28T16:18:26.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2014-06-23T15:53:43.000Z (almost 12 years ago)
- Last Synced: 2025-04-13T17:58:19.975Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 186 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## embedSWF
Simple, modern flash dynamic embedding scheme.
## Usage
1. Put `embedSWF.js` & `expressInstall.swf` in the same folder.
2. Include `embedSWF.js`:
``` html
```
3. Embed a flash:
``` js
embedSWF('someId', {
src: 'path/to/flash.swf',
width: 640,
height: 320
});
```
4. Destroy a flash you have embeded:
``` js
embedSWF.destroy('someId');
```
## Know Issue
Most time, path of the "expressInstall.swf" can be automatically generated.
But if you merge `embedSWF.js` to other file, the path may be wrong.
Otherwise, if you use the module loader "[seajs](http:seajs.org)" or "[ozjs](http:ozjs.org)",
they load the script and then remove it, so we could't get the path.
If the "expressInstall.swf" path is Incorrect, you can set the path in the end of the `embedSWF.js`:
``` js
embedSWF.base = "path/to/expressInstall.swf";
```
or set the path when you embed a flash:
``` js
embedSWF('someId', {
src: 'path/to/flash.swf',
base: "path/to/expressInstall.swf"
});
```
## Browser Support
* IE6+
* Chrome
* Safari 4+
* Firefox 3.5+
* Opera
## Bugs / Contributions
- [Report a bug](https://github.com/niceue/embedSWF/issues)
- To contribute or send an idea, github message me or fork the project
## Build
embedSWF use [UglifyJS2](https://github.com/mishoo/UglifyJS)
you should have installed [nodejs](nodejs.org) and run `npm install uglify-js -g`.
On Windows, you can run `build.bat` from root directory and it will package `embedSWF.debug.js` into `embedSWF.js`.
## License
embedSWF is available under the terms of the [MIT License](https://github.com/niceue/embedSWF/blob/master/LICENSE.txt).