OnArcade 2: File types
From onArcade Wiki
onArcade supports playing many different file types.
Contents |
File types
- DCR - Adobe Shockwave file
- FLV - Flash video
- Image - all image files (jpg, png, gif...)
- Media - plays videos and audio using Windows Media Player
- SWF - Flash file
- Custom code - any kind of custom HTML code
- Plug - link to real game page (new in onArcade 2.3)
- It is also possible to use iframe to play remote file, just change file location from "Local" or "Linked" to "Frame"
- HTML5Video - plays video using HTML5 video tag (new in onArcade 2.3)
Adding new file type
onArcade makes it easy to add new file types, you just have to upload file type description file to includes/file_type/ directory. File type description file is php file that contains HTML embed code with couple of placeholders for file values.
Available placeholders
- {$file_url} - URL to file
- {$width} - width of the file
- {$height} - height of the file
- {$siteurl} - URL of your arcade
- {$image} - URL to file image (new in onArcade 2.3)
- {$title} - file title (new in onArcade 2.3)
Examples
Image description file:
<!-- Image -->
<img src="{$file_url}" width="{$width}" height="{$height}" border="0" />
onArcade 2.3 SWF description file:
<!-- SWF Player -->
<div id="resize_file" style="width:{$width}px;height:{$height}px;">
<div id="file_div"><a href="http://get.adobe.com/flashplayer/">Get Flash</a> to see this player.</div>
</div>
<script type="text/javascript">
swfobject.embedSWF("{$file_url}", "file_div", "100%", "100%", "8");
</script>
