Pages: [1]
  Print  
Author Topic: index html for Gaia site  (Read 836 times)
naturewalker
Gaia User
**
Posts: 11



« on: February 27, 2010, 08:03:32 AM »

I am new to Gaia and am in the process of building my site. I am currently hosting the sample site on my localhost and having trouble with the embedding of the swf.
Why am I seeing all of my assets that are outside of my swf's stage area? I have built this site  previously outside of Gaia, generating the index.html from Flash CS4 and had no problems like I'm having in Gaia.
I realize this is probably a very simple fix but have not been unable to find any help with it. Please, any help would be greatly apprieciated, I need to get beyound this point. What I am looking for is for the swf to fill the browser window.
Below is my index.html.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Gaia Framework Site</title>
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript" src="js/swfaddress.js"></script>
<script type="text/javascript">
var params = {
quality: "high",
scale: "exactfit",
wmode: "window",
allowscriptaccess: "always",
bgcolor: "#FFFFFF"
};
var flashvars = {
siteXML: "xml/site.xml"
};
var attributes = {
id: "flashcontent",
name: "flashcontent"
};
swfobject.embedSWF("main.swf", "flashcontent", "100%", "100%", "9.0.124", "expressInstall.swf", flashvars, params, attributes);
</script>
<style type="text/css">
/*hide from ie on mac\*/
html {
height: 100%;
overflow: hidden
}
#flashcontent {
width: 100%;
height: 100%;
}
/* end hide */
body {
height: 100%;
margin: 0;
padding: 0;
background-color: #FFFFFF;
}
</style>
</head>
<body>
<div id="flashcontent">
<!--SEO-->
<div id="noflash">
<p><strong>You need to upgrade your Flash Player</strong></p>
<p>This is replaced by the Flash content.</p>
<p>Place your alternate content here and users without the Flash plugin or with
Javascript turned off will see this. Content here allows you to leave out <code>noscript</code>
tags. Include a link to <a href="index.html?detectflash=false">bypass the detection</a> if you wish.</p>
</div>
</div>
</body>
</html>
Logged

naturewalker
Ouroboros
Gaia Fan
***
Posts: 146



« Reply #1 on: February 27, 2010, 11:30:43 AM »

It's really hard to say, as you haven't given much info, but as a guess I'm thinking you've scaffolded a new project in flash and set height and width properties for it  in the gaia panel?

Take a look in the main.as and you will probably find a line something like this
Code:
alignSite(x,y);

comment out this line, recompile main.swf and open it again in your browser...

Is this what you're after?
Logged
Ramiro
Moderator
Gaia Addict
*****
Posts: 825


interactive pragmatism


« Reply #2 on: February 27, 2010, 11:30:55 AM »

Why am I seeing all of my assets that are outside of my swf's stage area?

Huh Huh Huh I can't understand what's happening to you...
If you start a brand new gaia project, scaffold the default site.xml generate, and then browse to the bin folder inside the project (place the project inside your localhost for example), do you see the site working correctly?

What I am looking for is for the swf to fill the browser window.

In the project panel, in the fist tab, check the size and align settings. place 100% to both width and height and the flash will fit the browser window.
Logged
Ouroboros
Gaia Fan
***
Posts: 146



« Reply #3 on: February 27, 2010, 11:34:12 AM »

Haha, I beat Ramiro to the first response by 12 seconds..... Grin

very similar answers though.
Logged
naturewalker
Gaia User
**
Posts: 11



« Reply #4 on: February 27, 2010, 01:14:02 PM »

Thank you to all who replied. My apologies for not making myself clear. I have the size and align setting in the project panel checked for 100%. My project size is 1024 x 768. Attached is a screen capture of what I am seeing in the browser from localhost (The red rule shows my swf size).
Previously I built a sample of this site without Gaia which works fine.
« Last Edit: February 28, 2010, 10:05:00 AM by naturewalker » Logged

naturewalker
Ouroboros
Gaia Fan
***
Posts: 146



« Reply #5 on: March 01, 2010, 04:49:30 PM »

so does your Main.as contain a line like below?
Code:
alignSite(1024,768);

Do all of the elements displayed come from your swf project? and it's just some of those elements that overflow 1024 to fill the screen?

Logged
naturewalker
Gaia User
**
Posts: 11



« Reply #6 on: March 02, 2010, 04:45:47 AM »

Yes, the main.as contains the line shown above.

To wrap it up, I have placed a mask the size of the stage to keep from seeing the overflow. In the past (outside Of Gaia) I had never run into this problem of seeing the overflow and had never used masks. I was under deadline and just wanted to get past this before building out the whole site.
What I was hoping to end up with, was  a site that filled the browser window on different monitors no matter the resolution, allowing them to see the complete site without scrolling. Not well versed in all the terminology, I was struggling to communicate and failed.
Logged

naturewalker
Pages: [1]
  Print  
 
Jump to:  

TinyPortal v1.0 beta 4 © Bloc