Flash SWF Files

Thread Solved

Join Date: Oct 2006
Posts: 2,564
Reputation: mattyd is an unknown quantity at this point 
Solved Threads: 1
Featured Poster
mattyd's Avatar
mattyd mattyd is offline Offline
Posting Maven

Flash SWF Files

 
0
  #1
Feb 19th, 2007
** I am not sure if this is the correct area for this post-- please move to correct forum if necessary-- thanks.

I am redeveloping the website for the company I work for. It is going along quite well but I have a question in regards to Flash; I have never worked with Flash in any way before. I simply wished to add a simple Flash element to the already-made, JPEG header; I did this via a software program which produced a .swf file when saved. This seemed to work fine (I opened the file in IE7 to view it-- it worked.)

I would like to learn and understand how to use this now in the site. I added it into the css sheet in place of the original JPEG header-- I had the feeling it would not un and it didn't.

css code snippet with .swf file
#VISUAL{ width: 750px; text-align: right; margin-left: auto; margin-right: auto;  height: 122px;  background-color: #1F7A2A;  background-image: url(redSquares.swf);  background-repeat: no-repeat;}
Any help or push in the right direction would be very much appreciated. I really want to understand this issue as well as fix this problem.

Kind Regards,
Matty D
Last edited by mattyd; Feb 19th, 2007 at 4:03 am.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 1,091
Reputation: MattEvans is a jewel in the rough MattEvans is a jewel in the rough MattEvans is a jewel in the rough 
Solved Threads: 63
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Veteran Poster

Re: Flash SWF Files

 
1
  #2
Feb 19th, 2007
I won't claim to know exactly why it won't work, and I don't know how you could make it work in that way.

However; a flash .swf file is not an image file. To put a flash object on a page, you have to have to 'embed' it on a page. Using an actual 'embed' tag work in most cases sometimes, but the apparent 'correct' way is to use 'object' tags.

The best way is to use embed tags inside object elements, because 'object' does some compatibiity delegation. (so if object fails, embed should work)

Linking a flash file from an image tag (equivelent to putting it as a background image in CSS) will not work; in the same way as linking an html file to an 'image' tag's src won't work. The browser expects the response to looking for that source image to return an image type result, if it doesn't find one, it treats it as it would if nothing was at that location. (Note: If the flash file identified itself as an image type, it wouldn't be processed as a flash movie,)

If you know how to embed flash movies on a page, and just want objects to appear on top of it (as if it was a background), you might have some sucess with absolutely positioned elements 'on top' of the movie. That's quite a detailed subject in itself, but as a snippet:

Graphics and Multimedia Syntax (Toggle Plain Text)
  1. <html>
  2. <body style="margin:0;padding:0">
  3. <embed src="your_flash.swf" type="application/x-shockwave-flash"/>
  4. <div style="color:white;position:absolute;left:0;top:0;">
  5. This should be on top of your Flash movie.. Perhaps.
  6. </div>
  7. </body>
  8. </html>

If you don't have macromedia flash mx (flash mx produces HTML embed/object code automatically, which is certainly useful when you see how big it can end up), then check this resource:

http://www.adobe.com/cfusion/knowled...cfm?id=tn_4150
Plato forgot the nullahedron..
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 2,564
Reputation: mattyd is an unknown quantity at this point 
Solved Threads: 1
Featured Poster
mattyd's Avatar
mattyd mattyd is offline Offline
Posting Maven

Re: Flash SWF Files

 
0
  #3
Feb 19th, 2007
Originally Posted by MattEvans View Post
I won't claim to know exactly why it won't work, and I don't know how you could make it work in that way.

However; a flash .swf file is not an image file. To put a flash object on a page, you have to have to 'embed' it on a page. Using an actual 'embed' tag work in most cases sometimes, but the apparent 'correct' way is to use 'object' tags.

The best way is to use embed tags inside object elements, because 'object' does some compatibiity delegation. (so if object fails, embed should work)

