Hi Guys,
Thanks for helping me out!!!
I know about the Gaia panel option to set 100% width and 100% height
in combination with the center/center option.
This option scales the background (index).
The thing i'm trying to do is to make the diferent pages i've designed
scale up or down as well.
There is an gaia-examplewith 100% width, 100% height and center/center
posted under:
www.pwmedia.nl/test/index.html
what i want is the gaiapages behave like:
www.pwmedia.nl/test/index2.html
(this is just a flas file)
Hope jou can help me!
Thanks so far.
Op 22 jul 2009, om 16:28 heeft Joel Stransky het volgende geschreven:
You should be able to set this in the Gaia panel that's added to the
Flash
IDE when you install the framework.
On Mon, Jul 20, 2009 at 11:09 AM, Mario Gonzalez <[email protected]>
wrote:
I'm not familiar with the Gaia framework, so I'm not sure what some
of
those function calls (alignSite()) or properties are (__WIDTH).
However all you need to do, is call this on onResize
--
x = int(stage.stageWidth/2 - width/2);
y = int(stage.stageHeight/2 - height/2);
-
Another thing to note, is that width and height will change
depending on
whats on the stage.
If you know that going in you will have stuff that might break the
frame
(even if masked), you want to use your preset width and height in
which case
you just call:
--
x = int(stage.stageWidth/ 2 - 1024/2);
y = int(stage.stageHeight/ 2 - 768/2);
---------------
You want to make sure you place the center of the stage to the
center of
your object (half it's width).
Hope it helps,
http://onedayitwillmake.com
PWMedia | Paul Wolthuis wrote:
Hi there,
I've got a question.
I'm sort of a scriptdummy and having a problem to make a gaia sit
fully
scalable.
To make it clear, i want the full site to scale up or down to
the size
of the browserwindow and center it horizontal and vertical.
Hope anyone can help me.
Thanks so far!
Paul
------------------
package
{
import com.gaiaframework.core.GaiaMain;
import flash.display.StageScaleMode;
import flash.display.StageAlign;
import flash.events.Event;
public class Main extends GaiaMain
{
public function Main()
{
super();
siteXML = "xml/site.xml";
}
override protected function
onAddedToStage(event:Event):void
{
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
alignSite(1024, 768);
super.onAddedToStage(event);
}
override protected function onResize(event:Event):void
{
view.x = Math.round((stage.stageWidth -
__WIDTH) /
2);
view.y = Math.round((stage.stageHeight -
__HEIGHT)
/ 2);
}
}
}
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4261 (20090720) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
--
--Joel Stransky
stranskydesign.com
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders