Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Alignment Of Oblects



Whats the easiest way to anchor events on different layers to the same starting point?

another silly question by,

srf



FlashKit > Flash Help > Flash Newbies
Posted on: 03-05-2002, 10:37 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Alignment
How do I align objects? What I mean is, I have 4 separate text items and would like to align them (left) without doing it manually?

Thanks.

Swf Alignment
Is there anyway to get an SWF to fit exactly (no margins) into an html page? The only way I have been able to do this is to place the SWF into a layer. Otherwise I can get it to fit with a approx. 1/8 inch margin. Should I be happy with this? I really want an exact fit.

Thanks

Alignment Help
OK let's say my movie is in 500 by 500 pixels and let's say I have a text box 200 by 200 pixels. When I go to align the text I have in the text box that is 200 by 200 pixels how can I use the alignment buttons without it a aligning 500 by 500 and just the 200 by 200?

Alignment
i've got an html page which holds my swf file. i've managed to get the swf to be centred from left to right, but what i want to do is get it centred from top to bottom too. i just want the swf to sit in the absolute centre of the html page i.e. halfway between the left and right, and halfway between the top and the bottom. can anyone give me any clues what i need to do with the html? i've tried a few things.....

Alignment
i've got an html page which holds my swf file. i've managed to get the swf to be centred from left to right, but what i want to do is get it centred from top to bottom too. i just want the swf to sit in the absolute centre of the html page i.e. halfway between the left and right, and halfway between the top and the bottom. can anyone give me any clues what i need to do with the html? i've tried a few things.....

Alignment Off
I'm placing a graphic on the stage and when I test the movie it is off by one pixel down and to the left. I manually reset the graphic and it's misaligned on the stage, but then it looks correct in the tested movie.

I created the background and the graphic in the same document, so they are on the same size stage.

What is going on?

.swf Alignment
so iv completed my flash website and have the .swf file ready to become live on the web, but what do i do to have the website centred on the webpage everytime the website is visited.

an example is this website http://www.thechapel.co.uk/

many thanks

Kyle

XML Btn Alignment
Having some issues here with an xml button alignment

ActionScript Code:
private function _position():void {        
           
            //trace("reposition");
            _bgBottom.width = stage.stageWidth;
            _bgBottom.x = Math.ceil(stage.stageWidth/2);
            _bgBottom.y = Math.ceil(stage.stageHeight - _bgBottom.height);
           
            _menuContainer.x = Math.ceil(stage.stageHeight/2);
            _menuContainer.y = Math.ceil(stage.align.LEFT);
            //schedule for change to bg_mc and no resize
            _contentMC.x = Math.ceil((stage.stageWidth/2)- (_contentMC.width/2 ));
            _contentMC.y = Math.ceil((stage.stageHeight/2) - (_contentMC.height/2));           
           
        }

these were set to align obviously bottom center, I wanted them left center any ideas?

Alignment
My flash MX N E V E R put my swf in HTML on center, always in left. Even I set Flash alignment (horizontal and vertical) -CENTER and HTML alignment default. Where is my fault?

Alignment
i just finished making my flash site and aligned it in the center of my html page, but i noticed that the size doesn't adjust when i change the size of my web browser. can someone tell me what i have to add to my source for it to be automatically adjusted? here is a example how it should look like.

http://www.elementskateboards.com/

Alignment
i just finished making my flash site and aligned it in the center of my html page, but i noticed that the size doesn't adjust when i change the size of my web browser. can someone tell me what i have to add to my source for it to be automatically adjusted? here is a example how it should look like.

http://www.elementskateboards.com/

Alignment
i just finished making my flash site and aligned it in the center of my html page, but i noticed that the size doesn't adjust when i change the size of my web browser. can someone tell me what i have to add to my source for it to be automatically adjusted? here is a example how it should look like.

http://www.elementskateboards.com/

Xml Alignment
Look how this xml puuls data and aligns itself when the text is written.

How is this done, can any one expline?
http://amaztype.tha.jp/

Thanks in advanced..//

Alignment
When I use Stage.align = "T" or Stage.align = "TR", it moves the movie clip around on the preview swf but when I publish it and view it through html and my browser, it is in the same place. How come?

Alignment
How come when I use the align design panel the item I am aligning never aligns? It just doesn't move no matter what buttom I push? Any help would be greatly appreciated. Thanks

Movie Alignment
I've produced a square flash movie in Flash4 on my mac.
When I upload this onto the web I want it to appear in the centre of the browsers window and always fit to their individual screen size.

Do I need to add some code to my html file to acheieve this.

Alignment In Actoinscript
With this bit of code:
if ((_ymouse>200) && (_ymouse<270)) {
_root.bridge._yscale = _root.bridge._yscale-3;
}
if (_root.bridge._yscale<=30) {
_root.bridge._yscale = 30;
}

The bridge instance shrinks as the mouse enters the given coordinates.
Unfortunateley it only shrinks upwards, and I would like it to close in from the top and the bopttom, is this possible, or is there a way of keeping the instance centrally aligned on the vertical axis?

If you go to http://www.vulvair.co.uk/flashkit it should help, just move the mouse to the bottom of the image and you'll see the problem.

Text Alignment
Hi!!
First of all I REALLY want to thank everybody who answers these questions, no matter how stupid they may be! My boss actually thinks I know something about Flash!! All I know is this great forum, and you all have been a great help.

Having said that, here goes another stupid question.

I have placed a text box (with some small text in it) in a movie. In the the paragraph panel I chose to "justify" my text. The text aligned it self and looked good, but when I published the movie as HTML it got aligned left only! Is there a simple way to produce a justified text in HTML?

Thanks again!!

Alignment Of Symbols...?
Okay, I know this is a HUGE newbie-type question, but here goes...

When I try to test a newly-made movie clip, I end up viewing it way up in the top left corner of the screen. How do I set the properties of the clip itself so that it's not aligned to the top left corner, but rather to the center of the screen? It's very frustrating, any help would be greatly appreciated.

The Noodle

Text Alignment
obviously text automatically aligns horizonatally.

how do you align text to a circular path?

Movie Alignment
My flash movie will only center on the page... I want to align it to the left side of the browser. Someone PLEASE help! I have tried <*align=left> and <*left> etc etc -- Please help!

Alignment Problem
I am trying to design a banner for a website. The banner should start from the very far left top screen, but instead there is about a 5-10 pixel gap from the left side and top of the browser window. How do I make the banner flush with the window? Any help would be GREATLY APPRECIATED.

Ramon

MC Alignment In Library
How do you move the crosshairs in the Library? I am following along with the http://www.one-motion.com tutorials, with isometrics. The MC in his library shows the crosshairs at the top, mine always stays in the middle. I can't believe I am stuck on something like this.

thanks for any help

Publishing - Alignment?
Hi.

When I publish for a specific window size for web play, I always get a border (top and left) in browsers other than IE. I have the publish settings set to left/top and margins to zero in Front Page.

Maybe this is a FrontPage question. Not sure.

Thanks!

Stage Alignment
hi, Im making a simple flash site, and I made everything centered on stage, halfway through I needed more stage space so I made the width bigger, but now the first part of the site is off center. how can I scoot everything over so that its centered on stage?

Alignment In A ScrollPane
Hello all,
I have the following code in Flash MX:

_root.createEmptyMovieClip("newMovie", 1);

for(var i = 0; i < 10; i++)
{
temp = newMovie.attachMovie("test_", ("test"+i), i+2);
temp._x = _root.scrollpane1._width/2 - (.5 * temp._width);
temp._y = i*75;
}

_root.scrollpane1.setScrollContent(newMovie);

This creates 10 movieclip elements in a new empty movieclip "newMovie" and places the content in a scrollpane. There is just one problem... no matter how much I change the value of _x for each element, the scrollpane always aligns the movieclips to the left side. I really want all of the elements centered in the pane. I've tried adjusting the alignment of newMovie.Stage with no success. Any suggestions to get these clips to align center??? Thanks in advance...

Karlin

Alignment Question
Is there a way to have a flash movie in the absolute center of a browser window, no matter the size of the users monitor?
Thanks in advnace

Alignment And Size
I need help on aligment and size of .swf files showing on the web. On publish settings I have it set to center horizontal and center veritcal. As for size I have it on Match movie.

But when I view it through the web its aligned on the top left corner. I even have an index.html file to center my front opening page and thats not working either.

How can I get it to center and get the size of the file to fill the whole screen?

Alignment Problems
I have been trying to align a box over a jpeg image,I have it aligned exactly in the workspace so that it fits into the jpeg seamlessly but as soon as I test the movie the box shifts about 2 pixels??? does anyone else had this problem and found a better solution than compensating for the displacement in the work area? Please Help?

My Flash Alignment
When I published my flash and ran the file it was on the left hand side. How can I make sure the flash is in the center?

Also

Any special way I should load this in to the PHP site?

Here is the site.

www.fearnoevilclan.com

I want the flash to load up and when user clicks "ENTER" goes right to front page.

Thanks

Prophecy

Difference In Alignment
Firstly, thank you to anyone who tries to help me with this.

I have sliced a template up and assembled it in flash. On the stage, everything looks fine when viewed at 100%. When I 'test movie' however, some sliced pieces of the template are a bit out of alignment and one slice has distorted in size.

I have tested the swf independently in Flash Player and even composed a html page to test it in Explorer and the same distortions occur.

Please can someone end my frustrations with this as I have put a lot of time into rectifying this without success.

BTW I use Flash 5 on a Mac.

Brett

Alignment Problems
Firstly, thank you to anyone who tries to help me with this.

I have sliced a template up and assembled it in flash. On the stage, everything looks fine when viewed at 100%. When I 'test movie' however, some sliced pieces of the template are a bit out of alignment and one slice has distorted in size.

I have tested the swf independently in Flash Player and even composed a html page to test it in Explorer and the same distortions occur.

Please can someone end my frustrations with this as I have put a lot of time into rectifying this without success.

BTW I use Flash 5 on a Mac.

Brett

Alignment And CreateTextField
I'm using a createTextField, and really it works great.
Except, if it's an input type, and I have the alignment set to anything but "left", then a person types inside it it still left justifys unless you "recreate" the mc using the text data after they typed it.
Here's my code:
code:
function bk_txt_text(comp) {
if (beenbkfont == "1") {
$bktxtfont = (_root.db_fontb.getSelectedItem().data);
} else {
$bktxtfont = "AntiqueOliT";
}
if (bktxt_place == "1") {
$bktxtx = $bktxtx;
$bktxty = $bktxty;
} else {
$bktxtx = "345";
$bktxty = "320";
}
if (_level0.btbeenalign != "1") {
_level0.back_txt_align = "center";
}
if (beenbktxttext == "1") {
$bk_txt_txt = _level0.bktxt;
} else {
$bk_txt_txt = "Your text here";
}
if (beentxtsizeb == "1") {
_level0.bts = _level0.btsx;
} else {
_level0.bts = 10;
}
//$bk_txt_txt = "Your text here";
_root.createTextField("bk_txt", 324, $bktxtx, $bktxty, 120, 70); // depth, x, y, width, height
txt_bk_myformat = new TextFormat();
txt_bk_myformat.size = _level0.bts;
txt_bk_myformat.color = 0x000000;
txt_bk_myformat.align = _level0.back_txt_align;
txt_bk_myformat.font = $bktxtfont;
txt_bk_myformat.bold = true;
txt_bk_myformat.bullet = false;
txt_bk_myformat.underline = false;
txt_bk_myformat.variable = "var_bk_txt";
bk_txt.embedFonts = true;
bk_txt.multiline = true;
bk_txt.wordWrap = true;
bk_txt.border = false;
bk_txt.type = "input";
bk_txt.text = $bk_txt_txt;
bk_txt.setTextFormat(txt_bk_myformat);
//
if (bktxtswitch == "1") {
setProperty("_root.bk_txt", _visible, "100");
} else {
setProperty("_root.bk_txt", _visible, "0");
}
//
bk_txt.onKillFocus = function() {
_level0.bktxt = bk_txt.text;
};
bk_txt.onSetFocus = function() {
_global.beenbktxttext = "1";
};

txt_bts_txt.text = _level0.bts;
//$btt = bk_txt.htmlText;
}

Yeah, I know it's kind of clumsy, but it's my 1st AS project.
And of course some of the variables are defined "off screen". Like level0.back_txt_align is defined using a radio button set with the options "left" "center" and "right".

Anyway my question is, is there a way when the centering is set to center or right, that the justify can BE that while it's clicked in and being typed in?

Thanks for any suggestions!!
Liam

Alignment And CreateTextField
(If this is a duplicate entry, my apologies. My browser crashed as I posted it the 1st time.)
I'm using a createTextField, and really it works great.
Except, if it's an input type, and I have the alignment set to anything but "left", then a person types inside it it still left justifys unless you "recreate" the mc using the text data after they typed it.
Here's my code:
code:
function bk_txt_text(comp) {
if (beenbkfont == "1") {
$bktxtfont = (_root.db_fontb.getSelectedItem().data);
} else {
$bktxtfont = "AntiqueOliT";
}
if (bktxt_place == "1") {
$bktxtx = $bktxtx;
$bktxty = $bktxty;
} else {
$bktxtx = "345";
$bktxty = "320";
}
if (_level0.btbeenalign != "1") {
_level0.back_txt_align = "center";
}
if (beenbktxttext == "1") {
$bk_txt_txt = _level0.bktxt;
} else {
$bk_txt_txt = "Your text here";
}
if (beentxtsizeb == "1") {
_level0.bts = _level0.btsx;
} else {
_level0.bts = 10;
}
//$bk_txt_txt = "Your text here";
_root.createTextField("bk_txt", 324, $bktxtx, $bktxty, 120, 70); // depth, x, y, width, height
txt_bk_myformat = new TextFormat();
txt_bk_myformat.size = _level0.bts;
txt_bk_myformat.color = 0x000000;
txt_bk_myformat.align = _level0.back_txt_align;
txt_bk_myformat.font = $bktxtfont;
txt_bk_myformat.bold = true;
txt_bk_myformat.bullet = false;
txt_bk_myformat.underline = false;
txt_bk_myformat.variable = "var_bk_txt";
bk_txt.embedFonts = true;
bk_txt.multiline = true;
bk_txt.wordWrap = true;
bk_txt.border = false;
bk_txt.type = "input";
bk_txt.text = $bk_txt_txt;
bk_txt.setTextFormat(txt_bk_myformat);
//
if (bktxtswitch == "1") {
setProperty("_root.bk_txt", _visible, "100");
} else {
setProperty("_root.bk_txt", _visible, "0");
}
//
bk_txt.onKillFocus = function() {
_level0.bktxt = bk_txt.text;
};
bk_txt.onSetFocus = function() {
_global.beenbktxttext = "1";
};

txt_bts_txt.text = _level0.bts;
//$btt = bk_txt.htmlText;
}

Yeah, I know it's kind of clumsy, but it's my 1st AS project.
And of course some of the variables are defined "off screen". Like level0.back_txt_align is defined using a radio button set with the options "left" "center" and "right".

Anyway my question is, is there a way when the centering is set to center or right, that the justify can BE that while it's clicked in and being typed in?

Thanks for any suggestions!!
Liam

