Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 12-09-2005, 02:22 PM   #1
hoppl
Registered User
 
Join Date: Nov 2005
Posts: 42
Default Enlarge .swf in HTML up to a certain point..???

Hi, I'm trying to accomplish something here.

Basically, what I'd like is to have my swf site, shrink in the browser if there isn't enough space (like on a 15inch screen, for example..).

But if the user has a better resolution, have the swf enlarge up to a certain point, like 120% of the original Flash dimension... So, the swf would stop enlarging at 120%, if there is more space, it would sit there in the middle of the browser...

What I want is not to have the site full screen on huge 19 and 21 inch screen (have it at 120% max for example), but to have it 100% (shrink if to big) in smaller browser windows...

Hope you can understand.... Thanks...
hoppl is offline   Reply With Quote
Old 12-11-2005, 03:49 AM   #2
farafiro
Addicted To FLASH
 
farafiro's Avatar
 
Join Date: Dec 2001
Location: Egyptian in UAE
Posts: 12,436
Send a message via MSN to farafiro Send a message via Yahoo to farafiro
Default

I've made this sometime ago
ActionScript Code:
// determin the movie width and height mcWidth = 400 mcHeight = 400 //making the listener object that the stage will listen to resizeListener = new Object() resizeListener.onResize = function(){         Stage.align = "C"         //script for detecting if the stage resized and re-arrange the stage         if(Stage.height<mcHeight || Stage.width<mcWidth){                 Stage.align = "TL"                 _root._xscale =_root._yscale = Math.min(Stage.width,Stage.height)/400*100         } } //make the stage listens to our listner Stage.addListener(resizeListener)
__________________
‚€* GOD Is Near ‚€*
Questions Don't PM for Questions . Thanks
An eye for an eye, make the whole world blind
_____________________________________________GHANDI
farafiro 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flash, JavaScript and the HTML DOM (dHTML) drZoode HTML and JavaScript 10 08-21-2008 06:59 PM
Loadmovie into .swf in HTML Deadhands ActionScript 1.0 (and below) 5 07-04-2004 07:25 PM
right:::: please help with 2 seperate .swf files interaction on one htl page markjensen Other Flash General Questions 2 11-04-2002 12:45 AM
HTML button to pass instructions to .swf westcoastdesign ActionScript 1.0 (and below) 2 02-08-2001 02:35 PM


All times are GMT. The time now is 06:01 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.