Actionscript 3 :: Why Is Spark TextArea Tiny When A Height And Width Are Set

Jul 19, 2010

The problem, as you can see, is that the text (height and width) is nothing like the Height and Width of the compoent (Spark TextArea) that I have set via the Main.mxml file in Flex 4. This is pissing me off so much because nobody can tell me why this is happening, or how to fix it. Text is dynamically added to the TextArea as people send messages in the server, hence the valueCommit line.I don't understand this, because I know it's not the fault of my fx:Script. I know this, because when I switch over to the Design tab of Adobe Flex Builder 4; the lines are just as messed up as in the screen shot.[code]

View 2 Replies


Similar Posts:


Flex :: Calculating Spark TextArea Width?

Nov 3, 2010

I am treating a spark TextArea as text input(by setting heightInLines="1"). The TextArea is part of an mxml component and I want to resize the component when the text is changed.

I haven't been able to use textArea.measureaText(textArea.text) to get line metrics and use it. I get this error "Parameter antiAliasType must be non-null."

Is there any way to get the width of a TextArea which it is going to consume at runtime for a particular string or a particular TextFlow?

View 1 Replies

Flex :: Resizing A Spark Group By Setting Width And Height?

Apr 28, 2011

I have been given the seemingly simply task of resizing a Group container by setting width and height explicitly in response to user interaction. However, changing these values have no effect on the size of the container at all. Changing scaleX and/or scaleY will change the size of the container just fine, but this is not the behavior I am after.I have tried overriding updateDisplayList() to set a specific width and height, but this has not yielded the desired results.

<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="ns.adobe.com/mxml/2009" ;
xmlns:s="library://ns.adobe.com/flex/spark"

[code]......

View 2 Replies

Flex :: Spark RichEditableText Word Wrap With Percent Width And Fixed Height?

May 11, 2011

I know this question has been asked before but the other solutions didn't work for me quite well. here's my sample application.

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"

[code].....

View 1 Replies

ActionScript 3.0 :: Flash Referencing Stage.width/height References Mc.width/height?

Jul 29, 2010

I am trying to reference to top level (stage) width and height of the main stage for the placement of something located inside a movieclip on the stage.

My code is:
Code:
my_loader.x = (stage.stageWidth - my_loader.width)/2;
my_loader.y = (stage.stageHeight - my_loader.height)/2;

But this seems to just relate to the width/height of the mc that my_loader is nested in...

I have tried the following and had no luck:

stage.stage.stageWidth
root.stage.stageWidth
parent.stage.stageWidth
MovieClip(root).stage.stageWidth

View 8 Replies

ActionScript 1/2 :: Load External Image Of Different Height & Width Into Same Height And Width

Jun 12, 2009

i want to load external images of different height and width into same height and width.

View 3 Replies

ActionScript 2.0 :: Load External Image Of Different Height & Width Into Same Height And Width?

Feb 24, 2010

i want to load external images of different height and width into same height and width.

View 0 Replies

Actionscript 2.0 :: Change Width - Height And Width / Height Ration In Flv?

Mar 25, 2011

I would like to use a movieclip to load a flv video. The problem I have is that I want to change the video dimensions. I've tried several software to change the video dimensions but as far as it seems all of them keep the same height-width ratio than in the original video. Is there any software that would allow me to change the height and width without keeping the same height/width ratio as in the original video file?

View 1 Replies

Flex :: Setting Spark List Height To Its Content Height?

Apr 1, 2010

How to set a Spark List height to the height of its content?Tried this:

var lastRow:IVisualElement =
myList.dataGroup.getElementAt(myList.dataGroup.numElements - 1);
myList.height = lastRow.y + lastRow.height;

It works in case of a single item, but lastRow is null in case of more items.

View 5 Replies

ActionScript 2.0 :: Change Widht, Height And Width/height Ration In An Flv Video File?

Mar 25, 2011

I would like to use a movieclip to load a flv video. The problem I have is that I want to change the video dimensions. I've tried several software to change the video dimensions but as far as it seems all of them keep the same height-width ratio than in the original video. Is there any software that would allow me to change the height and width without keeping the same height/width ratio as in the original video file?

View 3 Replies

Professional :: SimpleButton.width Doesn't Change - Width And Height Remain 0

Jun 1, 2010

I am looking at the SimpleButton entirely wrong. Here's what I'm doing (inside of a MovieClip):

[Code]...

the close_btn.width and height remain 0. Am I supposed to just rely on the DisplayObject members of the SimpleButton completely and ignore width/height/x/y or what?

