Chat LIVE With Programming Experts! There Are 23 Online Right Now...

Welcome to Dream.In.Code
Become an Expert!

Join 244,261 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,239 people online right now. Registration is fast and FREE... Join Now!




resizing/scaling flash movies based on resolution

 
Reply to this topicStart new topic

resizing/scaling flash movies based on resolution

jeffmc21
27 Nov, 2007 - 07:22 PM
Post #1

D.I.C Head
**

Joined: 27 Nov, 2007
Posts: 56


My Contributions
My question is two-fold. Is there a way to detect a user's screen resolution and automatically have the flash movie scale to fit the resolution so that there are no scrollbars?

And two, I notice when I insert my flash movie into an HTML page for publishing on the web, the movie is 1)not centered and 2) there is a "border" of dead space around the movie. The movie doesn't cover the entire space of the html page, regardless of what the dimensions of the movie are.

Any help is greatly appreciated. And if I need to supply more info, just let me know what info you need.

User is offlineProfile CardPM
+Quote Post


DilutedImage
RE: Resizing/scaling Flash Movies Based On Resolution
27 Nov, 2007 - 07:58 PM
Post #2

D.I.C Addict
Group Icon

Joined: 20 Nov, 2006
Posts: 644



Thanked: 9 times
Dream Kudos: 25
My Contributions
Try a search; there's TONS of information on those topics.


Are you using ActionScript 2 or 3?

When you ask about "screen resolution" are you truly wanting to go into full screen mode, or full window?
User is offlineProfile CardPM
+Quote Post

jeffmc21
RE: Resizing/scaling Flash Movies Based On Resolution
28 Nov, 2007 - 11:12 AM
Post #3

D.I.C Head
**

Joined: 27 Nov, 2007
Posts: 56


My Contributions
QUOTE(DilutedImage @ 27 Nov, 2007 - 08:58 PM) *

Try a search; there's TONS of information on those topics.


Are you using ActionScript 2 or 3?

When you ask about "screen resolution" are you truly wanting to go into full screen mode, or full window?

I'm using Actionscript 2 I think. I'm not very versed in either, I can use the Script Assist enough to survive in Flash Pro 8.

I mean full window, I guess. Assuming the user has their browser window maximized, I would love for the flash movie to resize to fit that full window based on the user's screen resolution.

The #1 main issue that I would love to find a resolve to would be the "border" around my flash movie on an html webpage. It means that the background of the flash doesn't cover the whole page and leaves a white (or html background color) border around the movie.
User is offlineProfile CardPM
+Quote Post

DilutedImage
RE: Resizing/scaling Flash Movies Based On Resolution
28 Nov, 2007 - 12:17 PM
Post #4

D.I.C Addict
Group Icon

Joined: 20 Nov, 2006
Posts: 644



Thanked: 9 times
Dream Kudos: 25
My Contributions
QUOTE(jeffmc21 @ 28 Nov, 2007 - 12:12 PM) *
The #1 main issue that I would love to find a resolve to would be the "border" around my flash movie on an html webpage. It means that the background of the flash doesn't cover the whole page and leaves a white (or html background color) border around the movie.


Set the BODY margin to 0px within your HTML file:
CODE
<body style="margin:0px;">



As for making the flash piece scale to fit the window, simply set the SWF's width and height to "100%" where it's been embedded in the HTML file.
User is offlineProfile CardPM
+Quote Post

jeffmc21
RE: Resizing/scaling Flash Movies Based On Resolution
28 Nov, 2007 - 12:21 PM
Post #5

D.I.C Head
**

Joined: 27 Nov, 2007
Posts: 56


My Contributions
QUOTE(DilutedImage @ 28 Nov, 2007 - 01:17 PM) *

QUOTE(jeffmc21 @ 28 Nov, 2007 - 12:12 PM) *
The #1 main issue that I would love to find a resolve to would be the "border" around my flash movie on an html webpage. It means that the background of the flash doesn't cover the whole page and leaves a white (or html background color) border around the movie.


Set the BODY margin to 0px within your HTML file:
CODE
<body style="margin:0px;">



As for making the flash piece scale to fit the window, simply set the SWF's width and height to "100%" where it's been embedded in the HTML file.


Yeah, I had performed the search you mentioned earlier, and had found that "fix", however, it doesn't work for me. I inserted it into the html and the border is still there. I also tried using a table at 100% and the border is still there...especially on the left and right sides. The flash movie is built on a stage of 800x600, but my screen is 1024x768.

User is offlineProfile CardPM
+Quote Post

DilutedImage
RE: Resizing/scaling Flash Movies Based On Resolution
28 Nov, 2007 - 01:53 PM
Post #6

D.I.C Addict
Group Icon

Joined: 20 Nov, 2006
Posts: 644



Thanked: 9 times
Dream Kudos: 25
My Contributions
Can you post a link then, so that I can see what you're talking about?

p.s. Are you wanting the aspect ratio of the Flash piece to change as well?
User is offlineProfile CardPM
+Quote Post

jeffmc21
RE: Resizing/scaling Flash Movies Based On Resolution
28 Nov, 2007 - 04:03 PM
Post #7

D.I.C Head
**

Joined: 27 Nov, 2007
Posts: 56


My Contributions
Here's a link to a testing site I use. You can look at Example 1 under Pro-Tec Security to see the most clear example of what I am talking about. The examples under Collegewalk also have the problem, but are hidden because of the use of the same background color in the HTML. I am wanting to use a background image in both instances. I would want it to be visible behind the content areas of both flash sites.

http://sitetesting.jlmresources.com/


Thanks for all your help and time.

User is offlineProfile CardPM
+Quote Post

DilutedImage
RE: Resizing/scaling Flash Movies Based On Resolution
28 Nov, 2007 - 04:17 PM
Post #8

D.I.C Addict
Group Icon

Joined: 20 Nov, 2006
Posts: 644



Thanked: 9 times
Dream Kudos: 25
My Contributions
If I'm understanding you correctly, you're wanting the gray portion to disappear?
User is offlineProfile CardPM
+Quote Post

DilutedImage
RE: Resizing/scaling Flash Movies Based On Resolution
28 Nov, 2007 - 04:27 PM
Post #9

D.I.C Addict
Group Icon

Joined: 20 Nov, 2006
Posts: 644



Thanked: 9 times
Dream Kudos: 25
My Contributions
If that's the case, then you'll need to add the "wmode" parameter to your HTML. For example:

CODE
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="800" height="800">
    <param name="movie" value="protec1_2.swf" />
    <param name="quality" value="high" />
    <param name="wmode" value="transparent" />
    <embed src="protec1_2.swf" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="800" height="800"></embed>
</object>



EDIT:

I was just looking at the Publish Settings, and I think I found the perfect setting for what you're looking for. Under the HTML tab, set the "Window Mode" property to "Transparent Windowless".

That will make the Flash consume the entire window, and have a transparent background. You could then modify the HTML to use whatever background image you'd like.

This post has been edited by DilutedImage: 28 Nov, 2007 - 04:27 PM
User is offlineProfile CardPM
+Quote Post

jeffmc21
RE: Resizing/scaling Flash Movies Based On Resolution
28 Nov, 2007 - 09:56 PM
Post #10

D.I.C Head
**

Joined: 27 Nov, 2007
Posts: 56


My Contributions
icon_up.gif icon_up.gif You, my friend, are now on my list of heroes!! I used the extra parameter in the code and it worked perfectly. I greatly appreciate the help you provided. biggrin.gif

User is offlineProfile CardPM
+Quote Post

DilutedImage
RE: Resizing/scaling Flash Movies Based On Resolution
28 Nov, 2007 - 11:50 PM
Post #11

D.I.C Addict
Group Icon

Joined: 20 Nov, 2006
Posts: 644



Thanked: 9 times
Dream Kudos: 25
My Contributions
Glad I could help. smile.gif
User is offlineProfile CardPM
+Quote Post

nfordham
RE: Resizing/scaling Flash Movies Based On Resolution
15 Jan, 2008 - 01:30 PM
Post #12

New D.I.C Head
*

Joined: 15 Jan, 2008
Posts: 1

Dude, you ROCK!!! 3 Yrs. I too look at you as a hero!!!!!
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 7/4/09 11:44AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month