Css Text-align Won't Work
Heylo!I'm trying to align some text to the right with css but it doesn't seem to work.Here's the code i used: Code: var css = new TextField.StyleSheet();css.load("ref/flash.css"); flash.css : Code: .link { text-align : right;} assigning stylesheet to textfield.. Code: _root.link.styleSheet = css;_root.link.text = '<span class="link">sometext</span>'; This won't work, but when i replace the text align in the css file with, say, color : #ff9900;, it does work..What am i doing wrong? Thanks!
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 04-28-2006, 09:32 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How Do People Middle Align Their Flash Sites Now Since V-align Code Doesn't Work?
Before, I was able to use the code v-align middle on my html page and my flash swf would align middle. Now that code does not work and it only works if I do not put doc info at the top of my html page, like xthml, etc.
How are people enabling their Flash site to always align center and middle.
Anyone have any codes that work or samples I could use.
Thanks!
Css Text-align Won't Work
Heylo!
I'm trying to align some text to the right with css but it doesn't seem to work.
Here's the code i used:
Code:
var css = new TextField.StyleSheet();
css.load("ref/flash.css");
flash.css :
Code:
.link {
text-align: right;
}
assigning stylesheet to textfield..
Code:
_root.link.styleSheet = css;
_root.link.text = '<span class="link">sometext</span>';
This won't work, but when i replace the text align in the css file with, say, color : #ff9900;, it does work..
What am i doing wrong? Thanks!
Right Align Text - It Doesn't Work
This is so simple yet apparently beyond reason.
When I add 'htmltext' to the AS loading a text box (in referance to the XML gallery), the align right I have in the properties box does not work.
Any ideas?
Right Align Text - It Doesn't Work
This is so simple yet apparently beyond reason.
When I add 'htmltext' to the AS loading a text box (in referance to the XML gallery), the align right I have in the properties box does not work.
Any ideas?
Centre Align Just Does Not Work?
I have made a site and in the publish settings (html) I made sure that center was chosen, yet when I test the movie in a browser, it is always on the left of the screen??
The only way I can center it is to manually add center tags to to html that flash produces as you can see if you look at the html on the following page
http://www.galaxymusic.co.uk/spree.html
Why is this? what is the point of the html options in the flash settings if they don't even work???????
Thank you.
Align Wont Work, Why?
I cant seem to get the modify/align commands to work. What is the deal? I select the movie clip or button, and try to center them or something... nothing happens? whats going on here?
Picture Align Script Don't Work Properly => Still Problem
dear flashers,
i have this script here that loads an external .jpg and centers it in a swf.
this swf i load in the maintimeline. actually it works perfectly but sometimes the center part of the script doesn't seem to work an my picture is placed somewhere else. does anyone have an idea?
Code:
var tl = this;
if (bildnr == 0){
bildnr = 1;
}
loader._visible = false;
tl.createEmptyMovieClip("holder",tl.getNextHighestDepth());
var mcl:MovieClipLoader = new MovieClipLoader();
var mclL:Object = new Object();
mclL.onLoadProgress = function(target,loaded,total) {
prozent = Math.round((loaded/total) * 100);
loader._visible = true;
//loader.percent.text = prozent + "% data loaded";
loader.balken._xscale = prozent;
}
mclL.onLoadInit = function() {
loader.percent.text = "";
}
mcl.addListener(mclL);
//mcl.loadClip("women/claudia_o/bild1.jpg",holder);
mcl.loadClip(whoopie+"/"+model+"/bild"+bildnr+".jpg",holder);
//tl.holder.loadMovie(whoopie+"/"+model+"/bild"+bildnr+".jpg");
tl.createEmptyMovieClip("checker", tl.getNextHighestDepth());
tl.checker.onEnterFrame = function() {
if (tl.holder.getBytesLoaded()>=4) {
var l = tl.holder.getBytesLoaded();
var t = tl.holder.getBytesTotal();
var p = Math.ceil(l*100/t);
if (p>=100) {
tl.holder._x = (127)-(tl.holder._width/2);
tl.holder._y = (158)-(tl.holder._height/2);
delete this.onEnterFrame;
tl.play();
}
}
}
stop();
the loader part is from one the lees scripts. the rest is from me, that's why is messed up a bit.
the page where this is in use is http://www.expressive.ch/site/
may thanks for your help
EDIT: this scripts runs when you click on women or men.
Vertical Align Text In Dynamic Text Area
Have just created my first database driven dynamic text box and it works
Just one problem...
One of the dynamic text areas is multi-line and try as I might I can't seem to find any way to set the vertical alignment of the text to 'middle' vertically...
i.e. if the text is only a couple of words, it aligns to the top of the textarea and I'd like it to align to the middle of the text area vertically.
Any ideas???
Thanks
dominicall
Align Text
can i align a dynamic text with actionscript in flash 5?
thanks
Text Align
the wierdest thing is happening. I have a static text box and placed my text in it. i spaced it out how i want it and stuff. when i preview it all the text is aligned to the left. it has worked before but it just randomly started going to the left. anyone?
Text Align
I want to be able to click a button and have the *text* in a dynamic text box change alignment (center, left justify, right justify).. similar to any word processor.
see examples and source here:
http://www.pinn.net/~psanders/align.html
http://www.pinn.net/~psanders/align.swf
http://www.pinn.net/~psanders/align.fla
Thank you!
Text Align
I want to be able to click a button and have the *text* in a dynamic text box change alignment (center, left justify, right justify).. similar to any word processor.
see examples and source here:
http://www.pinn.net/~psanders/align.html
http://www.pinn.net/~psanders/align.fla
Thank you!
Align Text
I have a ticket object and I want text to be center aligned in the middle of it. Why won't it work!?
Code:
ticket = new TicketGraphic();
addChild(ticket);
ticket.filters = [new DropShadowFilter(5, 135, 0x000000)];
ticketTxt = new TextField();
var textFormat = new TextFormat();
textFormat.align = TextFormatAlign.CENTER;
ticketTxt.text = ticketName;
ticketTxt.y = -9;
ticketTxt.x = -(ticket.width/2);
ticketTxt.width = ticket.width;
ticketTxt.textColor = 0xFFFFFF;
ticket.defaultTextFormat = textFormat;
ticket.addChild(ticketTxt);
Text Align
anyone know how to align text in an as3 created text field:
var loadingText:TextField = new TextField();
loadingText.text = 'Building Interface...';
loadingText.textColor = 0xffffff;
loadingText.selectable = false;
?? loadingText.textAlign = 'center'; ??
needless to say that doesn't work and throws an error, i can't find for the life of me how to do this if its even possible.
thanks.
Text Align
I want to be able to click a button and have the *text* in a dynamic text box change alignment (center, left justify, right justify).. similar to any word processor.
see examples and source here:
http://www.pinn.net/~psanders/align.html
http://www.pinn.net/~psanders/align.swf
http://www.pinn.net/~psanders/align.fla
Thank you!
Text Align
I want to be able to click a button and have the *text* in a dynamic text box change alignment (center, left justify, right justify).. similar to any word processor.
see examples and source here:
http://www.pinn.net/~psanders/align.html
http://www.pinn.net/~psanders/align.fla
Thank you!
Text Align
Hi, i dont know how to do this. i tried myTextField.align = right;, but that didnt work. i have a dynamic textfield labeled "display" as the instance name and it renders the text as html. what am i doing wrong?
Align Text In Dynamic Text Field
Hello All!
I have a dynamic text field with the text aligned right in my .fla file. When I publish the .swf, the text returns left aligned. What step am I missing?
* Also, the text is being called in from a .xml file :
<tvar name="text09"><![CDATA[TEXT 09]]></tvar>
Thanks in advance!
Jessica
Align Text In Dynamic Text Box Using HTML
Hi,
I am importing text from mysql, via php, to a dynamic text box in flash. I cannot get column 2 text to align left. It comes out like this:
Column 1 Column 2
James Kearns
Mary Peterson
Thomas Clark
The php code I have is:
print ("&dbpages=");
while ($row =mysql_fetch_array($result,MYSQL_ASSOC)){
print "<table>".$row['first_name']." "."<tr><td align=left>".$row['last_name']."</tr></td></table>"."
";
}
The AS code is:
Where database_txt is the dynamic text box.
How can I align column 2 ?
Thanks,
Paul
Attach Code
var resultPages_LV:LoadVars = new LoadVars();
resultPages_LV.onLoad = function (success:Boolean){
if (success){
database_txt.htmlText = true;
database_txt.htmlText = resultPages_LV.dbpages;
}
Edited: 03/06/2008 at 05:34:35 AM by maith
Align The Text In Text Field To The Bottom
Hi,
I have hyperlinks stored in an external text file which I load in to a textfield component in flash. Is it possible to align the text in text field to the bottom? I have been looking around but not been able to find a solution.
Any suggestions is most appreciated.
jonas
Right Align Dynamic Text ?
Is it possible to right align dynamic text ?
I've tried to set it in the paragraph settings before export, but defaults to left align, and I don't think it's possible with dynamic html content either.
Any ideas....
Thanks > Firehazzard
Align The Text Properly
hi,
I have created a drop down menu where i used 2 smart click, one is called question and another one called choice smart click.
First the user need to click on the question movie clip in order to open the drop down of the choices. every question have 2 choices.
after the user selected the choices, the choice's text will be remain in the question movie clip
i have done all this successfully.
the question smart clip parameters:
1) choice1
2)choice2
where i will enter the text of the choices here, the choice1 or choice2 sometimes quite long senetence and sometime short senetences.
my questions:
1) for the choices text , some needs 2 lines and some might need 3 lines.
how can i align them in center no matters how long the choice1 or choice2
can i set it in the question smart clip ?
thanks
Text Area - Align Right - Is It A Bug?
Hi, i've got a text area called MyTextArea - it's dynamic, in the properties window i mark the "Render as html" button, and in the script: MyTextArea.text = "<p align='right'>" + someText + "</p>"
and the text area is still aligned to left.
also: in the window properties i tried both to mark/unmark the button of align=right... still didn't work.
Any idea?
Thanks in advance,
Maya.
DataGrid Text Align
hi,
In DataGrid component i am using cloums and rows, in each colume i am displaying some text. this text is too long. so want it in second line in each colum. but i am unble to get that text in second line. i am using 'hScrollPolicy' but it is not working.
please help me.........
thx
ramana.
Align Text On Path?
I have a dynamic textbox and I want to align the text to a path(curve, arc, circle) how can I do this?
Button Text Align?
I have a button component and have removed the skins so that just the button text appears. Is it possible to align the text to the left?
How To Align XML Loading Text To Right
Hi,
I am loading in text using XML. I have applied some simple formatting but want the text to align to the right not the left. Can anybody tell me how to do this please?
Thanks,
Mikey
Cannot Center Align Text?
I am not able to centre justify text???
I type the text with some lines longer than others but when i select the centre justify button, nothing happens???
The text box is set to Static Text too!!!
Am i doing something wrong???
Is there anything else i can try????
I know it is something simple????
Text Align With Actionscript
Hey there,
Is there any way to change the alignment value of a text field with actionscript?
Can't seem to figure out the align property of a text field and how to access change it if it is even possible...
Cheers
Text Align Right Issue
When using dynamic text and you set the text alignment to "align right", the text is supposed to flow right to left correct? With my code below I can't seem to get this to happen. All my text is flowing left to right.
ActionScript Code:
// change title _global.changeTitle = function(title:String) { // set title text _root.vid.title.autoSize = true; _root.vid.title.text = title;};changeTitle("A Global Industry");
Vertical Align Text...
does Flash support the html valign tag in a dynamic text box or not?!
i'm getting syntax errors when i try to do this.
i need the text in a dynamic text box to vertically align.
the project is a centered, circular button with a dynamic text field for its title. the text changes in length and i need it to always be in the middle of the button. So actually i need centered and vertically align to middle.
Please help!
If anyone has a different suggestion as to how i could go about getting the same visual result, i will entertain all ideas...
TNKS
Align Text In Label Component
Hello all,
I've used the label component (Not the text object!) to show XML data in a clip.
Works fine. Now I want to align the text in the component. The manual says "Use setStyle" So I tried:
PHP Code:
//Load data from dataset component
this.myDataConnection.trigger();
//The object
fillLabels = new Object ();
fillLabels.afterLoaded = function (evt) {
_root.myLabelName.text = myDataSetName.items[0].valueOne;
_root.myLabelName.setStyle("align", "right");
}
//Listener
this.myDataSetName.addEventListener ("afterLoaded", fillLabels);
But that failed to work.
So I tried putting on the html parameter to true and include <div align="right">My text</div> But the label component doesn't support div's.
I'm out of of a clue and sure could use a hint here!
Thanks for replying.
Frans-Jan
CSS Text-align In Flash Mx 2004
Hi guys/gals I have a dynamic text field to which a CSS style has been applied and in which i dynamically load an external text file. Now everything is fine except i want it to be justified from both sides (left and right). I dont think flash supports the CSS justify property. So any suggestions how i can jusitfy the text?
In the FLA i also have the justify button pressed, but it has done it no justice at all ( lol no pun intended)
Any help would be appreciated..thanks in advance..
Is It Possible To Align The Text In The Column Of A Datagrid?
I'm using the standard Flash MX datagrid component. There are several columns that contain numbers I want them to be right-aligned.
I've tried several different things including the following code:
Code:
newcolumn.align = "right";
Anyone have any ideas or know if this is even possible?
How Do I Align A Mc And Static Text Using ActionScript?
How do I align a mc and static text using ActionScript? I want both to be centered at a point on the stage.
my mc is called tcircle and the text is called tbox
Code:
onClipEvent (load) {
this._x = 100;
}
onClipEvent (enterFrame) {
this._width = this._parent.tbox._width+20;
}
The circle resizes to the text's size but they don't align.
Glen Charles Rowell
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.
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
Align The Text To The Bottom Of The Textarea
Hi,
I am loading text in to a textarea component and I would like to align the text to the bottom of the textarea. I have been searching and looking and it looks like it is not possible. Am I correct in assuming that it is not possible?
Thanks
Jonas
Bottom Align Dynamic Text?
Is there a way to bottom align dynamic text in cs3. Or is there a way I could do this easily any help is appreciated.
Thanks
Randy
Dymatic Text: Is It Possible To Vertical Align?
ok, i have a dymatic text box. let's say i use the varibale "dytext".
in the author mode, you can align horizonally left, center, or right.
But what about vertical?
i only know i can vertically align the table using the html:
Code:
< table width="100%" height="100%" border="1">
< tr >
< td align="right" valign="bottom">mytext< /td >
< /tr >
< /table >
if i input this into the varible "dytext" and render it html, what if i still need to add some more text to the "mytext" ?
Is there any actionscript to configure the dymatic text to vertically align to the bottum?
btw: the actionscript "newline" could it be worked when i render it as html?
please help :(
Dynamic Text Align Bottom
Hi all,
Just a 'simple' question regarding aligning dynamic text to the bottom.
Here is what i have.
Textbox set to a fixed height/width and inside i have dynamic text (loaded through XML file).
What i would like to know is how i can align the text at the bottom.
I know CSS can be used, but how do i write just a simple code inside flash directly instead of having it read an external .css file ?
thank U
Dymatic Text: Is It Possible To Vertical Align?
ok, i have a dymatic text box. let's say i use the varibale "dytext".
in the author mode, you can align horizonally left, center, or right.
But what about vertical?
i only know i can vertically align the table using the html:
Code:
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1" height="467">
<tr>
<td width="800%" height="600" align="right" valign="bottom">test123</td>
</tr>
</table>
if i input this into the varible "dytext" and render it html, what if i still need to add some more text to the "test 123" ?
Is there any actionscript to configure the dymatic text to vertically align to the bottum?
btw: the actionscript "newline" could it be worked when i render it as html?
please help
Fullscreen / Align / Stage.align
Need help over here...
I got a fullscreen document.
The menu must always be aligned to the top left on every screen and
resolution size. So the following code
-->// Stage.align = "LT";
Stage.scaleMode = "noScale";
Now i want to align a MC always in centre on every screen and resolution size. I tried this code....
-->// this.attachMovie("backgrounMC", "backgrounMC", 1000000);
titleClip.onResize = function() {
this._x = Stage.width-(this._width+10);
this._y = -1;
};
Stage.addListener(backgrounMC);
this.backgrounMC.onResize();
Above code is not the right solution.....
Because of the Stage.align = "TL" it is hard to align my backgroundMC always to the centre on every screen and resolution size.
Does somebody knows a solution.....?
My menu must always be aligned to the top left, and my backgroundMC
must always be aligned to the centre no matter what resolution size or screen size.
Thanx in advance....
karlein
Dynamic Text Wont Align To Both Sides
I am using the "align to both sides evenly" feature on my text field. When the text field is a static text field it works. When I make the text field dynamic it looks correct on the stage but aligns to the left when I export the movie. I need to use a dynamic text field so I can embed the text. Anyone have this problem? Thanks for your help
-garrett
axcxe1200@hotmail.com
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.
Center Align Not Working On HTML Text
Hi folks,
Can anyone tell me why a dynamic textfield that is set to center alignment in the property inspector would switch to left-aligned after I set it to be an HTML field? Does formatting not carry over to an HTML field? If not, shouldn't the alignment settings gray out once you select HTML in the inspector, if they're not actually doing anything?
I also tried to just include simple <center></center> tags in the text to try to overcome the issue, but I guess that's too much HTML for the text field to understand...
Any thoughts?
Thanks.
Text Align Error After Hovering Over A Link
Can anyone help me out with this?
I have a dynamically loaded text from a .txt file that is CSS formated and includes an image. When it is initially loaded, it displays correct but when I roll over a link the whole text changes its aligment to the end of the picture...
It is kinda hard to explain, so you can check it out for yourself - just go to maciejwantusiak.republika.pl -> english/polski -> menu -> my updates/wiadomosci -> and scroll the page to see the picture at the bottom and then roll over a link to see what happens.
Is this a common Flash problem or is it something that I have to do?
Please help me out.
Thanks in advance
|