TextField Setting Top Margin - Some Chars Cut Out

Oct 31, 2011

I am trying to figure out why some letters (like the norwegian Ã… (Ã…)) are cutted out in the middle of the top "o":

My code is this:
var titleFormat:TextFormat = new TextFormat();
titleFormat.size = textSize;
// this is embedded font, and exported for action script, declared
titleFormat.font = myFontBold.fontName;
titleFormat.bold = true;
[Code] .....

So, I have tried different things like setting height hardcoded and bigger than text, but top us cutted again, I have tried with css but no success. Why the letter is not showed fully and why if I zoom in the swf (2-3 zoom ins) it shows up normal (and what i try to achieve) like this: I think it has to do with the topMargin, but unfortunately I didn't find something like that in as3 documentation.

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Input Textfield And Special Chars (Slovenian Chars Mostly)?

Feb 5, 2008

i'm having a bit of an issue with a multilanguage little flash chatprogram. It has a input textfield, the right fontdata and characters are embedded, but slovenian users can't input some chars Although it works when they copy/paste text into the inputfield, then the characters show and all seems well. But actually typing them seems to fail. So i know it's not the infamous wmode bug.

View 2 Replies

IDE :: Modify TextField's Margin / Padding?

Jan 28, 2009

When dealing with TextFields, Flash always adds some sort of margin/padding around the outside of your TextField, so that if you set the X and Y of your TextField to 0, then your text would still sit about +4 pixels in.

If you create a TextField and set 'border=true', you will see what i mean - the border is drawn right on the edge of the TextField, but the actual text itself sits within a padding of about 4 pixels.

Is there any way at all to get the text of a TextField to sit hard-up against the border?

View 4 Replies

ActionScript 3.0 :: Modifying TextField Margin (Ascend/Descend/etc)?

Jan 28, 2009

My first post, yay! Ok, here's what's been bugging me for a long time. When dealing with TextFields, Flash always adds some sort of margin/padding around the outside of your TextField, so that if you set the X and Y of your TextField to 0, then your text would still sit about +4 pixels in.

If you create a TextField and set 'border=true', you will see what i mean - the border is drawn right on the edge of the TextField, but the actual text itself sits within a padding of about 4 pixels.

Is there any way at all to get the text of a TextField to sit hard-up against the border?

View 5 Replies

ActionScript 3.0 :: Consistent Value From Top Margin / Padding Of TextField To Top Of Actual Text

Jan 11, 2011

How can I get a consistent value from the top margin/padding of a TextField to the top of the actual text.According to the docs (link below), the text field has a 2px gutter on all sides. But there seems to be another gutter that seems to increase / decrease with the size of the text.Using times new roman for a default font size, I can get the baseline of some random text using what we know: I know that there is a 2px gutter all the way around the text field and we can get the ascent through textfield.getLineMetrics(0).ascent. If I draw a line at that position I'll get a line about 2 px below the actual text. Works fine.Now if I want to draw another line at the TOP of the text it's a guessing game. At 36pt text it's 8px from the top of the textfield. At 72pt text it's more like 12px from the top, and at 144pt text it's more like 20px from the top.URL...

View 0 Replies

Actionscript 3 :: Writing UTF-8 Chars In Textfield?

Oct 14, 2011

I have a textfiled (input type) which works with English lang. If I change to different locale in the system tray I am not able to write any text into the textfiled.

How can I enable this capabilty to the TextField or this is connected with locale/Language support in the swf?

View 1 Replies

ActionScript 3.0 :: Defining Min Amount Of Chars With Max In TextField

Apr 8, 2012

I've noticed that AS3 doesn't seem to contain a way of defining a minimum amount of characters required but does have a maximum. Any way to do this with a textfield?

View 1 Replies

ActionScript 3.0 :: TextField (input) Not Possible To Type In Certain Chars

Sep 28, 2009

We got some complaints from users not being able to type in certain chars like '@' and '.' in an input field (textfield). The Textfield is an input field type:
Font embedding seems fine (all needed chars are selected + '@' and '.')
Textfield restrict property is set: "a-zA-Z0-9@.\_\-"

