This extension is a widget to automate the process of use SwfObject in your application.
COMPATIBLE WITH "EXTENSION-DOWNLOAD" COMMAND :)
Resources ¶
Documentation ¶
Requirements ¶
- Yii 1.0 or above
Installation ¶
- Extract the release file under
protected/extensions
Usage ¶
Change Log ¶
February 2, 2010 ¶
- Initial release.
flashvars problem~
$this->widget('ext.swfobject.ESwfObject',array( 'swfFile'=>Html::mediaUrl('_resources/open-flash-chart.swf'), 'width'=>600, 'height'=>250, 'flashvars'=>array( 'data-file'=>$this->createUrl('',array('part'=>1)), ), )); ?>
if will generate:
~~~
[javascript]
var flashvars_20101703104330 = {
data-file : "/webmonitor/statistic/article1?part=1"
}
~~~
"data-file" will take mistake~
flashvars problem~
[php]
$this->widget('ext.swfobject.ESwfObject',array(
'swfFile'=>Html::mediaUrl('_resources/open-flash-chart.swf'), 'width'=>600, 'height'=>250, 'flashvars'=>array( 'data-file'=>$this->createUrl('',array('part'=>1)), ),
)); ?>
~~~
if will generate:
[javascript]
var flashvars_20101703104330 = {
data-file : "/webmonitor/statistic/article1?part=1"
}
~~~
"data-file" will take mistake~
Added better json and cleaned up the code a bit
Great work! I have already used this extension in multiple projects.
Over the course of the project, I've done some improvements I'd like to share. It's mostly about encoding json as string data through flash vars in IE that was an issue.
Besides that I've cleaned up the code a bit, and changed the widget code a bit so custom alternative content can be put in between start and end widget.
Download here: https://dl.dropbox.com/u/3318808/swfobject.zip
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.