Size of Flash relative to users screen
Hi:
I guess this is a webpage authoring question and I'm a real newbie.
Is there a way for a swf file to display larger on a big monitor and resize to play smaller on a laptop. If I make a flash animation in Xara and import it into dreamweaver can I set attributes to alter it's size within dreamweaver (2004MX)? Normally my flash exports and plays in the pixel size I used to make it in Xara. I have tried using tables in dreamweaver with percentage values but it doesn't seem to alter the size of the flash image. Thanks Andrea
Re: Size of Flash relative to users screen
Hi Andrea,
Using Flash itself I get the following code between the 2 types.
The code for Fixed & Percentage is below:
Code:
Fixed Code
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="250" height="100" id="sizingtest_fixed" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="sizingtest_fixed.swf" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><embed src="sizingtest_fixed.swf" quality="high" bgcolor="#ffffff" width="250" height="100" name="sizingtest_fixed" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
Percentage Code:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="100%" height="100%" id="sizingtest_percent" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="sizingtest_percent.swf" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><embed src="sizingtest_percent.swf" quality="best" bgcolor="#ffffff" width="100%" height="100%" name="sizingtest_percent" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
Notice the width & height attributes are either sizes in pixels or percentages.
You'll need to alter the swf file names of course.
1 Attachment(s)
Re: Size of Flash relative to users screen
Hi,
Like Egg said,you can set your swf to height/width 100% instead of absolute pixel height/width.
Only issue in this is ,as you create a site for 1024x768 screen
and you use a lot of text,the text becomes unreadable in 800x600 screen
Other thing is that the screens nowadays aren't the same dimensions anymore(see attachment)
So this might result in unwanted stretching and this makes the swf content look distorted
Hans
Re: Size of Flash relative to users screen
To say nothing about mobile (cell) phones Hans
Re: Size of Flash relative to users screen
Hi Egg,
But you can make redirects for such screen resolutions.
and of course use the fit on screen script in combination with fullscreen mode
Hans
Re: Size of Flash relative to users screen
Hi:
Thanks to everyone for replying. I had thought about unwanted distortion due to all the new large and widescreen monitor sizes but hadn't considered blackberrys, Iphones etc. This is really complicated! How difficult is it to use redirects and fit on screen options. Is there a tutuorial out there somewhere? Unfortunately the book I have on Dreamweaver 2004 deals doesn't address these issues as 800x600 was pretty much the standard at the time.-Andrea
Re: Size of Flash relative to users screen
Andrea,
its not that complicated. As long as you keep content and layout separated, you can always set the required sizes in the appropriate stylesheets.
An article that could get you going might be:
http://www.alistapart.com/articles/switchymclayout/
Juergen
1 Attachment(s)
Re: Size of Flash relative to users screen
Hi:
I tried changing to percent vs pixels but I couldn't get it to work. I don't know what I am doing wrong. This is my code without any edits. Boy I feel stupid! Thanks for any help. Andrea
object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="601" height="401">
<param name="movie" value="images/gotoflash.swf" />
<param name="quality" value="high" />
<param name="LOOP" value="false" />
<param name="BGCOLOR" value="#FFFFFF" />
<embed src="images/gotoflash.swf" width="601" height="401" loop="False" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#FFFFFF"></embed>
</object>
1 Attachment(s)
Re: Size of Flash relative to users screen
Re: Size of Flash relative to users screen
Try this:
Code:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="100%" height="100%" id="Untitled-4" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="Untitled-4.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="Untitled-4.swf" quality="high" bgcolor="#ffffff" width="100%" height="100%" name="Untitled-4" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>