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








Center Vertically Dynamic Text ?


Hi,

I have this thing that LOOKS so easy ....

I have a button (quiz game) on which I want to add a dynamic text (the answer) loaded at game time. This text that may take one line or 2 depending on the length of the text loaded.

How can I deduce the number of lines that the dynamic text will do (or even better, the real Height of the dynamic text) so that I can center the text VERTICALLY on the button ? Indeed, depending on the variable width of chars, the same nb of chars may take one line or 2 and will not be centered vertically at each time.

HELP, I have spent 10 hours on this and am now ready to make myself a Monk

Pedro




FlashKit > Flash Help > Flash ActionScript
Posted on: 02-11-2003, 04:27 PM


View Complete Forum Thread with Replies

Sponsored Links:

Center Dynamic Text Vertically
Has anyone figured out a way to dynamically center their dynamic text? I have 100s of lines of text that are loaded into a textbox. To create conformity I would like these texts to be aligned both horizontally and VERTICALLY. Anyone?

danke.

vs

View Replies !    View Related
Center Dynamic Text VERTICALLY On Clip ?
Hi,

I have this thing that LOOKS so easy ....

I have a button (quiz game) on which I want to add a dynamic text loaded at game time. This text that may take one line or 2 depending on the length of the text loaded.

How can I deduce the number of lines that the dynamic text will do (or even better, the real Height of the dynamic text) so that I can center the text vertically on the button ? Indeed, depending on the variable width of chars, the same nb of chars may take one line or 2.

HELP, I have spent 10 hours on this and am now ready to make myself a Monk

Pedro

View Replies !    View Related
Center Align Text - Vertically
Hello all,
Does anyone know how you would center the registration point of a dynamic text field?

I have a dynamic text field that the user can choose the font size of, and also rotate. I need the rotation point to be the centre of the text box, which I can do, until the text is resized, as it resizes the vertical axis 'down' only - i.e: the text 'moves down on the screen and the registration point stays where it is, and therefore the registration point is off centre, vertically.

Is there a way to have the registration point move to the centre of the text field when it is resized?

Thanks - any ideas appreciated,

DrGonzo.

View Replies !    View Related
How Do I Center My Flash In The Browser Vertically
I know how to do it horizontally within the html page....<center> and </center>,

But my client has a huge monitor and wants the flash to be centered vertically within the browser. How can I do this?

Is it a setting withing the publish settings? or code that I put into the html housing the flash?

thanks.

View Replies !    View Related
How To Center Vertically An Swf Into Html Page?
When I create a webpage in flash I do open the html page in dreamweaver to create a table, center it and put the swf into the table, so I'm sure it's in the middle, but I don't get to center it vertically as in dreamweaver this option is not in the property box. This is specially important now that screens are being build in many size...

So how to center vertically an swf?

View Replies !    View Related
How Do I Center My Flash In The Browser Vertically?
I know how to do it horizontally within the html page....<center> and </center>,

But my client has a huge monitor and wants the flash to be centered vertically within the browser. How can I do this?

Is it a setting withing the publish settings? or code that I put into the html housing the flash?

thanks.

View Replies !    View Related
Center Flash Site Vertically
hi all,

seen a few posts about centering, mostly concerning horizontally, which i got sorted no problem. now trying to get it centered vertically. only item on page is a flash movie currently in a div that is centered horizontally. thanks for any help. specifics much appreciated.
thanks

View Replies !    View Related
How Do I Center My Flash In The Browser Vertically?
I know how to do it horizontally within the html page....<center> and </center>,
But my client has a huge monitor and wants the flash to be centered vertically within the browser. How can I do this?
Is it a setting withing the publish settings? or code that I put into the html housing the flash?
thanks.

View Replies !    View Related
How Do I Center My Flash In The Browser Vertically
I know how to do it horizontally within the html page....<center> and </center>,

But my client has a huge monitor and wants the flash to be centered vertically within the browser. How can I do this?

Is it a setting withing the publish settings? or code that I put into the html housing the flash?

thanks.

View Replies !    View Related
Vertically Aligning Dynamic Text
I've successfully set up a dynamic text box to load variables from a text file. The only thing left to do is vertically align the text within the text area. Flash allows me to align it horizontally, but I don't see how I would align it vertically. Does someone know a trick?