Alignment And CreateTextField
I'm using a createTextField, and really it works great.
Except, if it's an input type, and I have the alignment set to anything but "left", then a person types inside it it still left justifys unless you "recreate" the mc using the text data after they typed it.
Here's my code:
code:
function bk_txt_text(comp) {
if (beenbkfont == "1") {
$bktxtfont = (_root.db_fontb.getSelectedItem().data);
} else {
$bktxtfont = "AntiqueOliT";
}
if (bktxt_place == "1") {
$bktxtx = $bktxtx;
$bktxty = $bktxty;
} else {
$bktxtx = "345";
$bktxty = "320";
}
if (_level0.btbeenalign != "1") {
_level0.back_txt_align = "center";
}
if (beenbktxttext == "1") {
$bk_txt_txt = _level0.bktxt;
} else {
$bk_txt_txt = "Your text here";
}
if (beentxtsizeb == "1") {
_level0.bts = _level0.btsx;
} else {
_level0.bts = 10;
}
//$bk_txt_txt = "Your text here";
_root.createTextField("bk_txt", 324, $bktxtx, $bktxty, 120, 70); // depth, x, y, width, height
txt_bk_myformat = new TextFormat();
txt_bk_myformat.size = _level0.bts;
txt_bk_myformat.color = 0x000000;
txt_bk_myformat.align = _level0.back_txt_align;
txt_bk_myformat.font = $bktxtfont;
txt_bk_myformat.bold = true;
txt_bk_myformat.bullet = false;
txt_bk_myformat.underline = false;
txt_bk_myformat.variable = "var_bk_txt";
bk_txt.embedFonts = true;
bk_txt.multiline = true;
bk_txt.wordWrap = true;
bk_txt.border = false;
bk_txt.type = "input";
bk_txt.text = $bk_txt_txt;
bk_txt.setTextFormat(txt_bk_myformat);
//
if (bktxtswitch == "1") {
setProperty("_root.bk_txt", _visible, "100");
} else {
setProperty("_root.bk_txt", _visible, "0");
}
//
bk_txt.onKillFocus = function() {
_level0.bktxt = bk_txt.text;
};
bk_txt.onSetFocus = function() {
_global.beenbktxttext = "1";
};

txt_bts_txt.text = _level0.bts;
//$btt = bk_txt.htmlText;
}

Yeah, I know it's kind of clumsy, but it's my 1st AS project.
And of course some of the variables are defined "off screen". Like level0.back_txt_align is defined using a radio button set with the options "left" "center" and "right".

Anyway my question is, is there a way when the centering is set to center or right, that the justify can BE that while it's clicked in and being typed in?

Thanks for any suggestions!!
Liam

Window Alignment
how do i get my hmtl to line up in the cmiddle instead of the top right,
i tried messing with all the settings but maybe i missed something

Window Alignment
how do i get my hmtl to line up in the cmiddle instead of the top right,
i tried messing with all the settings but maybe i missed something

Loadmovie Alignment
hello,

this may have been asked at one point. BUT

i'm futzing with the sample fla "load_images.fla" that comes with flash mx. works great, but can i have images load "centered" in the movie clip instead of the top left corner? I tried using free transform to move the center point but to no avail.

also if anyone is familiar with how to automate this example fla so that it automatically goes through the images and has a stop/start function you'd make my day

action script from the first frame of said fla

// initialize variables and properties
square._alpha = 0;
whichPic = 1;
// initiate change to new image when buttons are clicked
next.onPress = function() {
if (whichPic<50 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic++;
input = whichPic;
}
};
back.onPress = function() {
if (whichPic>1 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic--;
input = whichPic;
}
};
_root.onEnterFrame = function() {
// when a new Photo is selected, fade out, load new image, and fade in
if (square._alpha>10 && fadeOut) {
square._alpha -= 10;
}
if (square._alpha<10) {
loadMovie("images/IMG_"+whichPic+".jpg", "square");
fadeOut = false;
fadeIn = true;
}
if (square._alpha<100 && fadeIn && !fadeOut) {
square._alpha += 10;
} else {
fadeIn = false;
}
// initiate change to new image when Enter key is pressed
if (Key.isDown(Key.ENTER)) {
fadeOut = true;
whichpic = input;
}
};
// if a number is entered in the input field but Enter is not pressed, change
// back to current Photo number when clicking anywhere else
inputField.onKillFocus = function() {
input = whichPic;
};

