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




Aligning Textbox



hey guys! i'm trying to align my textboxes going horizontal instead of vertical & spaced out a bit....what would i change the x & y to? i know i don't know my math.help,thks!
Code:
Creating text box this.createEmptyMovieClip("albumnames"+t,900+t); albumname_mc = this["albumnames"+t]; albumname_mc.createTextField("albumnametxt"+t,1000+t,0,0,60,20); var my_fmt:TextFormat = new TextFormat(); my_fmt.color = 0xFF0000; my_fmt.font = "Verdana" my_fmt.size = 12; albumname_mc["albumnametxt"+t].text = this.imageList_xml.firstChild.childNodes[t].attributes.albumname; albumname_mc["albumnametxt"+t].setTextFormat(my_fmt); albumname_mc._x = 600; albumname_mc._y = t * 20; albumname_mc.sett = t; albumname_mc.onRelease = function() {



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 12-20-2005, 05:16 PM


View Complete Forum Thread with Replies

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

How Do U Make A Dynamic Textbox With A Variable Textbox
well im really noob at this like i got flash mx 2004 professional a couple of days ago and well u know im still not getting how to use actionscript i sorta understand most of the drawing i know how to use motion tween real well lol anyways if someone could help me it would be great.

TextBox._height Textbox Size?
Maybe someone can help -
How can I change the height of TextBox_size (MC). Is everything controlled by the movie size?

I put the scrollbarDynamic7.fla at http://www.bitweb.com/test for reference

TextBox._height = TextBox_Height;
function springAction () {
scrollpos = -scroll._y;
ratio = (content._height - TextBox_Height) /(TextBox_Height - scroll._height);
NewPos = Number((scrollpos*ratio));
difY = newPos - content._y;
addY = difY / 5;
overshootY = overshootY + addY;
content._y = content._y + overshootY + addY;
}
function easeOut () {
scrollpos = -scroll._y;
ratio = (content._height - TextBox_Height) /(TextBox_Height - scroll._height);
NewPos = Number((scrollpos*ratio));
difY = newPos - content._y;
content._y = content._y + difY / 3;
}

Cheers

Kobus

Aligning HELP
hey..

okay.. ive got 2 movies... one on top of the other.. the bottom
one has a function that allows it to be scaled to the size
of the html window...

what i want to do is to place the second movie (the one on top)
to be centred in the HTML window, while the bottom movie is still
able to stretch...

anyone know what im on about ???

[F8] Aligning Swf And Aligning Another Swf....
Hi there....
I have an swf in an htm and it is aligning to the right of the htm, which is exactly what i want. Now, im using loadmovienum to load up another swf... but i want that 2nd swf to come up in the center of the page. Any way I can do this? or maybe any other ideas you can suggest?

Each swf is 900 x 800... set as 100% in the htm page.

Thanks... hope to hear some suggestion soon

Mc Aligning
Hi I have a mc called 'holder' which I want to load another mc into. This mc is called 'image'. My question is can I align the image mc to the right of the holder mc ?

Right Aligning A MC
Hi!

I'm trying to right align a MC that I have exported to runtime. I want it to remain on the right hand side even after a browser resize. I'm using the following code... the MC aligns properly when the browser is opened, but when the browser is resized it begins moving right off the screen.

I appreciate any help on this problem!

ScottieBitter







Attach Code

Stage.scaleMode = "noScale";
posRight(box_mc);
var myListener:Object = new Object();
myListener.onResize = function() {
posRight(box_mc);
};
Stage.addListener(myListener);
// later, call Stage.removeListener(myListener)
function posRight(myClip_mc:MovieClip) {
myClip_mc._x = Stage.width-myClip_mc._width;
//trace(myClip_mc._x);
}

Aligning.
I have got a MC to align to the bottom of me site, and when the site resizes the MC goes with the browser. its really "spiffy" but how do i get it to align in the middle aswell. thanks !


Quote:




inyer.onResize = function() {
var bounds = this.getBounds(this._parent);
var yoffset = this._y-bounds.yMax;
this._y = Stage.height+yoffset;
};
inyer.onEnterFrame = function() {
var bounds = this.getBounds(this._parent);
var yoffset = this._y-bounds.yMax;
this._y = Stage.height+yoffset;
};
Stage.addListener(Interface);
Stage.align = "TM";
Stage.scaleMode = "noScale";




inyer - is my MC

has anyone got any surgestions ?

thanks alot for your time !

Aligning To Top
Is it possible to force movieclips to be aligned to the top of your swf? but not have them overlap, so they stack underneath?

For example, i have 4 movie clips on my stage, the stage is 800px tall. the movie clips are about 150px tall. How through actionscripting how would i force them so that the top movieclip aligns to the top of the stage, and then the rest align directly under it?

The 4 movieclips are also dynamically re-arrangeable. You can drag them into a different order.

Aligning The Swf
hi,
i want to align the swf in the middle of the html page, even if the page is resized.
Ive tried the alignment in flah and dreamweaver, but its not working.
thankx

Aligning.
I have got a MC to align to the bottom of me site, and when the site resizes the MC goes with the browser. its really "spiffy" but how do i get it to align in the middle aswell. thanks !


Quote:




inyer.onResize = function() {
var bounds = this.getBounds(this._parent);
var yoffset = this._y-bounds.yMax;
this._y = Stage.height+yoffset;
};
inyer.onEnterFrame = function() {
var bounds = this.getBounds(this._parent);
var yoffset = this._y-bounds.yMax;
this._y = Stage.height+yoffset;
};
Stage.addListener(Interface);
Stage.align = "TM";
Stage.scaleMode = "noScale";




inyer - is my MC

has anyone got any surgestions ?

thanks alot for your time !

Textbox Changes To Input Textbox.
Here my code is working inside a for loop which checks inside the XML files and retireves the content...I am not writing the loop here......because there is lots of code inbetween so you don't get the correct idea.

var textmessage = importXMLtemplate.firstChild.childNodes[j].attributes.message;//message contains the text

var TextBoxName = "TextBox" + j;

template_mc.createTextField(TextBoxName, 10, 100, 100, 165, 30);
template_mc[TextBoxName].styleSheet = myCSS;//stylesheet I called above not writing here.
template_mc[TextBoxName].html = true;
template_mc[TextBoxName].multiline = true;
template_mc[TextBoxName].htmlText = textmessage;



template_mc[TextBoxName].type = "input";


Here the message is showing inside the textbos properly loading form XML. The only problem is that the textbox is not changing to input text box.

I want to change the text box to input text box and change the value inside the text box

please help...

Aligning Of Swf Onto Page
Hello,

I am trying to center my flash movie onto a web page
both h and v but can only seem to get the h setting to center
then just hit the enter button to center v , this is in dreamweaver.

thanks
barri

Aligning On The Stage....
I have a fairly large animation sequence on my stage and its consists of many keyframes. I know how to align an object but i have no idea on how to align all of the frames at once, i tried to select all frames and align but it didnt work... what am I doing wrong...

Oh and I want to avoid making it a symbol and aligning it that way cause it slows things down and makes it hard to match things up.

ANY IDEAS????

THX SO MUCH!

Aligning A Movie In A Pop Up
I'm having problems with pop ups. The movie is never at the top left hand corner, even if the window is the same size of the movie. It is always shifted to the right and down alittle. How do you make the movie fit to the pop up. thanks

Aligning Movies
Hey guys/gals,
I am fairly new to flash (actionscripting) and wanted to see if i
could get some help with the 'load movie' command.

I have created buttons on a page where i want the viewer to click on
which will load a movie(in the same scene, level 2) to a location with the
following coordinates():

x=376.2
y=75.8

So far this is what I have for the script code:

on (press) {
loadMovieNum("junewebsite_menubox.swf", 1);
setProperty("junewebsite.swf", _xscale, "376.2");
setProperty("junewebsite.swf", _yscale, "75.8");
}
================= (don't laugh, remember I am still a beginner)

The movie loads properly however, it is aligned at (0,0)
The question is, how do i align the movie to the coordinates listed
above.

Thanks in advance.

Loadmovie Aligning
Just a quick question for you smarties how do I make a movie load to a particular location on the stage when I use the loadmovie command?

Aligning Question
Can some one be kind to answer this question?
how are these two objects aligning to the bottom of the page no matter how you resize the window?
(close buttn-bottom right and VODAFONA logo bottom left)

http://www.vodafone.jp/designfile/bodyfs.html

I am trying to teach my self flash and need guidance...

Aligning Image
Hi guys, hope u dont mind me posting a question about HTML. I know its only a simple question, but whats the best way to insert an image so its flush against the top of the page? (bearin in mind im working in notepad)

Thanks Lopster

HeLP Navigation Bar Not Aligning?
Hello. I need some answers about how to "lock" a flash in dreamweaver so that when you minimize and scale a window the flash doesnt move around. Very frustrating as im making a navigation bar pretty big 550 by 300 but the problem is it doesnt stay in place so my layered News or other html page isnt allinged right while maxmized. It looks right in dreamweaver but not on html.. and while im asking questions how do you lock all settings so you cant change quality or zoom and stuff. Thank you

Aligning One Object To Another
I would like to know how to align a new object to an existing object on the stage (e.g. horizontally center) but WITHOUT moving the existing object on the stage.

Thanks

[F8] Aligning Anything Inside MC.
Hey,

So, i have a quite simple problem/idea ( i think ). I have a MC, let us say it's a line of W: 1000 and H: 30 . Inside this MC i have some text, let us say "copyright", and i want to place this text in the middle of the line ( it's pixel font so i will need to stay on whole integers ) and whenever the browser window is resized then the text should adjust ( "recenter" or something like that ).

And if this is done ( and possible ) then how can i align the same text let us say to the left then the right ( with the same "repositioning" action on browser window resize ).

Hope i was clear with the problem.

Kind Regards,
Biro

CS3 - Aligning Objects
Hi all,

i am facing a problem while aligning the two objects on the stage.

while aligning two objects vertically & horizontally on the state, both objects will jump to different position....

i don't want this thing to happen. i wanted one object should be in same position and other object should move and align vertically & horizontally.

can some one help me...

thanks

My Html Is Not Aligning
I've tried about a thousand variations of this and just can't get it to work.
I have an xml file that has text written with <[[CDATA tags because it contains some html tags for some hyper links.

What I'm trying to do is loop through these xml nodes and write the text content into a dynamic text field and have this right aligned.

Options I've tried so far:

1. Drawing the text box on the page, set as html and right align - NOT WORKING

2. Use AS to create TextField and set html =true, create a TextFormat, align to right, embed fonts etc - NOT WORKING

3. In my xml page I've inserted <p align=right> around the text - NOT DISPLAYING.

Please help me with this solution, I've got a deadline looming and its the one thing holding me back.

Oh and by the way, did I mention that the textbox is scrolling

Many thanks for your help

Mark

Aligning A MC To The Stage?
This seems like a simple task when I started out, and even when I got stumped, I thought it would be easily answered here, but nothing works.

Is it possible to align a movie clip to the bottom right corner of a swf. It can't be just when the swf is loaded, but also when it is resized. Basically I just want the movie clip to stick to the bottom right corner of the stage. sounds easy, but i can't get er done.

This is the code i have for making the swf toggle full screen:


ActionScript Code:
stop();
fscommand("fullscreen", true);
fscommand("allowscale", false);

// ---- START KEY LISTENER FOR FULL SCREEN TOG. ---- //
keyListener = new Object();
keyListener.onKeyDown = function() {
    if (Key.getCode() == 70) {
        // key is pressed
        fscommand("fullscreen", true);
        fscommand("allowscale", false);
    }
};
Key.addListener(keyListener);
// register the keyListener object with the Key object.
// ---- END KEY LISTENER FOR FULL SCREEN TOG. ---- //


And this is my attempt at making a movie clip stick to the bottom right corner...


ActionScript Code:
Stage.addListener(this);
function onResize() {
    mc1._x=Stage.width-mc1._width;
    mc1._y=Stage.height-mc1._height;
}


Any ideas?

Aligning XY Not Consistent
I am a relatively new flash user and I am self taught.
I am building a site for myself and cannot wrap my head around why the xy coordinates will not be the same from one page to the other.
For example: I will have a symbol at x=0 y=0 position on one page and when I copy it to another page and I type in the same coordinates it will be positioned in a different place. If I do a test on a new document with one element, there is no problem.
Does it change anything if the elements are more than one level deep? I have several movie clips inside of other movie clips. When I do this how does it affect the coordinates?

Aligning Text
hi, all.

this i would think was simple but it is doing my head in all i want to do is use actionscript 2.0 so when i place code on my timeline. in this code:

ActionScript Code:
this.onEnterFrame = function(){
//text alignment
}
// also the text field is called nme

i would have thought it was as simple as writing nme.align = "centre" and everytime i set a new text value it would align to the centre of the stage but it appears i was completely wrong because it doesn't.

can anyone help me

Aligning Text
Ok in Html when you want to make a chart you use the table tag. In this way all the cells are lined up. Is there a way to make a chart in flash. Also I want to load the chart movie into a main movie therefore it needs to be scrollable. How do I achieve this?

Aligning Controls To Each Other
the below code is something i wrote to align controls to a toolbar that
changes size. this makes all buttons, dividing lines, etc, all right aligned with varying spaces between each one.

Take a look at this code and tell me if you could write it any better:


ActionScript Code:
//right align all controls
this.btnPrint._x = Stage.width-80;
this.seperator1._x = this.btnPrint._x-10;
this.btnFitWidth._x = this.seperator1._x-30;
this.zoomBar._x = this.btnFitWidth._x-50;
this.btnFullPage._x = this.zoombar._x-70;
this.seperator2._x = this.btnFullPage._x-10;
this.nxtBtn._x = this.seperator2._x-30;
this.prevBtn._x = this.nxtBtn._x-this.prevBtn._width;
this.btnBkg._x = this.prevBtn._x;
this.lblPgNumbers._x = this.prevBtn._x-33;
this.txtpgInput._x = this.lblPgNumbers._x-(this.txtpgInput._width+3);
this.inputBkg._x = this.txtpgInput._x;
this.prntHolder_mc._x = Stage.width+20;
this.seperator3._x = this.txtpgInput._x-10;
this.cmbDocSelect._x = this.seperator3._x-209;

I was thinking of a loop but each item is not 20px away from another item, and some items are only 1px wide while some are 30px wide. Its a mixture of lines, button clips, input boxes, etc. Anyone know a way to condense this at all? I cant think of one...

Aligning Images
1.) I want to drag images from my Library into the center of my canvas, so I hold down shift and it does not seem to work (it does in Photoshop). How can I drag out images to the center of the canvas?

2.) What would I enter for X and Y coordinates to position an image so that it appears exactly over the canvas?

Thanks.

Re-aligning My Text
I am making a website in Flash MX, and on the first page I have text lined up in specific place.. When I try to make one of the words of the text a link, by using the link box in the control panel, and then play the movie, it is moving my text. So in the actual file the text is where I want it to be, but then when I play the movie the text is in the wrong place... It is most irratating, and any suggestions would be appreciated..
Thanks

Oh and I should mention the text is static.

Aligning A MC Or Symbol
I have no problem in Flash 5.0 but MX wont let me align my center point of the MC or symbol to the top left (0,0) of the stage.

First the symbol. It's center point is at center.
Then the symbol is placed inside a movie.
That movie's center point is also at center.

Now when i want to align that MC's center to top left by saying MC property and setting it 0,0 it align the top left corner of my MC to the top left corner of the stage.

What i want was the center point of the MC to be place at the top left (0,0) of the stage..etc..

When assigning the center point, and then telling MC to align at a certain place, isnt it supose to use the center point?..

somehow its not working..

Aligning An MC To The Right Side.
Here's what I want to do:

I have an idea of having a site align itself to the right side of the screen. It would work, but I can't figure out how to adjust the stage width and height to match the browser of the person.

I want to be able to get my movie fullscreen like on this site:

http://www.soleilnoir.net/

but then be able to align my movie to the right, no matter where right is.



Here is a test .fla I made that didn't work:

www.krisgosser.com/test.fla

Aligning A Document
Can anyone tell me what is the best size for a document? I use the default setting in flash but when I import it into dreamweaver it allows the scroll bar in the window to become active and allows the user to scroll a little. In the publish settings in flash I have set it to 100% and 100% AND CENTRE,CENTRE - but once the doc is in dreamweaver it appears on the left once published.....can anyone help?

Aligning And Scaling MC's
Good day madame and sirs!

i am stumpted with the following problem. I have been trying to figure out the best way to replicate the "floating element" component of;

http://www.sawmovie.com/site.html

First of all, i wanted to point out how HELLA cool this site is. But besides that, notice that the various flash based elements seem to stick to their corners no matter how you scale the browser?

The thing that has me stumped is that the elements do not scale, and seem to live on seperate layers.

Here is what i have tried:

Start with a root/nest SWF that is allowed to scale, and then load another movie on top of that that is NOT allowed to scale. However, it seems that the noScale command given by the second movie, overrides the scale command in the first.

Anyone have any insights?

Problems Aligning
Hi All,

so I`Ve modified the Full Screen flash .fla from the tutorial to the attached.
What I`m trying to to is have the menu on the lower right corner, always not matter when you resize. AND the content part always aligned to the middle.
If you guys want to take a peak at it and help me out, I appreaciate.

Thanks in advance,
m.

Fullscreen Aligning
http://www.proactiveinc.com/site.html if you look on this site you see a black scaleable bar in the bottom saying ProActive, inc Strategic Communications and events...... the fullscreen scaling part is not a problem but how do i make sure its always in the bottom of the movie ?

Grrrr.... Aligning MC Within An MC....
I have a website (full page [100% x 100% / no scale]) that is centered inside the browser. I have 2 MCs that need to be anchored to the bottom corners, seperatly but must still control the main MC that fills the browser window.

I tried using Stage.align = "" but it aligns the whole site to the bottom of the page, instead of just each individial MC. Also tried putting the mc instance name in place of "Stage" with no change. I found other ways of doing this.

I also found code that moves the MC relative to the Stage position the only problem is that the stage is centered, which doesnt allow it to move consistantly.

Ive seen it done before. Plenty of sites have this, www.websitedesignawards.com has its black nav bar aligned to the bottom center...

anybody know??

Thumbnails Mis-aligning
Hi all, I've just worked through the XML gallery with thumbnails tutorial and something bizarre is happening to my thumbnails. They scroll fine form left to right but when they first load in the load into the centre of the field. Why would this be happening? I've not altered the code in any way.
I've put up an example to show you what I mean here: http:www.bencatchpole.co.uk/michele/

Ta

Aligning Imported MC?
Is there a way to align an imported MC on your root MC using AS or other method? Tried searching forums but didnt find anything...

Current code:


Code:
loadMovieNum("file.swf", 1);

Re-aligning My Text
I am making a website in Flash MX, and on the first page I have text lined up in specific place.. When I try to make one of the words of the text a link, by using the link box in the control panel, and then play the movie, it is moving my text. So in the actual file the text is where I want it to be, but then when I play the movie the text is in the wrong place... It is most irratating, and any suggestions would be appreciated..
Thanks

Oh and I should mention the text is static.

Aligning A MC Or Symbol
I have no problem in Flash 5.0 but MX wont let me align my center point of the MC or symbol to the top left (0,0) of the stage.

First the symbol. It's center point is at center.
Then the symbol is placed inside a movie.
That movie's center point is also at center.

Now when i want to align that MC's center to top left by saying MC property and setting it 0,0 it align the top left corner of my MC to the top left corner of the stage.

What i want was the center point of the MC to be place at the top left (0,0) of the stage..etc..

When assigning the center point, and then telling MC to align at a certain place, isnt it supose to use the center point?..

somehow its not working..

Aligning An MC To The Right Side.
Here's what I want to do:

I have an idea of having a site align itself to the right side of the screen. It would work, but I can't figure out how to adjust the stage width and height to match the browser of the person.

I want to be able to get my movie fullscreen like on this site:

http://www.soleilnoir.net/

but then be able to align my movie to the right, no matter where right is.



Here is a test .fla I made that didn't work:

www.krisgosser.com/test.fla

Aligning A Document
Can anyone tell me what is the best size for a document? I use the default setting in flash but when I import it into dreamweaver it allows the scroll bar in the window to become active and allows the user to scroll a little. In the publish settings in flash I have set it to 100% and 100% AND CENTRE,CENTRE - but once the doc is in dreamweaver it appears on the left once published.....can anyone help?

Aligning To The Stage
Last edited by pure_ice : 2003-11-17 at 09:12.
























Thanks to norwood and some other forum members, I finally solved the looping issue. I've decided to play around some more and am having trouble lining up the image to the stage.I made the stage the same dimensions as the image. So should I convert the image into a symbol for this? Do I need to put the image on a seperate layer? Do I need a shot of vodka to calm my nerves?

*Update*
I figure it out. At least I think I figured it out. It seemed to work.

Aligning Multiple MCs
Can you set multiple mc's to align different? I've been looking for days now and can't find an answer to this and I'm sure its a simple fix.

What I have is a background (homebkgd1.swf) that I want aligned "LT" and the rest of the content aligned "LB". The site starts with things working out right but as soon as the content mc opens the background goes to LB. Here is a link to the example.

http://doxa.ifworld.com/test/kptest.html

Thanks!

Aligning Dynamic Text
I created a text box that updates from a text file
so that my friends could update without learning FLASH
but
even I pressed the align to right button in the Text properties it doesn't work....

I tried to check the HTML option and use an <ALIGN> tag
but that doesn't work too...

P.S.

what tags can be used without <B> and <I>?

Question About Aligning Two Objects...
Hi guys, I just got my copy of Flash 5 in the mail today, and am going into it head first but have hit a bit of a snag...

I am trying to align a object with another object in my scene. I have two layers, one with a simple box and another with a graphic. I want to keep the box stationary, and get the graphic centered in the middle of the box... on the align panel, I have "To Stage" unchecked, but when i try to align horizontal center/vertical center, it moves both objects and centers them in the middle between it appears. I also tried selecting one symbol before the other, and also switching the order of the two layers in case that has anything to do with it, but no dice.

So to sum it up, is there any way to align two objects, having one as the stationary "parent" and the other one align with that object, rather then having them both move? Any help would be really appreciated... thanks alot.

Importing Then Aligning The Movie?
Ok, I made a small movie that I want to import onto another movie I made. When I import it, the imported movie shows up way below the movie I want to import it on. Is there anyway I can align the movie to the imported objects? I have spent hours and hours trying to align the imported stuff myself, but with all the frames and whatnot it always comes out out of alignment and messes my movie up. Please help.

Aligning A Dynamic JPEG
(I tried posting this on a Macromedia forum but no replies. Maybe you guys can help me here....)
------------------->>
The fact that dynamic jpegs automatically align to the top-left of an MC is really starting to freaking me out here. What if they need to be centered within the MC for the sake of the layout design? To clarify, the project I'm working on involves a lot of differently proportioned photos. My MC is 400x400, centered on the main stage. Photos to be loaded into this MC are generally either 400x300 _or_ 300x400 (basically just never exceeding 400 pixels in either direction at any time). However, I need these images, whatever their sizes, to automatically realign to the center _within_ the MC, relative to its top-left registration point. This is obviously a job for Actionscript....

I'm just getting confused as to where to begin on this matter, as I'm a novice/intermediate with actionscript at this point. We've all seen some wild stuff out there so I know there's gotta be some clean, basic ways to do stuff like resizing and/or realigning dynamic jpegs within the parent MC. I just can't figure it out yet...

Use getProperty then do a crazy calculation to reposition the jpeg? (Can you even use getProperty on a JPEG now that you're doing loadMovie?)... Create some whacky function that bumps the whole MC over or down based on the JPEG size?.... Or use a text file as a database with the dimensions listed in it and do you calc off that (which IMO seems like too much extra work for something like this)?

Ideas anyone?... HELP!
Thanks in advance!!

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