SwishTalk.com
 

Go Back   SwishTalk.com > .:: THE HELP DESK ::. > Actionscript Help

Reply
 
Thread Tools Display Modes
#1   Aligning objects on browser.  

Name: 
pepo2011
Status: Offline
Rank: Registered User
Posts: 2
Old 04-18-2012, 04:26 PM Reply With Quote


Hi, i got a site designed to fit full screen. Well, now, i want to put a menu on the left side of the screen. I've used this script to make it work:

function fit () {

var SW:Number = Stage.width;
var SH:Number = Stage.height;
tellTarget (topleft_item) {
_x = 0;
_y = 0;
}
tellTarget (topright_item) {
_x = SW - _width - 0;
_y = 0;
}
tellTarget (bottomleft_item) {
_x = 0;
_y = SH - _height - 0;
}
tellTarget (bottomright_item) {
_x = SW - _width - 0;
_y = SH - _height - 0;
}
tellTarget (centered_item) {
_x = SW - SW /2;
_y = SH - SH /2;
}
//make sure that the swf you're loading has the same dimensions as framer
//or change framer to th same dimensions as your loading movie.
tellTarget (framer) {
_x = Math.round(SW / 2 - _width / 2);
_y = Math.round(SH / 2 - _height / 2);
}
}
onSelfEvent (load) {

Stage.scaleMode = "Scale";
Stage.align = "TL";
var rsz:Object = new Object();
rsz.onResize = function ():void { fit ()};
Stage.addListener(rsz);
fit();
}

But now, the proper content of the site is loaded from another movie, but this movie loads on the left too! I need to load this movie on the center of the screen browser. Am I clear? I'm not good with english. Many thanks.




Attached Images
File Type: jpg test.jpg (28.2 KB, 9 views)
 
View Public Profile Find all posts by pepo2011 Add pepo2011 to Your Contacts
#2   Update: upload a swi file  

Name: 
pepo2011
Status: Offline
Rank: Registered User
Posts: 2
Old 04-18-2012, 04:31 PM Reply With Quote


I uploaded a swi file with the example.


Attached Files
File Type: swi test.swi (129.2 KB, 14 views)
 
View Public Profile Find all posts by pepo2011 Add pepo2011 to Your Contacts
Advertisement:





Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump