| | |
Flash SWF Files
Please support our Graphics and Multimedia advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
** 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
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
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;}Kind Regards,
Matty D
Last edited by mattyd; Feb 19th, 2007 at 4:03 am.
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:
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
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)
<html> <body style="margin:0;padding:0"> <embed src="your_flash.swf" type="application/x-shockwave-flash"/> <div style="color:white;position:absolute;left:0;top:0;"> This should be on top of your Flash movie.. Perhaps. </div> </body> </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..
•
•
•
•
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:
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:Graphics and Multimedia Syntax (Toggle Plain Text)
<html> <body style="margin:0;padding:0"> <embed src="your_flash.swf" type="application/x-shockwave-flash"/> <div style="color:white;position:absolute;left:0;top:0;"> This should be on top of your Flash movie.. Perhaps. </div> </body> </html>
http://www.adobe.com/cfusion/knowled...cfm?id=tn_4150
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
•
•
Join Date: Apr 2009
Posts: 6
Reputation:
Solved Threads: 0
•
•
•
•
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
![]() |
Similar Threads
- XHTML with PHP validation ??? (HTML and CSS)
- SWF Protect v1.0 (Graphics and Multimedia)
Other Threads in the Graphics and Multimedia Forum
- Previous Thread: photo gallery template
- Next Thread: Online TV and Radio
| Thread Tools | Search this Thread |
3d 10 actionscript3 adobe adobeacrobat adobereader air ajax amazon amf apple button cart childprotection cloud dashboard dell design dojofoundation dreamweaver ebay eclipse ecommerce elasticcomputecloud embed endorsement extra family flash flash-develop flashlite flex free harddrive iamthwee ibm illustrator imflash intel interactivemap javafx javascript laptop legal map micron microsoft mobile monitoringsoftware moonlight multimedia myspace nand news novell panorama pdf pedophiles photoshop photosynth php safety sandisk security shopping silverlight solidstatedrive sproutcore ssd streaming swf table ukmap unload unwanted video vulnerability web white.space xml zend zephyr zeroday






