AS3 .swf file not playing or previewing when uploaded to server - html

Help needed.
I have a .swf file of a flash game created using AS3. I have added it to a HTML file using object tag. When I test file locally in a browser window on my MAC it plays .swf file. The file is contained in the same folder as html file. When I upload it to server and review on FF/Chrome/Safari it will only display white boxes.
Previously I tried using jquery swfobject, same issue.
I've stripped down the code to bear minimun and used to different examples found online and am having no luck.
Code Sample:
<!DOCTYPE html>
<html>
<body>
<object
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash /swflash.cab#version=8,0,0,0">
<param name="SRC" value="BodyShopGame.swf">
<embed src="BodyShopGame.swf"></embed>
</object>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="339" height="513">
<param name="movie" value="BodyShopGame.swf">
<embed src="BodyShopGame.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="339" height="513"></embed>
</object>
</body>
</html>
Site Link: http://www.stellacurley.com/flashtest.html
I've also tested on a PC and issue is the same. I know I have overlooked something obvious but have spent a long time trying to figure out the answer. I'm new to this, so any help would be much appreciated thanks.

A white box commonly indicates the movie failed to load. Use your browser's developer console to see if the request for the SWF is returning a 404 (file not found) error.
Checklist:
Ensure you're using the correct path to the SWF
Ensure your SWF has been uploaded
Ensure your SWF is properly named (case-sensitive on some servers)
Ensure your server is configured to host SWF files (mime type application/x-shockwave-flash should be enabled)

Related

Flash file not playing on browser from server

I have a flash file on my server and I am trying to open it on my browser. If I call for it directly, it downloads the file. If I embed it in html file and then call the html file, it does not display the flash file. Is there any other way to access it without converting flash file into any other format?
Following is my code in html:-
<html>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" width="498" height="380" id="test1">
<param name="movie" value="game.swf" />
<embed src="game.swf" width="498"
height="380" name="test1" type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer" />
</object>
</html>
It sounds to me that your web server is not configured to serve SWF's (aka: it doesn't know what it is). This is typical on barebones IIS installations. Therefore, it forces a "download file" header when you request the file.
Check your web server config to ensure it is allowing SWF files to be served.

How can I play a flv file that is hosted on a remote website?

I'm looking to play a flash video hosted on a remote website. I've tried the following (and profuse google-ing):
In source of page on http://fakesite1.com/player.jsp:
<embed src = "FlashPlayer.swf?file=http://fakesite2.net/video.flv" />
I can browse to http://fakesite2.net/video.flv and ensure it's there, but the player comes back "movie not loaded" (on right-click) on fakesite1. My initial guess is that this might be some sort of security feature... is it possible to play a video hosted on a remote site?
The message "Movie not loaded" as seen in the context menu of an SWF object in a webpage means that the .swf file was not loaded by the browser plugin. The main cause is that that SWF file doesn't exist and the plugin got a 404 error, in which case make sure that the path to the SWF file is correctly set.
Also, the <embed> element is obsolete in modern HTML. Use <object> instead, as seen below.
Note that various versions of IE (except IE9/10, possibly including IE8) do not support the HTML5 <object data="" /> element, they prefer the IE4-era <object clsid="" /> element, so use a conditional comment, like so:
<!--[if IE]>
<object width="640" height="480" data="http://mysite.com/myflash.swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" >
<![endif]-->
<!--[if !IE]>-->
<object width="640" height="480" data="http://mysite.com/myflash.swf" />
<!--<![endif]-->
Try;
<embed
src="player.swf"
width="300"
height="300"
allowscriptaccess="always"
allowfullscreen="true"
id="player1"
name="player1"
file="http://fakesite2.net/video.flv"
/>
Is your SWF file named exactly "FlashPlayer.swf"?
As far as I know in Windows based systems letter case differences don't matter, however in Unix or Linux based ones it does matter. Your host is probably a Linux one. Try using lower case letters like "flashplayer.swf". Make this a habit with files that will be hosted online all the time. Also no space or special characters, use - or _ to seperate words.

