开发者

Rails 3.1 - embedding flash.swf files - best practices?

Having problems embedding my .swf file in rails 3.1. In past versions of rails I'd use s开发者_如何学Cwfobject and simply do:

<div id="swfbox">you don't have flash</div>
<script type ="text/javascript">
    swfobject.embedSWF("swf/AudioRecorder.swf", "swfbox", "400", "400", "10.0.0", "");
</script>

This isn't working in rails 3.1. I'm starting to understand the asset pipeline but I'm still confused where to put the .swf file. So far I've tried of putting everything in /public then /app/assets with a combination using:

<%= asset_path("swf/AudioRecorder.swf") %>


You should be able to put it in any directory you like under app/assets, then reference it with

<%= asset_path("AudioRecorder.swf") %>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