Welcome, Guest. Please login or register.
Did you miss your activation email?
02/07/12, 08:33
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  General
| |-+  Flash MX 2004 (Moderators: Flash-db, Musicman, vesa kortelainen, Ronald Wernecke, Andresss, papachan)
| | |-+  Browser/screen size
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Browser/screen size  (Read 2080 times)
Ifalldown
Server what's that
*
Posts: 12


View Profile Email
« on: 12/01/09, 19:45 »

I'm working with flash professional 2004 on a website. With many today using larger  monitors how can I adjust the flash website to adapt ( resize ) to the users larger screen./ browser. I've tried some suggested HTML fixes but that has done little good. I have tried some AS with no results.  Anyone have some suggestions?.

Thanks,
Art
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14593


View Profile
« Reply #1 on: 12/02/09, 06:51 »

The usual: publish size 100%x 100% and scaleMode="noScale", then add a listener to the onResize event:

Stage.scaleMode "noScale";
var 
stageListener:Object = new Object();
function 
build(){
     
//do some stuff based on new Stage.widthStage.htight values
}
stageListener.onResize = function(evt:Object) {
   
build()
}
Stage.addListener(stageListener);
build();

Jorge
Logged

Ifalldown
Server what's that
*
Posts: 12


View Profile Email
« Reply #2 on: 12/02/09, 12:14 »

Hi Jorge,

Thank you for responding. After applying the AS and publishing in percentage the browser has lost it's scrollbars?. Now I have visited some flash sites where I've seen this happen before. The user is unable to scroll the site. Is their a fix for this or something I'm doing wrong?.

Thanks,
Art
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14593


View Profile
« Reply #3 on: 12/02/09, 13:37 »

This is related to HTML layout ... the swf should be inside a layer, the layer should have style, position, etc, leaving the swf filling the entire BODY is a bad idea

Jorge
Logged

Ifalldown
Server what's that
*
Posts: 12


View Profile Email
« Reply #4 on: 12/02/09, 15:55 »

I see so loading the main swf. into an MC instance is a bad idea. Make sense. Would importing some CSS for positioning work in your opinion?

Thanks,
Art
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14593


View Profile
« Reply #5 on: 12/02/09, 16:48 »

I mean the swf object itself (doesn't matter inner dependency) You can look at webs that match your needs, since is an HTML thing, just study source code

Jorge
Logged

Ifalldown
Server what's that
*
Posts: 12


View Profile Email
« Reply #6 on: 12/02/09, 19:36 »

Thank you for your help Jorge, good idea. Sorry I dragged this on a bit.

Thanks,
Art
Logged
Ifalldown
Server what's that
*
Posts: 12


View Profile Email
« Reply #7 on: 12/04/09, 15:25 »

I've made some headway with this movie re size to larger screens/browsers but can't seem to get the scrollbars to cooperate. Below is the relevant AS and HTML coding and hope Jorge or some of you can shed some light. The movie doesn't appear to be filling the stage properly either which maybe the problem all together.

Code:
Stage.scaleMode = "noScale";
var stageListener:Object = new Object();
function build(){
this.Stage(0,0);
this.Stage(Stage.width,0);
this.Stage(Stage.height,0);
this.Stage(Stage.width,Stage.height);
}

stageListener.onResize = function(evt:Object) {
   build()
}
Stage.addListener(stageListener);
build();

html coding;

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1
/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>experiment</title>
<style type="text/css">
html,body,object
{
width:100%;
height:100%;

}
html
{
overflow:scroll;
overflow:scroll;
// The above is where I think the problem is however when I enter the scroll method into the body I get a
 scroll bar however it does not scroll the entire movie//
}
body
{
margin:0;
padding:0;
}
</style>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"
width="100%" height="100%" id="experiment" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="experiment.swf" />
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="scale" value="noborder" />
<param name="bgcolor" value="#ffffff" />
<embed src="experiment.swf" menu="false" quality="high" scale="noborder" bgcolor="#ffffff"
width="100%" height="100%" name="experiment" align="middle" allowScriptAccess="sameDomain"
type="application/x-shockwave-flash" </embed>
</object>
</body>
</html>

The publishing setting are w 100%, H 100%, no scale


Thanks,
Art
« Last Edit: 12/04/09, 22:51 by Jorge Solis » Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14593


View Profile
« Reply #8 on: 12/04/09, 22:53 »

Quote
leaving the swf filling the entire BODY is a bad idea

And in your example you just put the swf filling the entire body.
Do you have some page that match your needs so we can study the HTML?

Jorge
Logged

Ifalldown
Server what's that
*
Posts: 12


View Profile Email
« Reply #9 on: 12/05/09, 16:20 »

An example of what I'm trying do can be viewed here

http://www.clickfarminteractive.com/

At the above site no matter what screen size/resolution your viewing the page in you always have a scrollbar. When I publish my page in " match movie " I don't have a problem but when I publish in 100%, no scale I lose the srcollbars. The page I'm working on is 900 x 900. I do have 3 .swf loading into the main page  _ level1-3 but I wouldn't think that would be the problem.  I tried Java, html, css, punching the monitor, screaming, yelling and kicking the dogs but  can't seem to get them damn scrollbars.
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6161


View Profile WWW Email
« Reply #10 on: 12/06/09, 04:30 »

I just opened the site in FireFox and receive a vertical scrollbar, as expected.
Logged

happy flashing
Cool
Ronald
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14593


View Profile
« Reply #11 on: 12/07/09, 08:49 »

The site is a mix between swf and HTML content. Note that swf content is inside a div container:

<div id="clouds">

So the first thing: are you using div containers for the swf

Jorge
Logged

Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
anything