getting embedded flowplayer to play a local video file

I embedded flowplayer on an html page using the following <object tag .It successfully plays the mentioned video from their site (ie from url http://stream.flowplayer.org/KimAronson-TwentySeconds1318.flv
However,I would like to play a video from my local filesystem. say /home/me/videos/test.flv
How do I mention the url in this case? What baseurl ,url values should I provide?
<object width="320" height="200" id="undefined" name="undefined"
data="http://releases.flowplayer.org/swf/flowplayer-3.2.10.swf" type="application/x-shockwave-flash">
<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.10.swf" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="flashvars" value='config={"clip":{"baseUrl":"http://stream.flowplayer.org","url":"http://stream.flowplayer.org/KimAronson-TwentySeconds1318.flv"},"canvas":{"backgroundColor":"#112233"},"plugins":{"controls":{"time":false,"volume":true,"fullscreen":false},"content":{"url":"flowplayer.content-3.2.8.swf"}}}' />
</object>
You cannot directly ask the flowplayer to load a file from your local file system. Think about all this flash (swf) files trying to load this file from a remote server, they just cannot simply use whatever in your file system as a resource.
The easiest way to test it out is set up a local server. Be it Apache, IIS, or whatever server you like or easy for you. And then change the config's url to the video's url on your local server, which will solve your problem.
You don't need to change any thing for baseUrl as this is where all this flowplayer flash files being loaded. For example, the content url in your provided code will be baseurl + content.url => http://stream.flowplayer.org/flowplayer.content-3.2.8.swf.
However, once you put your page into production, you may need to consider about hosting this flash files locally to avoid fetch the remote flowplayer server every time. In that case, you need to change the baseUrl to whatever the new server should be.

Fail to embed Flash by using Data uri scheme

i just want to embed a flash like this:
<object
data="data:application/x-shockwave-flash;base64,..."
type="application/x-shockwave-flash">
<param name="movie"
value="data:application/x-shockwave-flash;base64,..."
/> </object>
but it just doesn't work. Did i make any mistake?
thankz
That's because it doesn't work. Not only would you have a buffer overflow, but most browsers don't allow for the inclusion of Flash via Data URIs. If you need a good place to host your Flash, Google Code works just fine.

Flash SWF not playing!

I created a custom video skin for my movie, and published the swf. The file plays on my Mac (using Flash player v9) but it will not play on my PC (using Flash player 10). When I uploaded it to the host, neither players will play the swf. The bitmaps in the flash file show up, but the movie won't play. I don't know if it is how I exported it or what, but it will not play! Any Idea why this is happening?
The video is hosted here:
http://hqinternetsolutions.com/YOGIPATCH/index.html
Here is my Actionscript:
flvPlayback.playPauseButton = playpausebtn;
flvPlayback.muteButton = mutebtn;
flvPlayback.volumeBar = volbar;
flvPlayback.seekBar = seekbar;
And my HTML embedded flash:
<div id="movie">
<object id="movie" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="440" height="273">
<param name="movie" value="file.swf">
<param name="quality" value="high">
<embed src="file.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="440"
height="273"></embed></object>
</div>
Just had a look using Firebug. Your swf appears to be referencing the following URL:
http://hqinternetsolutions.com/Users/larrykain/Desktop/flash%20skin/fullaquatic.flv
It's returning a 404 so it can't find the file. Looking at the URL, check the reference to how you've embedded it in the swf file.
This might be caused by different things:
Make sure the flv file is uploaded to the server along with the SWF.
Your FLV file might be blocked on the web server. Make sure it's not by pointing your browser to the actual FLV file directly (example: http://hqinternetsolutions.com/YOGIPATCH/myvideo.flv)
The flv path set in the FLVPlayback component might be too long.
Try adding a preceding / to the path of FLV in the component.