Thanks

View Replies !    View Related
Centering Dynamic Text Vertically?
Hello,

I have a dynamic multiligned text box that I need to center vertically in the control. How do I do this?

Thank you

View Replies !    View Related
Dynamic Text Box Centering Vertically
Is there any way, either through ActionScript or not, that I can vertically center text in a Dynamic Text Box? I know I can center horizontally, but what about vertically?

Thanks,
zip

View Replies !    View Related
Vertically Centering Dynamic Text
I am trying to get the text I am loading into a dynamic text box vertically aligned. There are from 3 to 8 lines of text that load into the dynamic text box via an array. I haven't found anything to do this. Can I get a coordinate that tells me the height of the loaded in text? Thanks for any help...

View Replies !    View Related
Vertically Centering Dynamic Text
Hey there!

I have a dynamic text field that is pulling random quotes from a text field. They are populating over a graphic of a customized playing card. Everything works fine, and the text horizontally centers fine.... but it vertically centers to the top of the text box I have drawn.

Is there a way to make the textvertically align in the center? I am just learning actionscript... or re-learing it rather.

Here is the code I am using for the random text:


Code:
ranQuote = new LoadVars();
ranQuote.onLoad = function(success) {

if (success) {

RanNum = Math.ceil(Math.random()*24);
ran = this["quote"+RanNum];
quote_txt.text = ran;

}
else {

quote_txt.text = "The text failed to load due to an error";

}

}
ranQuote.load("questions.txt");
What is the code to align the text vertically? Also, would I put the code in the code above or would I put it elsewhere? Where would I put it?

Thanks!

View Replies !    View Related
[F8] How To Center Swf Horizontally AND Vertically In Mozilla/IE Brower?
Hi,
I have added the <center> to the below script which centers the swf fine horizontally, but what is the command to do the same vertically?

Exuse the simplicity of this, i've googled it but most of what i fine talk about CSS and table centering which i don't think i need...?


<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>LWinprogress vrs8</title>
</head>
<center>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="1000" height="700" id="LWinprogress vrs8" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="LWinprogress vrs8.swf" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><embed src="LWinprogress vrs8.swf" quality="best" bgcolor="#ffffff" width="1000" height="700" name="LWinprogress vrs8" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</center>
</body>
</html>

View Replies !    View Related
Grow Dynamic Text Field Vertically
I know you can expand the width of a text field horizontally with the .autosize property but i need to a text box's height to expand based on XML loaded text length. Is there a way to do this. I am loading a vertical list of components, each of which has a thumbnail photo and a brief description below it. The description is variable length and I want each component to be right under the next. If I give it the same amount of space for the description, the will sometimes be a gap and sometimes the text will be cut off. Any clues?

View Replies !    View Related
Centering Text Vertically In A Dynamic Text Box In Flash
Hi guys,

Does anyone know if it is possible to centre text vertically in a dynamic text box in flash?

I've had a look around and can't find any buttons which will do the job for me.

cheers

View Replies !    View Related
[F8] Center The Dynamic Text
Here is the issue

http://studio.aibrean.com/portfoliohtml101.html

So basically what happens is, you type and the letters in an input text field and it will repeat in the chosen font of choice from a dynamic text field. I can't figure out how to make it type and be centered because it always goes from left to right. This is Action Script 1 with export to Flash Player 6


This is the script for the type I think:

letterSpaceData = [30, 20.4, 42.45, 72, 58.9, 113.2, 82.1, 16.9, 36.85, 36.8, 51.2, 65.4, 28.5, 37.3, 18.25, 53.7, 60.2, 48.5, 57.05, 57.35, 63.05, 56.55, 59.45, 57, 61.4, 59.45, 18.25, 28.5, 65.25, 62.4, 65.25, 49, 82.15, 75.3, 62.2, 62.8, 68.7, 52.55, 52.1, 68.55, 65.15, 42.6, 45.1, 67.85, 52.4, 76.2, 66.1, 74.95, 60, 74.95, 70, 62.2, 64.15, 64.7, 74.05, 106.4, 74.05, 72.8, 61.1, 32.65, 53.7, 32.65, 67.55, 72.7, 29.2, 54.75, 57.25, 51.2, 57.2, 58, 41.75, 57.2, 55.1, 18.6, 34.9, 58.2, 17.65, 89.6, 55.1, 60.05, 57.25, 57.2, 39.75, 51.3, 41.25, 55.1, 62.1, 93.55, 64.4, 62.15, 51.5, 53.9, 14.25, 53.85, 71.6];
xposi = new Array();
txtchr = _parent.txt;
for(i=0;i<txtchr.length;i++){
letterCode = txtchr.charCodeAt(i);
oldlsd = letterSpace;
letterSpace = letterSpaceData[letterCode - 32] / 15 +1;
tobdup.duplicateMovieClip("dup"+i,i);
trys = trys+letterSpace+oldlsd+3;
xposi[i]=trys;
this["dup"+i].hold=txtchr.charAt(i);
}

This is the script for the type effect:

if(_parent.effect=="typewriter"){
for(j=0;j<_parent.txtchr.length;j++){
_parent["dup"+j]._x = _parent.xposi[j];
}
for(j=0;j<_parent.txtchr.length;j++){
_parent["dup"+j]._alpha =200-(j*150);
}

}

If you need the actual file I can provide it. This isn't a major thing but the client would like it (and so would I).

View Replies !    View Related
Align "Center" Vertically?
Easy and to the point:

I want to align my Flash not only horizontally, but vertically. Is this possible?

Thanks

View Replies !    View Related
Dynamic Text Box, Html And Center
hi there, I have a dynamic text box with input from a text file.

I have selected HTML in the box's options and so now I can use:

text_box= <b> from_text_file add "some more stuff"

etc etc

My problem is centering though.


If I merely selct centre justification on the options it doesn't seem to work but I can't seem to use <center> in the box either, any ideas? does it make sense?

View Replies !    View Related
Dynamic Text Box - Center And Image
1. Using HTMLText, can you center all content in a dynamic text box?

2. Can you use a static background image in the textarea component?

View Replies !    View Related
How To Align The Dynamic Text Box Center
Movie displaying the contents from external text file with html codings. So alignments i'll place in txt file itself, in movie content is displaying perfectly with html alignment but it is in horizantal not in vertical alignment.

that mean the html center alignment is displaying in top of dynamic text box not in mid of text box.

For this what i've to place. Pls give solution.

thx
sathish

View Replies !    View Related
Center Justifying Dynamic Text
Hi! I've been having a small problem, and I need some help on determining if the problem is just something that can't be done in flash, or if it is my code. I have this news scroller for work - Vertical member (160 X 600) And the idea is that it has 3 text fields (Headlines). These fields are lined up vertically (one at the top of the scroller, one at the middle, and one at the bottom.). I load them dynamically from XML, and after about 5 seconds, I have them all move up. (the top one goes up the top, and comes back from the bottom, the other two move up). The problem is that I am trying to center justify them, and it is giving me problems. When they're loaded I can center justify them, using this code:


Code:

MovieClip.prototype.centerFunction = function() {
format = new TextFormat();
format.align = "center";

_root.news2.headline2_txt.setTextFormat(format);
_root.news3.headline3_txt.setTextFormat(format);
_root.news1.headline1_txt.setTextFormat(format);
}
Now, when they are first center justified by the code, they look slightly off, and once they move they arrange themselves correctly. Any idea what's causing this bug? Any help is greatly appreciated!!!

View Replies !    View Related
Center Justifying Dynamic Text
Hi! I've been having a small problem, and I need some help on determining if the problem is just something that can't be done in flash, or if it is my code. I have this news scroller for work - Vertical member (160 X 600) And the idea is that it has 3 text fields (Headlines). These fields are lined up vertically (one at the top of the scroller, one at the middle, and one at the bottom.). I load them dynamically from XML, and after about 5 seconds, I have them all move up. (the top one goes up the top, and comes back from the bottom, the other two move up). The problem is that I am trying to center justify them, and it is giving me problems. When they're loaded I can center justify them, using this code:


Code:

MovieClip.prototype.centerFunction = function() {
format = new TextFormat();
format.align = "center";

_root.news2.headline2_txt.setTextFormat(format);
_root.news3.headline3_txt.setTextFormat(format);
_root.news1.headline1_txt.setTextFormat(format);
}
Now, when they are first center justified by the code, they look slightly off, and once they move they arrange themselves correctly. Any idea what's causing this bug? Any help is greatly appreciated!!!

View Replies !    View Related
Trying To Center Align Dynamic Html Text
I'm trying to center align some dynamic html text. I've created a wide text field and have selected center alignment in the Properties dialogue. The center alignment seems to work until I set the field to use HTML.

Flash help says:

Quote:




The following HTML attributes are supported in text fields: LEFTMARGIN, RIGHTMARGIN, ALIGN, INDENT, and LEADING.




How can I specify the alignment properly? Please see attached file.

View Replies !    View Related
Is There's Any Way To Center Dynamic Text Rendered As HTML?
is there's any way to center dynamic text rendered as HTML?
i tried <center> tag which didnt work.
<div align="center"> also didnt work.

am i missing somethig???
or there is no way of centering the txt?
any input will be appreci.......
thanx

View Replies !    View Related
How To Vertical Center To Dynamic Text In A Specified Area?
i saw a example can make Vertical Center to Dynamic Text in a Specified Area.
http://www.rabidgadfly.com/?p=34
but when i type chinese or japanese character, it does not support even display.

any expert got any suggestion or advice show me?

View Replies !    View Related
Simple Align Dynamic Text Center Problem? Please Help
Hi
I see a few people have asked this in the forum but I cant find an answer!

I am loading a username from a text file and I want it in the horizontal centre of a text box.

I have tried the property panel centre setting for the text box and it does nothing.

Here is the code I am using.
The dynamic text box instance is called my_txt
The var read from the text file is called Name
Funny, changing the color and font works through the properties panel - why not the alignment?

var my_lv = new LoadVars();
my_lv.onLoad = function()
{
trace(my_txt);
my_txt.html = true;
my_txt.htmlText = this.Name;
trace(this.Name);
};
my_lv.load("customise.txt");

I have tries various align=centre options but cant find the right place to put them as I am totally illiterate in both actionscript and html :-(

Im sure this must be a simple question though , no ?

Thanks in advance.
Dan V

View Replies !    View Related
Problems To Center The Text Via Html In A Dynamic Textfield
Hi Folks!
I want to center my text in a dynamic textfield. The vars are uploaded and the text is formatted so far, only align="center" is missing.

Any Ideas

Thanks
__
Jan

View Replies !    View Related
Resize Dynamic Textbox Horizontally, NOT Vertically?
hello,
does anyone know how to have a dynamic textbox automatically resize according to the text that is assigned to it, but for it to resize horizontally, NOT vertically? the only way i can find to do it, does it vertically. even when i have it set to single line!
thanks,
heather

View Replies !    View Related
Vertically Scrolling Text Box
Hi I would like to create a vertically scrolling text box in a flash movie, to be used for credits at the end. I searched through all the tutorials and I couldn't find one which helped.

If anyone can help me it would be greatly appreciated.

View Replies !    View Related
Vertically Aligning Text?
is there any possible way to vertically align text dyanamically? i have a text box that changes per frame using setInterval, and the text varies from frame to frame. i want to verticaly align the text within the bounds of the clip? any suggestions?!?!?!??

thx!

View Replies !    View Related
Moving Text Vertically
Hi, it's possible to have some text moving vertically, and stoping at the top of the site for x seconds ?

How can I do it in flash

Thanks

View Replies !    View Related
Display Text Vertically
Hii,
i am new to flash and i only know the very basic. i need some ideas please as i need to show a process in three phases vertically on a web page. Each phase has a lot of text and i need to show all the three phases in one page.i manage to do one page and each phase is define in a text box with a scroll bar. Any more ideas please how to display it?? Thanks a lot in advance

View Replies !    View Related
Centering Text Vertically
I did a search on this and found a couple of good posts, but I'm just not getting something. Take the following code for instance, it should create a text field and populate it with giberish, which it does;


Code:
this.createTextField("my_textbox", 0, 100, 0, 200, 0);
// numbers = ?,horizontal placement,vert placement, width,?
my_textbox.text = "asdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkssasdksdkss"
my_textbox.autoSize = "center";
my_textbox.multiline = true;
my_textbox.wordWrap = true;
my_textbox.html = true;
my_textbox._y = Stage.height / 2 - (my_textbox.textHeight / 2);
Shouldn't it also place this text field centered on the stage? The my_textbox._y (it's vertical positioning) is set to be equal to one half of the stage height, minus one half of the text box's text height. As near as I can figure this should center the text vertically... but instead it lines it up with the top line in the vertical center of the page. It seems that my my_textbox.textHeight / 2 part isn't doing much.

Any idea what I'm missing here?

datter

View Replies !    View Related
Centering Text Vertically
is is possible to vertically center text within a dynamic text box. if so, how on earth do you do it?

thanks in advance

andrew

View Replies !    View Related
Moving Text Vertically
Hi, it's possible to hate some text moving vertically, and stoping at the top of the site for x seconds ?

Thanks

View Replies !    View Related
Resize A Text Field To Fit Text Just Vertically?
.autoSize seems to expand itself vertically and horizontally. Is there a way to auto size it just vertically so the width remains the same and wordwrap is done?

View Replies !    View Related
Vertically Aligning Text Fields Using AS
I am trying to read data from a XML and then create a match-them kind of game where one set of choices are listed one on top of other and another set is on a row above them one after the other with the text aligned vertically. Umm something like this:

-|--[_] [_] [_]
[_]
[_]
[_]

(All the boxes are movieclips containing some text)

I have the whole thing working out perfectly but the only problem is that I am not able to display the text vertically. I did some searching and turns out that Dynamic and Input Text boxes can not display vertically oriented texts. I thought about creating static textfields at run time but couldn't find an option to vertically orient the text in the formatting options.

Oh and one more thing. I tried rotating the movieclips after the textfields have been created but as soon as the clips are rotated, the text disappears.

Can someone please help me out here.

Thanks.

View Replies !    View Related
Text Vertically Fliped Will Not Display Upon Publishing?
I'm working on a prject where I have some text that I'd like to simulate a reflection.

Ovbviously I need to flip it vertically to reverse the text into a mirror like reflection. Regardless of whether I free transform it, or manually drag it into a reversed state it will not show up when I publish.

I've tried making it a seperate symbol.

I've created the reflection from scratch, ala not using the original header symbol, and fliping it that way....no matter what I do it's not showing up when published. I know I can just use a jpg or something, but that wont come out as nice and at some point I'd like to include some interactivity with this particular header.

Anyone else ever had this issue....is there a patch or something I need to get? I'm running FlashMX 2004 7.2

Please help me before I toss my monitor out a window.

Thanks in advance.

View Replies !    View Related
Vertically Expanding Text Boxes/movies
hi all,

i want to dynamically load info into message boxes on the home page of my website. the messages that i will be loading will be loads of different sizes and therefore i will need the text boxes (and also the movie clips they are contained in) to resize vertically depending on how much text there is.

I looked at the dynamic text boxes and found that you could make boxes which resize themselves automatically but it doesn't seem to work for me.

can anyone offer advice on this subject?

cheers

View Replies !    View Related
Center Dynamic Images
This is my very first post here, but I couldn't find the information I needed in the tutorial section. My question is this. When I load an image dynamically flash automatically loads the top right corner of the image on the registration point of the movie clip I am loading the image into. The problem is all my images are slightly different dimensions so how would I center the images within the main movie? Does this make any sense at all?

View Replies !    View Related
How Do I Center Dynamic Images?
I have a movie clip which loads dynamic images from an xml document, but I want them to center in one portion of the flash document. Right now, the horizontal and vertical images come in on the movie clip's top left corner (where the movie clip dot is located) but I am not sure how to have each different-size image load centered in the space.

If anyone can help with this that'd be great - I can provide code or an example if need be.

Thanks in advance,
Gracie

View Replies !    View Related
Center Dynamic Images
I'm building a xml photo gallery but I can only get the photos to have the reg point up in their right corner. Aparently I'm suposed to ad this piece of code to the second, but I am not sure how/where to integrate it...


targetMC._x += (700-targetMC._width)/2;
targetMC._y += (500-targetMC._height)/2;

to:

function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
/////////////////////////////////////
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture_num();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}



****
Thomas
Barcelona
Spain

View Replies !    View Related
Center Dynamic Scope
Hi:

I am trying to center a dynamically loaded bitmap and am not quite getting the scope of this.

I have a image clip inside a container clip, both registered to the center. After the image is done loading (using loadClip) it calls a center function with a scope of the image clip. There i have:

ActionScript Code:
this._x = Stage.width/2;
this._y = Stage.height/2;

Which does not center the image (to the Stage at least). What is wrong with my logic here?

Any help would be appreciated.

Thanks

View Replies !    View Related
Flex Displaying Labels/Text Vertically In Flex 3
Hi All,

I have a chart in Flex 3 and am currently displaying the axis names using <mx:Label! I want to display the vertical axis name vertically, that is
p
r
i
c
e

instead of

price

I was wondering if anyone knew how I might be able to do this? Any help really would be greatly appreciated!

Thanks,
Derm

View Replies !    View Related
[F8] Dynamic Center To Browser Window
I'm trying to work out how to dynamically load images of different sizes to center in a browser window, can anyone tell me if this can be done?


cheers
Rat

View Replies !    View Related
Center Loaded Movieclip (dynamic)
Hello,

I am relatively new to using flash and actionscript. I'm trying to center a loaded movieclip in a containerbox but it's not working. I think the registration point is - standard - in the upper left corner, so I based my code on that. Here's my code below:


var header:MovieClip = createEmptyMovieClip("header", this.getNextHighestDepth());
var footer:MovieClip = createEmptyMovieClip("footer", this.getNextHighestDepth());
var navigation:MovieClip = createEmptyMovieClip("navigation", this.getNextHighestDepth());
var container:MovieClip = createEmptyMovieClip("container", this.getNextHighestDepth());

var inhoud:MovieClip = container.createEmptyMovieClip("inhoud", this.getNextHighestDepth());

header.loadMovie("headerGlow.swf");
footer.loadMovie("footerGlow.swf");
navigation.loadMovie("navigationGlow.swf");
inhoud.loadMovie("stewie.jpg");


//

header._x = 0;
header._y = 0;

footer._x = 0;
footer._y = 525;

navigation._x = 0;
navigation._y = 70;

container._x = 220;
container._y = 70;

//
onEnterFrame = function() {
if (inhoud._width >= 530 || inhoud._height >= 455) {
delete this.onEnterFrame;
container._width = 530;
container._height = 455;
}
else {
//container.inhoud._x = ((Stage.width - container._x) / 2) - (container.inhoud._width / 2);
//container.inhoud._y = ((Stage.height - container._y) / 2) + footer._height - (container.inhoud._height / 2);
container.inhoud._x = container._x + (container._width /2) - (container.inhoud._width / 2 );
container.inhoud._y = container._y + (container._height / 2) - (container.inhoud._height /2 );
}
};
//

Can anyone tell me what I am doing wrong?
Thanx,
Peter

View Replies !    View Related
Dynamic Textbox - Expand From Center?
Hi all -

I have an input textbox that, when something is typed in and a button is clicked, populates another dynamc textbox with that entry. If the input text is longer than the width of the receiving textbox, I want the dynamic textbox that receives the input to grow from the center as lines are added...does anyone know how to do this?

You can see the app I'm developing at

http://www.eemajin.com/the061

It's the registration number textbox at upper left.

Thanks!!!

View Replies !    View Related
Dynamic Alignment : Bottom / Center
Hey Guys, just had a quick question I was hoping you could help me with
I'm no actionscript Guru and I'm hacing a little trouble with a piece of code. I'm using a slightly modified version of Bluebox_d's dynamic centered movieclip class, but I just can't seem to get the results I'm after.

I'm loading a movieclip onto the stage of a movie that is set to a width/height of 100% in the browser, what I want the movie to do is dynamically center itself on the stage and align to the bottom of the browser window.

Just can't seem to get it . .
any help would be greatly appreciated.

View Replies !    View Related
Rotate Dynamic MC Around Center Axis
I know it's probably a simple answer but I have a scroll bar that needs to rotate a dynamically created mc around its center axis. I can get it to go around the top left registration point but i'm not able to rotate it around the center... any ideas?.. thanks!

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved