• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 359
  • Last Modified:

Having trouble embedding a flash file .swf on my home page.


I'm using wondershare to create a 3d gallery.  basically an .swf file that loads pictures into a template and you can interact with it.  Simple, but I can't get it to show on my website.  Here is the html code below.  The file works fine on my computer, but won't run when I upload the "project directory structure" to my website.  In essence I have uploaded the entire TEST folder to the root of my website.  
The structure is:
\test\test.swf (this is the embedded .swf file I want to play)
\test\resource (this is a subdirectory)
\test\resource\res (this is another subdirectory)
\test\resource\xml (this is another subdirectory)
\test\resource\album.xml
\test\resource\res\images  (this has the photos to populate the .swf)


Anyway, I'm sure its a path issue, but not sure what, where and exact syntax to change to.  It just shows a black box no errors, but I suspect it can't find the photos?
\test\resource\config.xml



<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9.0.0.0" width="600" height="450" ID="sf" VIEWASTEXT>
  <param name="movie" value="homepage.swf" />
  <param name="quality" value="high" />
  <param name="wmode" value="window" />
  <param name="allowScriptAccess" value="always" />
  <param name="allowFullScreen" value="true" />
  <embed src="homepage.swf" quality="high" name="sf" allowScriptAccess="always" allowFullScreen="true" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="600" height="450"></embed>
</object>
0
rdelrosario
Asked:
rdelrosario
2 Solutions
 
rdelrosarioAuthor Commented:
the code shows homepage.swf  (it is suppose to say test.swf that was a typo.....  
0
 
dgofmanCommented:
Embedding object class HTML tags is very old syntax use SWFObject JavaScript

http://code.google.com/p/swfobject/
0
 
rdelrosarioAuthor Commented:
I'd love to read about how that works, but I used a 3rd party .swf generator program.  I know very little web programming... enough to do damage.  Can you define the syntax of how to reference my files.  specifically, can you define the  chunk of code that I can copy and paste using your suggestion based on my code sample above.
0
 
Jen0910Commented:
Doesn't matter what you used to generate a swf file, it's still a SWF file. How you implement SWFobject depends a lot on your file, and it also needs additional files you download with the package in order to work correctly. You really should read the documentation, and then try the SWFobject generator after you figure out which implementation suits your needs better.

http://swfobject.googlecode.com/files/swfobject_generator_1_2_html.zip

Download the package here that has the files you need: http://code.google.com/p/swfobject/downloads/detail?name=swfobject_2_2.zip

There are 2 ways to install SWFobject, here is one example of what your code could look like. This is the version I always use.
<head>
<script type="text/javascript" src="swfobject.js"></script>

<script type="text/javascript">
var flashvars = {};
var params = {
  menu: "false",
  loop: "false",
  quality: "high",
  scale: "noscale",
  align: "center",
  wmode: "transparent",
  devicefont: "false",
  allowscriptaccess: "always",
  allownetworking: "all",
  seamlesstabbing: "true",
  allowFullScreen: "true",
  classid: "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
  };
var attributes = {};

swfobject.embedSWF("test.swf", "flashAlt", "600", "450", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
</script>
</head>

<body>
<div id="flashAlt">
Place your alternative content here for users who do not have the correct version of flash player.
</div>
</body>

Open in new window

0
 
CyanBlueCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now