Still some users complain not being able to type a '@' or '.' I've googled and searched the forum and the only thing I've found that could cause this was the wmode = 'opaque' property. We need to set this property to show up Facebook Connect windows. Otherwise these windows would get behind the Flash object in the HTML page. Another reason could be related to the regional settings of the keyboard, which might be faulty interpreted by Flash. Or could it simply be related to a faulty restrict (regex) property?

View 2 Replies

ActionScript 3.0 :: Make Text Sliding Form Left To Right In A TextField, When Add Some New Chars

Nov 30, 2009

using a one line TextField with a fixed width that display text from the keyboard. I'd like that when the display text become greater, it aligns itself on the right, and let appear all the new characters, making the left ones disappearing. That is to say, it slides from right to left, letting always the right part of the text visible. I've tried using the "align" property of TextFormat set to "right", but it doesn't work (it just good to align a paragraph), and cut my text.

View 2 Replies

ActionScript 1/2 :: Setting Variable On A Textfield?

Jun 3, 2010

I'm using createTextField to create a textfield. I have also created a input textfield with a variable called textline1 (I don't create the inputfield with as).I want to display the letters in the created textfiled that I'm typing in the input field. So this in my AS coed:

_root.createTextField("text1",1,100,100,300,100);
text1.variable = textline1;
format1 = new TextFormat();

[code]........

View 3 Replies

ActionScript 2.0 :: Setting Focus To A Textfield?

Oct 18, 2011

I can set the focus to a textbox using

ActionScript Code:
Selection.setFocus("inbox");

but is there an additional command to get the flashing cursor to show in the field?

View 7 Replies

ActionScript 3.0 :: Setting Y Property Of Textfield?

Apr 16, 2010

I was trying to create these 17 textfields in a for loop. I ended up instanciating them manually and now I am trying to set some of their properties in a for loop. The problem is that when I trace them I just see [object textfield] but not the names. If I try to trace the ".name" I get instance 1, instance 2, etc. The real problem is when I try to set the "y" property I get an error "1010 A term is undefined and has no properties"

Code:
var tf1:TextField = new TextField();
var tf2:TextField = new TextField();
var tf3:TextField = new TextField();

[code]....

View 4 Replies

ActionScript 2.0 :: Setting TextField Focus BorderColor?

Jan 31, 2006

How can I write a function that checks to see if a text box is in focus, and if it is, turn the border color to red... if not, turn it to grey?

View 2 Replies

ActionScript 2.0 :: Setting Font For Created Textfield?

Feb 2, 2006

[code]_root.sidearea.removeMovieClip();
_root.createEmptyMovieClip("sidearea", 3);
_root.sidearea.createTextField("scriptinput", 2, 0, 0, 600, 600);

[Code].....

just copy it into the first frame and fix it and copy it back i know its something really simple but for the life of me i cannot figure it out.

View 2 Replies

ActionScript 3.0 :: Flash - Setting A Variable In A Textfield?

Aug 31, 2010

I want to do something like this, is it possible to set a variable in a textfield?Pop this in a new Flash file and you'll get an error.

Code:
var blah_txt:TextField = new TextField;
stage.addChild(blah_txt);

View 3 Replies

ActionScript 2.0 :: Setting Textfield Text - Possibly CS4 To CS5.5?

Mar 29, 2012

I have another post on here today about trying to set a textfield's text in AS2. I have been working on this problem all day. I am beginning to wonder if it is due to the fact that the fla was authored with CS4, maybe even CS3 and now I am trying to use it in CS5.5

View 2 Replies

ActionScript 2.0 :: [CS3] Textfield - Setting Alpha In '.textColor' And '.backgroundColor'

Oct 26, 2008

Folx; Does the manual document the setting of transparency in TextField.textColor or TextField.backgroundColor, not just the _alpha of the TextField altogether? If so, I cant seem to find it. In addition to the RGB/hex values, the color palette in the Properties panel allows you to set transparency in %, yes, but can this also be achieved programmatically?

View 1 Replies

ActionScript 3.0 :: Setting TextField's 'text' Property Slow?

Apr 1, 2010

Short version:Setting a TextField's 'text' property seems to be quite slow. Any way to optimize this?Long version:For a video player I'm working on, I've rewriting a bunch of code I've written in the past and optimizing where I can, and I've noticed something a bit strange.I have a time readout (the typical "00:00 / 01:00" thing) that I'm updating every frame, and it seems to be gobbling up FPS (I'm using mrdoob's great little Stats class for monitoring).The thread to make the call is a bit heavy -- involving a dispatched custom event from the FLVPlayer class (with the current netStream.time as a property) onEnterFrame, which is passed up 2 parents and then back down via a function call -- but I've isolated each step along the way and everything is totally fine (running at or close to 30fps) right up until that very last call where I set the TextField.text property, which results in about a 10fps drop.

If I comment out the setting of TextField.text it runs great, but even if I set it to something arbitrary (like currentTime.text = "0") -- bypassing the reformatting math -- it just tanks.Anyway, anyone know if there's something I can do about this? I've considered using a Timer set to 100m instead of onEnterFrame, but I actually assumed the overhead would come from the dispatching of and listening to the event as well as the reformatting of the time, but *not* the very last step of setting the .text property, which is something I can't avoid whether I use a Timer or onEnterFrame.

View 1 Replies

AS3 :: Flash - Setting Dynamic TextField.text From A Parent MovieClip?

Mar 4, 2010

I have a MovieClip that has a Dynamic TextField: let's call the instance of the field txtName. I want to set the text field on the fly for txtName, so I add a little ActionScript (3!) that does it nice and easily: txtName.text = "Foo";reat. Now why isn't it working when I try the same thing from a parent MovieClip which contains the MovieClip that has the dynamic text? Example:Child MovieClip with TextField ActionScript 3 in Frame #1:

//------
function SetText(str:String):void {
txtName.text = str;

[code].....

View 2 Replies

Actionscript 3 :: Why Does Setting Different ScaleX And ScaleY For Textfield Distorts The Text

Jul 8, 2011

i have a textField wherein i uses embedded fonts, the problem is when i change its size and i do not set the SAME scaleX and scaleY value, it seems to compress the letters inside it when i make it smaller, and stretch the text when i make it bigger... i tried using width and height values (instead of scaleX and scaleY but its the same result)... it seems that the embedded fonts are maintaining some kind of aspect ratio or whatever, and again this only happens when embedFonts is set to true

View 2 Replies

ActionScript 2.0 :: Setting Variable Property For Dynamically Created Textfield?

Dec 22, 2004

i'm creating a completely dynamic form. i want to assign a variable name to a textfield and then pass that variable with a LoadVars() object.

here's a small piece of code i can't get working:

//create movieclip (used like a form)
_root.createEmptyMovieClip( 'dialog_body', 0 );
//create textfield input

[Code].....

bottomline: if i create a textfield using the traditional method and assign the 'var' it works fine. if i create a textfield dynamically at run time, and use the *.variable property, the variable is NOT sent..

View 2 Replies

ActionScript 2.0 :: Setting Validate Range For TextField - Check With Array Of 3 Inputs

May 29, 2007

I was supposed to set the validate range for the Name field to be checked with an array of 3 names, the validate range for the Password field to be checked with an array of 3 passwords, and the validate range for the State field to be checked with an array of 3 states in order to create my own error messages.

stop();
var errors:Array=new Array();
function clearForm() {
name_ti.text="";
state_ti.text="";
password_ti.text="";
[Code] .....

View 5 Replies

Flash :: Css - Firefox Putting Gap / Margin Under Header?

Mar 31, 2011

I have a flash header on my site - nothing crazy, just a short clip. It works in safari and opera on the mac and all IE versions on PC. It will not work properly on firefox on either PC or Mac. Firefox seems to be putting a gap of 10-20px under the flash I have looked up many fixes for this as it seems to be a known problem. I have seen people say it's because the "object" element it treated like letters in FF, so it allows room for the "tails" on a G and Y etc (not sure if I explained that well enough, hopefully you get the idea). I have tried margin:0; padding:0; line-height:0; font-size:0;

float:left; vertical-align:middle; and clear;both; - not at the same time, I have tried many combinations and got most of these ideas from other threads/articles where people had found a solution. I have tried this CSS on an id attached to the object, on the element object and on the parent div - I just can't seem to fix it! Also, as a side note - I've noticed the flash looks good in IE6, IE7 but IE8 makes it looks awful - can anyone explain why or confirm that is what they see? Im a mac user so borrow a laptop to test, it would be good to hear if anyone else see's this problem.

View 1 Replies

Flash :: Forcing A Negative Bottom Margin?

Aug 4, 2011

I have an .swf navigation carousel that is 650 pixels high, the bottom 200 pixels being reserved for the reflection of the carousel. The reflection is very subtle and is not considered important information, so we would like to remove vertical scrollbars when the window is high enough to fit the topmost 450 pixels, but not the reflection.

I tried to accomplish this by setting a margin-bottom: -200px to the flash <object> but this only made the container's height shrink 200 pixels, causing the background pattern to cut before the bottom of the page.the Flash itself is still taking up 650 pixels.

Is there some "proper" fix to this, other than hiding/showing the scrollbars actively using javascript?

View 1 Replies

ActionScript 2.0 :: Input Text Field- Top Margin?

Mar 2, 2010

I've got some text that is crashing my text box border, and I was wondering if there was any way to set a top margin? I saw values for left/right, but nothing that seemed to indicate I could bump the text down a bit...

View 2 Replies

ActionScript 3.0 :: Unwanted 20px Margin In Flex Application

Apr 21, 2009

how to remove what appears to be an invisible 20px margin within my actionscript 3 application, written using flex builder.  When I add movieclips and set x = 0, they appear about 20px over from the left hand side of the screen.  If I set their x = -20, then they appear flush with the left side of the app.  Is there any way to get around this/remove this margin?
 
In the attached picture, the green rectangle is at x = 0, yet it is not flush with the left hand side of the app.

View 1 Replies

Actionscript 3 :: Draws Bigger Sprite Than I Have Set (padding/margin?

Mar 30, 2012

i created my own Button which simply extends from Sprite.Its able to show 3 different text fading in and out using a timer.In my draw function i first draw a rectangle with the Sprites graphics object representing the background of the button.I added a function to set the button width. This property is used to draw the rectangle. I know that the sprites's size is updated after the rectangle drawing. But for some reason the sprite's width is always more than what i have set via my "setButtonWidth" function.Now i have a simple sprite acting as a button having a graphics.drawRectangle part drawing a simple rect. with lets say 500px width. But when i trace the width of that button it is always about 10% more. Where are these 10% coming from?I read about calling validateNow(). But this is only for Labels, or Checkboxes. For some reason i cannot access the library for Label. This must work somehow with TextFields. But how?

// this function is part of MyButtonClass.as file
function drawButton()
{

[code].....

View 1 Replies

ActionScript 2.0 :: Set Right-Margin To Whole Dynamic Text Box With External Css File?

Aug 19, 2009

How to set right-margin to whole dynamic text box with external .css file

View 0 Replies

Html :: Css - Flash Movie Not Respecting Negative Margin In Container?

Dec 11, 2009

I have to place a flash movie into an existing layout. It is replacing placeholder image of the same size. The DIV holding the image has a negative top margin. When the flash movie is placed in the same spot there is a gap at the top of the DIV equal to the amount of negative margin. I cannot seem to get the movie to move to the top of the DIV (FF3).

View 1 Replies

Actionscript 3 :: TextField - Unwanted Carriage Return When Setting Value To ""?

Jan 8, 2010

I have an input TextField and have a KeyboardEvent.KEY_DOWN even listener on the stage to listen for the Keyboard.ENTER event. The event listener adds the entered text to an array or whatever, and then clears the TextField. The problem is that when the Enter key event fires and the TextField value is set to "", it leaves a carriage return in the TextField and the cursor positioned on the second line. WTF? I've been coding AS2 and AS3 for a LONG time and have never ran into this before.Example:

var myTextArray:Array = new Array();
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
function onKeyDown(e:KeyboardEvent):void{

[code].....

View 7 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved