johncurriewebdesign.com

  • Increase font size
  • Default font size
  • Decrease font size
Articles on Web Design & Development Techniques

SWFObject, Full Browser Flash

Email Print PDF

1. How can I create a SWF that will encompass 100% of the browser window?

The following technique is also known as Full Browser Flash:

  1. Set both the width and height of your SWF to 100% in your SWFObject definition
  2. Include CSS to get rid of any default margins/padding and set the height of the html element, the body element and the entire chain of block level HTML elements that your SWF will be nested in to 100%, because Firefox (or: any Gecko based browser) in standards compliant mode (or: using a valid DOCTYPE) interprets percentages in a very strict way (to be precise: the percentage of the height of its parent container, which has to be set explicitly):
          
            html, body, #containerA, #containerB { height:100%; }
            body { margin:0; padding:0; overflow:hidden; }
    
  3. Manage the scaling and alignment of your SWF and the positioning of your SWF's elements, within your ActionScript code, e.g.:
          stage.scaleMode = StageScaleMode.NO_SCALE;
          stage.align = StageAlign.TOP_LEFT;
    
          stage.addEventListener(Event.RESIZE, resizeHandler);
    
          function resizeHandler(event:Event):void {
            // center stuff
          }
    
    NOTE: For positioning elements always define a resize handler, because a user can resize the browser window and in Internet Explorer (using the dynamic publishing method) the stage size is only available on first load. When reloading or revisiting a page it will initially be 0, causing the Flash player to keep on triggering the stage.resize event until it receives its current value

Sample Files

LAST_UPDATED2
 

CSS Style Resets: Getting cross-browser pixel-perfect pages

Email Print PDF

Getting sites to look pixel-perfect and identical across the major browsers can be a big pain, primarily because of the defaults in margin and padding size. Here are some ways to deal with this issue:

Comments (0)

LAST_UPDATED2 Read more...
 

Web Design/Development Workflow

Email Print PDF

Hi There!

This will be a changing article, which I'll elaborate on more in the future. Basically I wanted to present my personal Workflow for Web Projects.

I'll describe these later, but for now here are the Steps I typically take, getting Client input at every point along the way before continuing to the next step:

Comments (0)

LAST_UPDATED2 Read more...
 

Photoshop QuickTip: Auto-Select Layer

Email Print PDF

A Quick Tip for Photoshop CS3 users: To be able to select layers just by clicking on their image on the canvas, there is a simple setting you can change.

Just select the Move Tool (V), then check "Auto-Select: Layer" in the Options toolbar that appears at the top. (Window | Options with the Move Tool selected)

Comments (0)

LAST_UPDATED2
 

AS3.0 Preloader Code

Email Print PDF

You need a preloader pretty much any time you put Flash content on the web where people might potentially have to wait while the file downloads. It's nice to have some kind of display to show that your content is being loaded.

This is about as simple a pre-loader as it gets in ActionScript 3.0.

Comments (0)

Read more...
 
  • «
  •  Start 
  •  Prev 
  •  1 
  •  2 
  •  Next 
  •  End 
  • »


Page 1 of 2

Who's Online

We have guest online