Solved

Flash auto-width

Posted on 2009-04-02
3
563 Views
Last Modified: 2012-05-06
Good Day All...

What is the best way to control the auto-size of a flash banner within <div></div> tags? What I have is a flash banner in the center content area, and I need it to size to 100% width of the container. The height is also resized. This would be usable, except that it creates spacing above and below when the screen is sized down from its original size. I need the content to move in to fill that spacing.

Thanks!
0
Comment
Question by:intelliflex
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Expert Comment

by:Imme-emosol
ID: 24056343
What conent will fill up the spacing?

If the flash content will fill up the spacing , I can say this:
I think you should be able to assign the embed or object an width and height of 100% within the div.

So you might need to give them a position:absolute; as well , don't know exactly.

A search for :
full width full height scaling flash
give enough suggestions on how to do this.

Hope that will help.
0
 
LVL 14

Expert Comment

by:tomaugerdotcom
ID: 24059790
It's also recommended to embed your Flash SWF using SWFObject rather than the default Adobe / DreamWeaver way of doing things.

SWFObject is free and can be downloaded here: http://code.google.com/p/swfobject/
0
 
LVL 14

Accepted Solution

by:
tomaugerdotcom earned 125 total points
ID: 24059795
If you're looking to "stretch" your flash content here is a tip:

exactFit

By default, Flash Player will scale a SWF with a fixed aspect ratio (equivalent of setting scale = "showAll"). If you want the SWF to fit the browser 100% in both directions, you must set the "scale" parameter to "exactFit". Note that this will probably distort your SWF.

Static publishing requires adding two <param> elements as follows:

<object id="flashcontent" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%">
  <param name="movie" value="/lab/_common/sample-masked.swf" />
  <param name="scale" value="exactFit" />
  <!--[if !IE]>-->
  <object type="application/x-shockwave-flash" data="/lab/_common/sample-masked.swf" width="100%" height="100%">
  <param name="scale" value="exactFit" />
  <!--<![endif]-->
    <p>Please update your Flash Player</p>
  <!--[if !IE]>-->
  </object>
  <!--<![endif]-->
</object>
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Stop Ads in Browser Google Chrome 3 558
Virus or Outlook 2007 problem, how to tell? 8 96
Removing Flash from Website 6 78
black magic design 1 135
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question