Linking a flash file from an image tag (equivelent to putting it as a background image in CSS) will not work; in the same way as linking an html file to an 'image' tag's src won't work. The browser expects the response to looking for that source image to return an image type result, if it doesn't find one, it treats it as it would if nothing was at that location. (Note: If the flash file identified itself as an image type, it wouldn't be processed as a flash movie,)

If you know how to embed flash movies on a page, and just want objects to appear on top of it (as if it was a background), you might have some sucess with absolutely positioned elements 'on top' of the movie. That's quite a detailed subject in itself, but as a snippet:

Graphics and Multimedia Syntax (Toggle Plain Text)
  1. <html>
  2. <body style="margin:0;padding:0">
  3. <embed src="your_flash.swf" type="application/x-shockwave-flash"/>
  4. <div style="color:white;position:absolute;left:0;top:0;">
  5. This should be on top of your Flash movie.. Perhaps.
  6. </div>
  7. </body>
  8. </html>
If you don't have macromedia flash mx (flash mx produces HTML embed/object code automatically, which is certainly useful when you see how big it can end up), then check this resource:

http://www.adobe.com/cfusion/knowled...cfm?id=tn_4150
Matt:

Hi. Thank-you for your reply.

I got it to work a bit ago. :cheesy: I used something similar to what you posted; With a few formatting tweaks for the page HTML, it worked great :!::eek: Very exciting. I love figuring things out, researching, hacking around a bit, and getting a working result

Thanks again for your help.

Kind Regards,
Matty D
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: Flash SWF Files

 
1
  #4
Feb 19th, 2007
do you have a link to your company's website. I would like to see what you did with the flash.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 2,564
Reputation: mattyd is an unknown quantity at this point 
Solved Threads: 1
Featured Poster
mattyd's Avatar
mattyd mattyd is offline Offline
Posting Maven

Re: Flash SWF Files

 
0
  #5
Feb 19th, 2007
Originally Posted by iamthwee View Post
do you have a link to your company's website. I would like to see what you did with the flash.
I am building it off-line. I will be sure to post a link for you when it goes live. Thanks for the interest.

Matty
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: Flash SWF Files

 
0
  #6
Feb 19th, 2007
Originally Posted by mattyd View Post
I am building it off-line. I will be sure to post a link for you when it goes live. Thanks for the interest.

Matty
What type of company is it?
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 2,564
Reputation: mattyd is an unknown quantity at this point 
Solved Threads: 1
Featured Poster
mattyd's Avatar
mattyd mattyd is offline Offline
Posting Maven

Re: Flash SWF Files

 
0
  #7
Feb 19th, 2007
Software (independent game studio)
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 6
Reputation: bigtarr is an unknown quantity at this point 
Solved Threads: 0
bigtarr bigtarr is offline Offline
Newbie Poster

Re: Flash SWF Files

 
0
  #8
Apr 2nd, 2009
Originally Posted by mattyd View Post
Matt:

Hi. Thank-you for your reply.

I got it to work a bit ago. :cheesy: I used something similar to what you posted; With a few formatting tweaks for the page HTML, it worked great :!::eek: Very exciting. I love figuring things out, researching, hacking around a bit, and getting a working result

Thanks again for your help.

Kind Regards,
Matty D

matt,
can you share with me how you got the .swy file to work. I am doing a website for one of my college classes and I keep trying to get my .swf to work but it's been a no go.

thx.
Brandon
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 1
Reputation: Ankitpb is an unknown quantity at this point 
Solved Threads: 0
Ankitpb Ankitpb is offline Offline
Newbie Poster

Re: Flash SWF Files

 
0
  #9
May 2nd, 2009
just u use Flash software and develop ur document and published web paged by press F12. U will get the code from the source code of that page copy the code and past it to HTML page, this is the simple way to input .swf file in HTML.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Graphics and Multimedia Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC