ActionScript 3.0 :: SelectionActivePosition Doesn't Recognize Carriage Returns?

Jun 4, 2010

I've got an app where I'm grabbing the currently highlighted text from the user in a RichEditableText block and I've noticed that when the user highlights a selection after a carriage return that selectionActivePosition and selectionAnchorPosition return values that don't count the carriage return, even though when I slice the corresponding text with the retrieved values, it does take the carriage return into account and therefore returns a value shifted one character to the left for each carriage return appearing earlier in the text.

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Carriage Returns In XML Attributes?

Feb 19, 2009

My XML looks like this...

<feature title="This is my /n features title"/>

I don't have access to change the schema.

In Flash I load the text content of the title attribute into a text field, problem is -- the prints instead of operating as a carriage return (new line).

Again, no access to the XML so changing the TextField to htmlText and adding a <br/> tag wont work.

View 2 Replies

ActionScript 3.0 :: Cannot Get The Carriage Returns And Tabs Stripped From XML

Dec 22, 2009

why i cannot get the carriage returns and tabs stripped from my XML. I guess the only drawback at this point is that i cannot form my xml file nicely and am stuck placing all my node text on one line.

So far here is what i have tried without any luck;

ActionScript Code:
var subXml:XML  = new XML();
subXml.ignoreWhitespace = true;
subXml = new XML(e.target.data);

[Code].....

I am otherwise at a loss as to why it's leaving the tabs returns etc. in my textFields when i populate them with the node data.

View 2 Replies

Flex :: Disable Carriage Returns Within An Editable TextArea?

Aug 2, 2011

I am simply wanting to stop a user entering carriage returns in a TextArea. I have been experimenting with the 'restrict' property in the TextArea but cant seem to work it out.I have the following code:

<mx:Canvas id="cvs1" label="Panel 1" width="100%" height="100%" creationComplete"addEvtListnerOnPlaceText()" backgroundColor="#FFFFFF">
<mx:TextArea id="txtP1T1" x="10" y="176" text="{placeName}" width="210" textAlign="center" color="#DC0000" restrict="this is where I need some help"/>
</mx:Canvas>

I've now managed to get something working:

private function addEvtListnerOnPlaceText():void{
txtP1T1.addEventListener(KeyboardEvent.KEY_DOWN, onKeyEventDown);
txtP1T1.addEventListener(KeyboardEvent.KEY_UP, onKeyEventUp);

[code]....

The only issue now is that if you hold return down, it clears the first carriage return and then keeps adding as long as you hold it down. I need a way to stop this happening without just losing focus on the text area.

View 1 Replies

ActionScript 2.0 :: Restricting Carriage Returns In Text Input Fields?

Aug 23, 2009

it's possible to restrict hard returns in text input fields? I've tried something like this:my_txt.restrict="^u0013", and a bunch of variations thereof, but nothing seems to keep the Enter key from doing it's thing. Second best would be to traverse through a string a user has entered and replace hard returns with a space or dash, but again I've had no luck looking for or . I've tried entering text and hard returns into a dynamic textfield set to input, but when I try this:

var n:Number = my_txt.indexOf("
")...
trace("n: "+n) //traces "n: -1"

View 7 Replies

CS4 Doesn't Recognize Fonts?

Jul 30, 2009

I just installed Flash CS4 and brought ip a couple of fla's I get a box telling me I don't have some fonts on my system that I know I do have like Verdana and Ariel, etc.  Is there something I should configure?

View 1 Replies

Embedding SWF: Doesn't Recognize FP10

Jun 25, 2009

Flash files I embed have faulty plugin detection - it does not recognize FP10 as an upgrade from FP9. This is in the knowledgebase, but it does not suggest a solution. "Some websites will ask you to install or update Flash when you already have the Flash 10 plugin installed. This is not a problem with your Mozilla browser or your Flash plugin, but with certain websites that misidentify Flash 10 as Flash 1 due to a faulty detection scheme. Contact the website and ask them to correct the problem or, on Windows, you can try the site in Internet Explorer, since the Flash ActiveX detection may work even though the plugin detection does not."

View 4 Replies

AS3 :: Professional - Doesn't Recognize A Button In A Movieclip

Dec 24, 2011

I'm new to flash and action scrip 3.0. I made a movie clip and in it two buttons. The first button is called designer_b The second button is called animator_b This is the code I made:

[Code]....

View 5 Replies

Flex :: ComboBox Selection Doesn't Recognize

Apr 19, 2011

My code snipet looks like :

[Code]...

Do you have idea about the reason for that error and how to prevent it? N.B. The code that triggers this error is as a result for click handler. If before encountering this error change the selection on my yearsCb, everithing is fine. EDIT: I forget to specify that this error is thrown when it is a selected item in my ComboBox. It seem that after container that holds the ComboBox loses the focus, it doesn't recognize it's ComboBox child as having a selected item anyway (this problem arise only after the modal popup close.).

View 2 Replies

Flex :: SequenceWaiter Doesn't Recognize Event?

Jul 7, 2011

I'm using this AsyncHelper. I would like to create basic test case where I would like to dispatch event from the test method (by Parsley MessageDispatcher), catch this event in any other method and dispatch it back (by flex EventDispatcher).

This is my test case:
package flexUnitTests {
import flash.events.ErrorEvent;

[code]......

View 1 Replies

ActionScript 3.0 :: Package Doesn't Recognize Stage.stageHeight?

Oct 4, 2009

how to make my package use stage.stageHeight so I can tell a ball to bounce when it reaches the bottom of the stage. I'm calling my ball to the stage from the library in a way I'm not used to and have never done so I'm assuming it has got to do with that. if you take a moment to look at it (pretty simple i've stripped out everything except for the physics that makes a ball drop and bounce) and let me know why I cant detect the stage.

particle.as file:

[Code]......

View 2 Replies

ActionScript 3.0 :: Flash Doesn't Recognize Classes Upon Exporting?

Nov 29, 2011

I was asked to update some information on a certain project. The weird thing is that whenever I try to export the movie from Flash (I work with CS3 Professional), I get errors. Before even changing anything. All of them are reporting MovieClip not being recognized ("The class...... must subclass flash.display.MovieClip since it is linked to a library symbol of that type" (and a few SimpleButtons too). There is a total of 57 errors. All the classes import and extend MovieClip.

Now I'm pretty sure this doesn't have anything to do with the code itself, since this project was already published and tested working as it is. I tried adding Class paths in the preferences menu but this didn't seem to help.

View 8 Replies

ActionScript 3.0 :: Image Gallery Doesn't Recognize Load Request?

Feb 5, 2010

I'm trying to create a five image gallery, and when I try to add the load request for the 3rd, 4th, and 5th images I get an error message that says it doesn't recognize that request: see code below:

stop();//turn on buttonMode for mc's so mouse changes to handone_mc.buttonMode=true;two_mc.buttonMode=true;three_mc.buttonMode=true;//four_mc.buttonMode=true;//five_mc.buttonMode=true;////--add button modes for 3-5 here////define

[code].....

View 1 Replies

ActionScript 3.0 :: AddChild Instances Doesn't Recognize Event.target.name?

Oct 15, 2011

I have a button that was added to stage using addChild when the page load, the button is suppose to be removed using removeChild and redirect into its specific page using event.target.name...somehow i got this error: Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.

I have try replace this line, var newswf:URLRequest= new URLRequest("./swfs/"+ event.target.name +".swf"); with this, var newswf:URLRequest= new URLRequest("./swfs/about.swf"); and everything works fine, but i dont want that since I want it to load dynamically and uses less code..
 
my code as below:

var about:About = new About();
about.x = 300;
about.y = 200;

[Code]....

View 5 Replies

ActionScript 2.0 :: Custom Class Instance Doesn't Recognize Own Constructor

Aug 18, 2011

I'm having a problem with customized Actionscript objects not recognizing thier own constructor. This is the pertinant part of my script:

ActionScript Code:
//File: Line.as
class Line extends Object{
public function Line(args){

[Code].....

Clearly, the variable "testLine", is one of my custom "Line" objects. Clearly, it has been made with the "Line" constructor. So why won't flash acknowledge this?

View 3 Replies

ActionScript 2.0 :: GotoAndStop - Command Doesn't Recognize Labels Only Frames

Aug 7, 2006

I'm trying to target labeled frames using a simple gotoAndStop command but for some bizzare reason the code doesn't recognise labels only frames.

[Code]....

View 2 Replies

ActionScript 2.0 :: Targeting Attached Movieclip - Variable It Doesn't Recognize Its Path

May 6, 2004

i have a problem adressing or targetting a attached mc when i target de mc directly it works fine but when i try it trough a variable it doesnt recognise its path anymore??? hopefully a part of the code is gonna explain the situation a litle better... this piece works fine:

[Code]...

View 3 Replies

ActionScript 2.0 :: Set A Dynamic Field With The Var ImageNumero From XML File But The Loop Doesn't Recognize It?

Apr 29, 2009

I've created this loop to fill some data from a XML file...I can access the data but it doesn't work on my look.I have several movie clip on the stage such as thumb01, thumb03...then I whant to set a dynamic field called thumb01.numero.text with the var imageNumero myImage[i]. attributes.numero; attribute from my XML file but the loop doesn't recognize it...here is my code...

Code:
var xmlData=new XML();
xmlData.ignoreWhite=true;[code]....

View 2 Replies

Flex :: Tree Discloser Icon - Renderer Doesn't Recognize The Leaf Child?

Aug 31, 2010

i gave the tree an ArrayCollection as dataprovider that i pulled from the database, and it contains the children, but the discloser icon wont disappear on an object that doesn't have a child.i think the problem is that the renderer doesn't recognize the leaf child, wich contains a children array of length 0, or null......

View 2 Replies

ActionScript 2.0 :: Internet Explorer Doesn't Recognize The "else" Condition On The Y-axis

Jan 30, 2009

I have a drop down menu on the _root with

[Code]....

as the AS causing it to drop down and return to its original position. Everything works great in Safari and Firefox. However, Internet Explorer doesn't recognize the "else" condition on the y-axis. It doesn't return the drop down to it's original position???

View 9 Replies

Media Server :: Flash Media Live Encoder Doesn't Recognize System Speakers?

Jan 6, 2012

When using Adobe Flash Media Live Encoder, it doesn't seem to recognize my system speakers, so I can't record system audio.

View 1 Replies

Flash :: Google Visualization : Annotated Time Line With Wmode="opaque" Doesn't Recognize Mouse Scroll In Most Browser?

Jan 17, 2011

As stated in the title, I am now trying to create a chart using Google visualization: annotated time line. It's very easy to use and the documentation is fairly easy to understand as well. You can find the documentation here.I run into a problem about the wmode of the chart which is a flash object.The default value of the chart's wmode is "window" and it will always overlay all HTML objects in the same page. That is very annoying, because even the jquery block() method doesn't work on it.

When I change the chart's wmode into "opaque" or "transparent" the chart will not overlay HTML objects with higher z-index, but it doesn't recognize the mouse scroll event. It still catch the mouse click event though.I have tried it in the following browser:

Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 (.NET CLR 3.5.30729)
Opera/9.80 (Windows NT 5.2; U; en) Presto/2.7.62 Version/11.00
Safari 4.0.5 (531.22.7)
IE 7.0.5730.13

Only the IE can catch the mouse scroll even, the others couldn't recognize it.

View 1 Replies

ActionScript 3.0 :: How Ever Load Always Returns True And Write Always Returns False

Nov 4, 2011

I have a load file and a write to file method. We all know what they do. How ever load always returns true and write always returns false....Right there you know somethings wrong. Because The forums have an issue with me posting code...I posted it here: [URL] Based on this code what is the issue here? why is write always returning false and why is load always returning true? (even for files that do not exist). My understanding is that if flash cannot find the file it should write to it will create it and if it cant load said file, then that method should return false.

View 6 Replies

ActionScript 2.0 :: Menu Navigation System - Dropdown Appears And Returns When The Dropdown Returns

Jul 15, 2004

I'm having with a menu navigation system. I'm using Flash MX. I have created a menu system for the site I'm building ([URL]) where one of the buttons "Choose photographer" drops down a list of names. All the other buttons just jump to another page. The drop down is currently using tweens also the logo moves to the left as the dropdown appears and returns when the dropdown returns. All working fine apart from its a bit jerky.

It's I just wanted to get away from tweening and use action scripts instead, as I'm a newbie to all things Flash I trawled the net for tutorials and examples so that I could cobble together the exact same effect. I have managed to get the drop down work and return using the action script and it does seem smoother and works slightly better. But can I get the logo to move to the left and back in time with the drop down...no.

View 1 Replies

ActionScript 2.0 :: Return Carriage With XML?

Jul 5, 2005

Is it possible to have a well formatted text with XML?Will i be able to use the 'return carriage' and lay my text in paragraphs?

Iam trying to load an external xml file that has description of the images in my portfolio.

View 2 Replies

ActionScript 3.0 :: Get Carriage Return & Line Feed?

Jul 4, 2009

How can I get the text from the textarea component along with the line feed & carriage return characters?

As now, I amusing the text to send email. But in email, it showing all in a line rather than multiline, which means carrriage return and/or line feed characters are missing. How can get them?

View 1 Replies

ActionScript 2.0 :: Replace Carriage Return Into Normal Text?

Dec 24, 2010

How do I convert a multiline of text from an input box into a single line of text except I would put a string of characters to replace the carriage return?

from:
Hello
world
I

[code]...

to:

Hello~|~world~|~I~|~am~|~here.

Tried this and other variants but doesn't work.

txt = txt.split(ASCII(13)).join("~|~");

View 2 Replies

Actionscript 3 :: Carriage Return Line Feed In MXML?

Oct 20, 2010

I have this line:

text="{selectedOrder.targetLocationName} 'crlf' {pickUpLocationHTML}"

View 1 Replies

XML :: Admin Panel - Big Spaces Between Phrases (Carriage Return)

Feb 8, 2011

I am developing an admin panel for an flash site. One of the sections contains large amount of text containing Carriage Returns. It can look as this :
John Doe was born in Athens in 1974.
He studied at the Athens School of Fine Arts and he presented his first solo exhibition in 1996.

So from the text area the text goes to mysql and from mysql I generate an XML file. The problem is the xml file source is looking like this :
John Doe was born in Athens in 1974. &#13;
He studied at the Athens School of Fine Arts and he presented his first solo exhibition in 1996. &#13;

This way in flash the text has some big spaces between phrases and I dont like it. How to generate XML file to be like this :
John Doe was born in Athens in 1974.
He studied at the Athens School of Fine Arts and he presented his first solo exhibition in 1996.

View 2 Replies

ActionScript 2.0 :: Restricting Carriage Return In Text Input Fields?

Mar 21, 2007

If it's possible to restrict hard returns in text input fields? I've tried something like this:
my_txt.restrict="^u0013", and a bunch of variations thereof, but nothing seems to keep the Enter key from doing it's thing. Second best would be to traverse through a string a user has entered and replace hard returns with a space or dash, but again I've had no luck looking for
or
I've tried entering text and hard returns into a dynamic textfield set to input, but when I try this:
var n:Number = my_txt.indexOf("
")...
trace("n: "+n) //traces "n: -1"

View 4 Replies







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