View 2 Replies

Actionscript :: HTML In Spark TextArea?

Mar 20, 2011

Trying to add some html to a TextArea in Mobile Flex 4.5 but keep getting the error:

"1180: Call to a possibly undefined method StyleableTextField."

For the following line:

StyleableTextField(txtMyText.textDisplay).htmlText = "sample <b>text</b>";

View 2 Replies

Flex :: Spark TextArea Or RichText Autosize?

Apr 15, 2011

I have done lots of searching on this subject, but it seems what I am finding is either out of date or just does not seem to work.With TextFields in the past, you could set the TextField to a certain width, set wordWrap to true and you would end up with a textfield that changed height according to the text you added.Now I am trying to do this with either the Spark TextArea or RichText.I tried this HeightInLines = NAN, but that seems to be out of date.I also tried this routine:

var totalHeight:uint = 10;
this.validateNow();
var noOfLines:int = this.mx_internal::getTextField().numLines;[code]....

But the mx_internal is not in the Spark components.I am trying to do this with AS3, not MXML.

View 5 Replies

Flex :: Content Of Spark's TextArea / RichText?

Jun 24, 2011

Is it possible to get content of each line from spark's TextArea or RichText?

What I want to achieve it to split textarea's (or richtext) content into rows and modify some of them.

View 1 Replies

ActionScript 3.0 :: Spark Textarea Which Has A Dynamic Feed From A Database?

May 5, 2011

I am using a spark textarea which has a dynamic feed from a database I am saving a template using TextConverter.export(editor.textFlow,TextConverter.TEXT_FIELD_HTML_FO RMAT,ConversionType.STRING_TYPE).toString(); and saving it via php its a longtext in mysql database. I am not using stripslashes or muniplating the text in any way and looking at the data in the database all the whitespace is still there.
 
When a users selects the template to bring it back into the textarea I am using TextConverter.importToFlow(repairedst,TextConverter.TEXT_FIELD_HTML_F ORMAT);

and all my spacing is gone.

View 1 Replies

Flex :: Importing Html In Spark With Textarea TextConverter?

May 19, 2010

I have imported a Html text into textarea using Textconverter and it works well, but I have a problemI need to mark with "image not found" if and image inside into imported html isn't more online or simply don't exist

var string:String = '<img src="elvis.gif" />';
aTextArea.textFlow = TextConverter.importToFlow(string, TextConverter.TEXT_FIELD_HTML_FORMAT);

[code]........

View 1 Replies

Flex :: Display HTML Text In The Spark TextArea?

Jul 24, 2010

The Below code is running well...

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" >

[Code].....

Then htmlText doesn't support Spark Textarea. Hence produces error. How does one go about displaying HTML formatted text with spark Text Area Property.

View 6 Replies

Flex :: Get Line Count Of Content Of Spark TextArea?

Dec 27, 2010

I want to get the line count of the spark text area content.

View 1 Replies

Flex :: Auto-resizing Spark TextArea Using Hero?

Jan 24, 2011

I'm trying to auto-resize a Spark TextArea using Flex Hero but having no luck.

EDIT: To clarify, I want to auto-resize the TextArea when typing, so there's never a scroll bar.

View 3 Replies

Flex :: Modal Spark TextArea - Making Background To Appear?

Feb 21, 2011

I want to make the background appear as if a modal window was opened but, instead of a window, I want to use Spark TextArea.. Is this possible?

View 1 Replies

Flex - Show A Line Under Each Row Of Text In A Spark TextArea

Jan 30, 2012

I'm trying to show a horizontal line under each row of text in a Spark TextArea. I want to give the text area the look of legal paper.

View 2 Replies

Flex :: Spark TextArea Not Displaying Embedded Fonts?

Feb 6, 2012

I can't seem to get TextArea to render any embedded fonts in project. I've searched online and have found a couple of instances of this issue but no solutions.

I have a few fonts embedded with my app. Spark Label & the mx:TextArea (switching embedAsCFF to 'false') will display them correctly so I know they're embedded OK. I have the fontFamily value in a binding but I even tried just instantiating a new TextArea then assigning one the the embedded fonts via the fontFamily style and have had no luck.

/* In my CSS file */
@font-face {
src:url("assets/fonts/UbuntuMono/UbuntuMono-Regular.ttf");
fontFamily: UbuntuMono;

[Code].....

View 1 Replies

Flex :: Add An Image At A Specific Location In Spark TextArea Or TextFlow?

Aug 23, 2010

I have a Spark TextArea:

<s:TextArea id="editor">
<s:textFlow>
<s:TextFlow id="_tf" >
<s:p>Lorem ipsum etc.</s:p>

[code]...

But still no joy in inserting into the middle. Also, the above code wouldn't replace highlighted text, but that's not the real concern here.Based on Eugene's link the key to this is EditManager.The following code represents the working updated function:

protected function imageBtn_clickHandler(evt:MouseEvent):void {
var em:EditManager = editor.textFlow.interactionManager as EditManager;
em.selectRange(editor.selectionAnchorPosition, editor.selectionActivePosition);

[code]...

View 1 Replies

Flex :: Listen For FocusIn And FocusOut Events For A Spark TextArea?

Feb 16, 2011

I am writing a flex application and I have two Spark TextAreas. I want to create an EventListener so that when the user clicks on a text area, the text inside the TextArea is cleared:

this.addEventListener(FocusEvent.FOCUS_IN, onFocusIn);
private function onFocusIn(ev:FocusEvent):void {
if (this._showsCaption) {

[Code]....

Currently I can implement this with a Spark TextInput, but when I click on the TextArea, the focusIn event never fires and the onFocusIn() handler is never called.

View 1 Replies

Flex :: Programmatically Scroll To The End Of A Spark Textarea When A New Line Is Added?

Sep 6, 2011

The old method for the mx:TextArea no longer works. Specifically:

myMxTextArea.verticalScrollPosition = myMxTextArea.maxVerticalScrollPosition;

I've found this method for Spark but seems a bit kludgy:

mySparkTA.scrollToRange(mySparkTA.text.length-1, mySparkTA.text.length);

Is there a more straightforward way to do this?

View 1 Replies

Actionscript 3 :: Stop Triggering Two Event At A Time In Spark Textarea?

Oct 12, 2011

textChanged and valueCommit both event listener are attached with a spark textarea as follows:

addEventListener("textChanged",
function(event:Event):void {
colorize();

[Code]....

if I type any thing in textarea, then this colorize() function is called twice. How can I stop this one that both event should not be triggered together.

View 1 Replies

Flex :: Remove Line Breaks From Pasted Text In Spark TextArea?

May 5, 2011

I'm trying to remove all line breaks from the text that is pasted into the Spark TextArea.

I have:
<s:TextArea id="inputSearchQuery"
width="100%" height="22"

[code].....

View 1 Replies

Actionscript 3 :: Cancel Editing In Halo/Spark TextInput And TextArea Components?

Jun 2, 2011

In the AdvancedDataGrid component, when you are in Edit mode in a cell, you can hit the Escape key to cancel editing (i.e. return to the previous value in the cell).I had expected the same behaviour while in Edit mode in both the Halo and Spark TextInput and TextArea components, and was surprised to find out that this is not the case.I looked at the attributes of all four components to see if this is something that I need to configure, but couldn't find anything.

View 1 Replies

Flex :: Actionscript 3 - Spark TextArea InsertText Breaks Undo Buffer?

Jun 9, 2011

I have a simple TextArea

[Code]..

Everything works as expected, but the undo buffer is reset / stops at the point that a tab was inserted.Is there a way to ensure that the undo buffer remains in tact even with the tab inserted

View 1 Replies

Flex :: Changing Spark TextArea Text Color Dynamically Over A Range Of Characters?

Dec 22, 2010

I am attempting to dynamically change the color of a subset/portion of text in a Spark TextArea control. Using the MX-based TextArea, I could leverage the mx.controls.textClasses.TextRange type and change the color directly as follows:

TextRange tr = new TextRange(theTextAreaControl, false, beginIndex, endIndex);
 tr.color = somePredefindColor;

Input Parameters to TextRange constructor:

1st argument: The TextArea control that will provide access to the underlying textField property
2nd argument: Indicates the TextRange will not modify the content of the TextArea
3rd argument: The beginning index position in the TextArea text string
4th argument: The ending index position in the TextArea text string

How would I go about doing this for a Spark-based TextArea control? I am looking to dynamically change the font color for a range of text, not just the entire TextArea AND I cannot statically specify the font color. The problem I run into when trying to re-use the TextRange type is that the 1st argument is expected to provide the textField property, which is currently not on the Spark-based TextArea control. I thought about extending the Spark-based TextArea control to provide this accessor property but that seems like overkill and is probably not the best approach.

View 1 Replies







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