Page 1 of 1
Center an image in Flash?
Posted: Sat Aug 25, 2007 11:54 pm
by JAB Creations
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).
Posted: Sat Aug 25, 2007 11:59 pm
by JAB Creations
Also when the file is played in regular Flash player (directly through XP, not the browser) the image does appear fine).
I just tried putting the image on a different layer (hiding and showing the other layer and making sure I get Flash's z-index correct) and I'm still having this issue?

Posted: Sun Aug 26, 2007 12:20 am
by JAB Creations
Removing embed element disables the image...why?
Posted: Sun Aug 26, 2007 12:32 am
by JAB Creations
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...
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]-->
Posted: Sun Oct 14, 2007 1:06 am
by gregwhitworth
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
Posted: Sun Oct 14, 2007 3:23 am
by JAB Creations
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.
