Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 04-07-2005, 06:35 PM   #1
ericdaft
www.donovansmom.com
 
Join Date: Jan 2005
Location: Chicago
Posts: 20
Question Full Browser Flash

Hey everyone-
quick question about size...what's the best way to accomplish Full Browser Flash? Ive always had issues with this becuase of the difference in user displays. anyone have any suggestions? thanks everyone

Eric
ericdaft is offline   Reply With Quote
Old 04-07-2005, 06:44 PM   #2
Flash Gordon
rather be programming
 
Flash Gordon's Avatar
 
Join Date: Feb 2005
Location: City of Angels
Posts: 10,140
Default

i know of two choices: use javascript pop up window--> which i hate thoses and uses width and height = 100%
__________________
trace("Good bye Flash.") Log.i(TAG, "Hello Droid");
Flash Gordon is offline   Reply With Quote
Old 04-08-2005, 10:28 AM   #3
badlorry
Registered User
 
Join Date: Feb 2005
Location: London
Posts: 177
Default

one could try to dynamically resize the visual objects within your movie based on the Stage width and size. You can place a listener on the onResize event of the stage and link that to the various objects so that they react in terms of size and position to the stage dimensions. This would avoid any nasty image blurring problems with jpegs, by avoiding the bitmap scaling in the first place and give a clean finish to the site.
badlorry is offline   Reply With Quote
Old 04-21-2005, 12:46 PM   #4
gromit
the off-and-onable
 
gromit's Avatar
 
Join Date: Oct 2001
Location: UK
Posts: 183
Default

Hi

I was wondering if badlorry's methodology solved the problem? I'm considering doing a site that is 100% to the browser width and height - but I don't want any of the site's contents (mcs and dynamically loaded images) to scale. I need them to stay the same size all of the time, but arrive in from the edges of the browser.

The best example of what I'm talking about is this site....

http://www.spin.co.uk/

I saw a thread on this forum with an example of how to get the browser height and width at any one time. But I'm a bit confused as to what my starting point would be - ie. what size stage would I work with???! This probably seems like a silly question, but I'm finding it hard to get my head around. Can anyone help?
__________________
Gromit

The Burned Out Hippy
Plagro Design
gromit is offline   Reply With Quote
Old 04-21-2005, 02:05 PM   #5
gring
Registered User
 
Join Date: Apr 2004
Location: France
Posts: 52
Default

well, the solution would be to publish the movie with the scale attribute set to "noscale" and the salign attribute set to "lt" (left top) then resize the movie with javascript. Then you can transmit from javascript the new width and height.

Code:
<SCRIPT type=\"text/javascript\" LANGUAGE=\"JavaScript\">
function size_flash(){
var flash_animation = window.document.flash_animation;
var width = window.innerWidth||document.body.clientWidth;
var height = window.innerHeight||document.body.clientHeight;

// Sets the width and the height of the flash animation in the html document
flash_animation.width = width;
flash_animation.height = height;

// then we send the new width and height to actionscript
flash_animation.SetVariable(\"new_width\",width);
flash_animation.SetVariable(\"new_height\",height);
}
Then you launch this function when your page loads (i.e. with a onLoad in the Body tag of your html page), or when the browser window is resized (onResize)

this is what i do here: http://www.azulejos.com/dev

but there are still many problems I have to solve...
- This works fine on IE based browsers, but on mozilla you have to delay the resize... It doesn't work on Opera and KHTML (safari, konqueror) based browsers for now, perhaps it can be done with a server side script and a form which sends the width and height of the browser.
- Some older mozilla versions of the flash plugin doesn't acknowledge the salign parameter, and centers the animation when you resize its container. You have to workaround it by moving _root._x and _root._y ...

Last edited by gring; 04-21-2005 at 02:11 PM.
gring is offline   Reply With Quote
Old 04-21-2005, 02:17 PM   #6
gromit
the off-and-onable
 
gromit's Avatar
 
Join Date: Oct 2001
Location: UK
Posts: 183
Default

Thanks for your reply however, now I'm really confused - javascript the only method of finding the browser width and height? The reason I ask is because of the code in this thread :

http://www.actionscript.org/forums/s...ghlight=100%25

I figured that I'd set the main swf to run at 100%x100%, and that guy's code would find my browser edges. Was I right in assuming that do you think?

If that is true, the main thing I can't get my head around is the stage size - how big do I make the stage if the browser is reading the flash as 100% height and width?? And how do I noscale each individual object? Do I simply repeat the code inside the mc?

This is my first attempt at something this ambitious so please bear with me
__________________
Gromit

The Burned Out Hippy
Plagro Design
gromit is offline   Reply With Quote
Old 04-21-2005, 02:41 PM   #7
gring
Registered User
 
Join Date: Apr 2004
Location: France
Posts: 52
Default

Well, I just learnt something... his method seems cleaner to get the animation's width and height from actionscript. However, we still have to resize the animation's container in the html page... Maybe it's easier to set a width=100% and height=100% in the html object tag...

I Just don't know how it behaves on Mozilla... Mozilla may generate scrollbars... we have to try.
gring is offline   Reply With Quote
Old 04-21-2005, 02:46 PM   #8
gromit
the off-and-onable
 
gromit's Avatar
 
Join Date: Oct 2001
Location: UK
Posts: 183
Default

I'm glad I'm not alone I'll run some experiments over the next couple of days and post the results in this thread.
__________________
Gromit

The Burned Out Hippy
Plagro Design
gromit is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:39 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.