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


Similar Posts:


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

Flex :: Implementing Undo/Redo Within A TextArea?

Dec 2, 2009

Im wondering how to implement undo redo functionality with a TextArea. I already have an undoredo framework functionality working, now I have two questions.When do I start/stop a new undo/redo command, eg when a user hits undo, how far back do I go. How do I implement this(1.) in a normal TextAreay thinking:I thinking that I should create a new undo command, when anything but a alphanumber+space is hit. To do this I would use the keyDown event and test if the key is alpha num if it is not I will reset the command.

View 3 Replies

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 :: 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

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

ActionScript 3.0 :: SeekBar Breaks Everything When Seeking Beyond The Buffer?

Dec 9, 2009

I used a template from adobe and modified it to fit my needs. Instead of one long video with cuepoints, I have several videos that I want to switch when the buttons are clicked.verything works great except when the user seeks beyond the buffer (progressive download).hen this happens, everything breaks. All of the buttons, playback, play/pause... everything. You have to refresh the page and start over.My quesiton is, does the seekBar need a custom eventHandler? Shouldn't it work on it's own? Here is my code:
 
import flash.events.*;import fl.video.*;
//-----------------// Video control assignment//-----------------
display.playPauseButton = play_btn;display.stopButton = stop_btn;display.seekBar =

[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

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

Flex :: Scrolling An Editable Spark TextArea From Hero Mobile On A Touch Device?

Mar 21, 2011

How do you scroll an editable TextArea (Flex Hero) on a touch device? I am referring to the situation where the text does not fit in the TextArea height.When I try to tap and drag the text gets selected and not scrolled... Am I missing a something here? I am using verticalScrollPolicy = on (also tried auto).I am testing the code in the Blackberry Playbook simulator (my targeted device for my app).

View 2 Replies

ActionScript 2.0 :: Detecting Line Breaks In Textarea?

Sep 18, 2009

I am developing an admin tool for a client. There is a textarea in the tool that the client will type out a description for the video he wants to upload. This description sometimes might have a few paragraphs. I am pushing the data from the textarea into an HTML file and saving on the server so that it integrates with his site. My question is, how do I detect the line breaks in the text area and change them to HTML breaks <br> once the user submits the data?

example:

Hello, this is a test.

should be turned into:

this is a test.<br><br>?

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

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

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

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

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

Actionscript 3 :: Spark Images In Spark List With TileLayout Disappear On Scroll And Drag In Flex App

Jul 1, 2011

I have a renderer that looks like this:

[Code]...

Loading thumbnails using this method works perfectly. The issue happens when you scroll the List.

View 1 Replies

Flex :: 4 - Add Component To Title Bar Of Spark Panel Or Spark TitleWindow

Feb 7, 2011

I'm looking to add a couple of buttons to the title bar of a Spark Panel or Spark TitleWindow. Is this possible to do without making the panel from scratch?

View 1 Replies

Flex :: Undo, Redo Functionality With Image Manipulation?

Jan 21, 2010

Loads an image to an Image component Transform the image (rotate, flip) with the Matrix Apply filter(s)

Now I am thinking about to create some undo redo functionality. Each time I do a transformation / add an filter I want to be able to go back to the previous image (before the action).

My thought is to have an Array and add the previous bitmap to the stack. But I see that there are some differences between transformations and filters I have also seen the ImageSnapshot and whot i can do and it looks like what I am after.

View 1 Replies

Flash - Binding To Update On Use Of TextInput's InsertText()?

Jul 19, 2011

I have a simple TextInput derived control, that insert's some text on Ctrl+Shft+B:

[Code]...

View 2 Replies

Flex :: Flash - Buffer + Live Stream Via RTMP?

Jan 27, 2010

Live streaming and a buffer on a NetStream do not mix. Why? The docs don't say you can't do this.The playback gets hosed. Buffer is supposed to fill to what you set it to before playing. Instead though, about half the time, the player starts playing right away and disregards the buffer time you've set. Then you get caught in short buffering and rebuffering cycles that degrades the playback experience.

Give it a shot yourself. Here is the simplest of live streaming video players. No frills. Just connect it to your live stream by changing the defaultURL string and stream name in the ns.play() statement.

Run it in Flex debug mode. It will check and print the ns.bufferLength property every second. The buffer is set to 20 secs currently. Last time I ran it, I never made it above 2 seconds in the buffer. Player started playing right away instead of buffering the full 20 secs first. Sometimes you get to the full 20 and sometimes not.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
initialize="init()">
<mx:Script>

[code]....

View 2 Replies







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