Text Alignment
Is it possible to align text so it goes to the bottom insted of the top, i have looked at the settings and can only see left right justify etc. thanks

Alignment Issue Maybe?
Hmm... I wonder if there is anyway to troubleshoot flash changing the size of an imported bitmap. it doesnt always happen, well actually this would be the first time i noticed it. I made a layout in ps and imported a small slice that i wanted to add an animation to into flash. everything seemed fine, until i tried to replace the static slice with the newly animated one. I dont know whats wrong here. The stage dimensions are the same as the original image before its imported, but once its in flash, the program slightly alters the size and it no longer fits together with the rest of the slices when finally put together in a webpage.


i bet this is unique to just me. lol... Im prone to finding all the odd bugs in software. anyways.. if u can give me some sort of answer or explanation id like that..

Pop Up Movie Alignment ?
Hi,
I made a pop up draggable movie that loads within the current movie/ homepage. When it opens it aligns in the upper left corner. Does anyone know a script to get it centered in the middle and to the right. Here is the script that I have now on the button that loads the movie. Thank you very much in advance!!!

on (release) {
loadMovieNum("cwindow1.swf", 85);
}

Alignment Question
How would I make it so my swf in my html document will always load in the bottom left of browser?

Thx for the help!

Text Alignment
Is there any way to align text to the bottom of a text box?

Alignment Issues
This is a problem I continually come up against.
I am building a menu background using a graphic image made up of a grey fill and a keyline border except on the top border of the box.
I have set it up so that for each menu item I can drop this background graphic in behind it adding to the length of the menu as needed. Problem I have is that no matter how I try to align these boxes I am continually getting incorrect results where the keylines either dissappear or are wuzzy in appearance due to over lapping.
I have tried snapping the objects together snapping to guides, grids and pixels none of which seem to work. I have even sat down and done the math for the x-y co-ordinates and taken off the previous graphic height and the same problem occurs.
I know there was a problem with jpgs becoming squashed unless you changed the reg point to the bottom right hand corner so I've even tried this. But again same results.

Is it just the case with flash that if you want to do very precise work you just cannot. Or can someone come up with a solution to this that will work. Maybe something I need to change in the preferences!

Cheers

Flash Alignment
hi there,

does anyone know how to align certain elements within a browser window so that for instance...

MOVIECLIP A is situated bottom right
MOVIECLIP B is situated bottom left

but when you resize the window the elememnts move in respect of it ??
(eg. getting closer or futher apart)

you can see what i mean by goin to
www.sawmovie.com and resizing the
browser window...

done by the great hi-res.net..

if anyone can give me some pointers
on how to do this it would be great...

thanks

Alignment In Html?
Alright?

When I publish my fla to html the page is on the left. How can I centre it?

Any ideas?

Cheers,

Gab

CreateEmptyMovieClip Alignment
If you select and empty movie clip instance on stage, select transform, and flip it horizontally, any image that you load into it will align right, versus the default left alignment. However, I need to do this with createEmptyMovieClip. Is this possible?

Alignment In Publishing
When I publish my file, which uses the entirety of the white area of the stage, it always comes up appearing in the upper left hand corner in the html file.

How do I align my work so it appears in dead center?

Thankyou

Alignment Question
How can i get flash to align the .swf file in the center of the html document. Every time i try it aligns it in the top left. I've gone through the publish settings and cant figure out how to do it.

Copyright © 2005-08 www.BigResource.com, All rights reserved