Center an image in Flash?
Moderator: General Moderators
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Center an image in Flash?
This seems like it should make sense...I have a 32x32 Flash object with a 32x32 image inside set to display at 0.0 (x.y) and is present on all frames in the movie. Why then does the published SWF not display the image? It's a lossless GIF image and the Flash version required is Flash 6 (good support for older operating systems).
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Solution: The code on this site works without the embed element and displays the image...
http://www.dgx.cz/trine/item/how-to-cor ... into-xhtml
I am unaware of what the difference is between the XHTML I was using and this, but it works. If anyone has the same problem with Flash not displaying the image (or you initially think it's not being centered like I did) use the code below...
Quoted XHTML...
http://www.dgx.cz/trine/item/how-to-cor ... into-xhtml
I am unaware of what the difference is between the XHTML I was using and this, but it works. If anyone has the same problem with Flash not displaying the image (or you initially think it's not being centered like I did) use the code below...
Quoted XHTML...
Code: Select all
<!--[if !IE]> -->
<object type="application/x-shockwave-flash"
data="movie.swf" width="300" height="135">
<!-- <![endif]-->
<!--[if IE]>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
width="300" height="135">
<param name="movie" value="movie.swf" />
<!--><!---->
<param name="loop" value="true" />
<param name="menu" value="false" />
<p>This is <strong>alternative</strong> content.</p>
</object>
<!-- <![endif]-->- gregwhitworth
- Forum Commoner
- Posts: 53
- Joined: Tue Oct 09, 2007 1:00 am
- Location: Wasilla, Alaska
I'm not fully understanding your issue, but it seems as though you are only using 1 browser to check your work as your fix is an IE hack; because IE goes on their own little rabbit trail on how to make things appear in a browser. I would highly recommend downloading Firefox and testing your sites in both browsers, as you need to make sure that your site is consistent universally, not just on the more popular browser.
Also, had you checked it in Firefox, you would have seen that your Flash was perfectly fine and the fault was with IE.
Good Luck and keep up the hard work,
Greg
Also, had you checked it in Firefox, you would have seen that your Flash was perfectly fine and the fault was with IE.
Good Luck and keep up the hard work,
Greg
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Thanks for the reply Greg. I have since determined that Flash has somehow become corrupted to the point of having to reinstall XP sometime in the somewhat near future. While the odd code I posted worked fine on a second computer I'll probably revert back to my original which I knew worked just fine. Strange the uninstaller for Flash didn't truly uninstall, new profiles for Gecko browsers, etc. I'm just going to reinstall XP soon. Thanks again for your reply and welcome to the forums. 