Flex :: How To Get Characters Exact Position In TLF

May 2, 2011

Any way to get the exact position for every character inside a textflow?, also I'm having trouble with the TLF documentation, is there anny documentation that shows more on how to work with it in actionscript rather than mxml, I am looking to write my own component and perhaps not use richtexteditor if I don't need to. How to get each characters position in the textflow:

private function getCharPosition():void {
for (var i:int=0; i<=textController.flowComposer.numLines; i++) {
var textFlowLine:TextFlowLine = textController.flowComposer.findLineAtPosition(i);
var textLine:TextLine = textFlowLine.getTextLine();
trace('number of atoms in this line: ' + textline.atomCount);
[Code] .....

This returns an error that's why I have try and cache, I have tried to change textLine.atomCount to -1 but that wont work either. Now I don't know what character exactly that I have the position for.

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Calculate The Exact Position And Scale?

May 15, 2006

imagen I have a movieclip (space_mc) w1000Xh1000 px?

inside the space_mc I have 2 movieclips:
- vlak1_mc (w100xh100px, _x:100,_y:100);
- vlak2_mc (w100xh100px, _x:400,_y:400);
ok!?

now i put the space_mc on the stage and scale it to 20% the stage (document properties) are w800xh600

Now i want that the USER clicks on vlak1,2_mc and the space_mc scales to 100% But the clicked vlak(1,2)_mc must have the exact coordinates as in the space_mc?

so if clicked on the vlak1_mc!

the space_mc zooms in to 100% and the _x,_y of the vlak1_mc are x100,y100 on the stage(800x600)?

[URL]

View 1 Replies

Flash :: NetStream.seek() For Mp4 To Exact Position Not Keyframe?

Jul 26, 2010

It seems seek() on mp4 file seeks to the closest keyframe (seekpoint). Is it possible to seek to exact position in between of keyframes?

View 2 Replies

Professional :: Create A Button That Will Return The User To An Exact Position On The Stage?

Jun 23, 2010

possible to create a button that will return the user to an exact postion on the stage? For instance, I want to create a back button at the bottom of the stage, and when someone presses it, it takes them to the top of the stage? I am using Flash CS4 on Windows.

View 3 Replies

Flash :: Which Video Player Can Give Exact Position (timestamp / Frame Index) Information

Dec 18, 2011

I'm looking for a Flash Video Player (something like JWPlayer) that I can embed in an html page, that provides a JavaScript API with a method to get the exact timestamp (aka position, or frame-count) for the current frame.

View 1 Replies

ActionScript 2.0 :: Create A Sidescroller Game In Which The Characters Arm Rotates According To The Mouse Position

Oct 18, 2005

I want to create a sidescroller game in which the characters arm rotates according to the mouse position(for aiming). I am no stranger to flash, I've been using it for years.

View 2 Replies

Flex :: Knowing The Exact Index Clicked In A Tree Event?

Jul 18, 2011

i have a tree component that dispatches an itemOpen event. When the black triangle next to the yellow folder is clicked, that folder opens to expose its children.

Is there anyway to know the index of the open folder? there is a rowIndex property in the target property of the openItem event that stores the index but it is not accessible.

View 2 Replies

Flash :: Builder - Know Exact Flex Sdk Version From Existing Project Files?

Nov 23, 2011

I received an inheritance old flex project. I've never worked with Flex. I installed the latest Flash Builder and I need to know the exact version of used Flex SDK. Is there any way to know used SDK version from project files?

View 2 Replies

Flex :: Seek To An Exact Point In A Flash Video Without A Flash Media Server?

Aug 20, 2010

Is the Flash Video (or Flex VideoDisplay) component capable of seeking to an exact moment in a video?It seems to always 'snap' to keyframes (which is understandable). I'm just wondering if there are any mechanisms in the video classes for seeking to exact frames, ie it should do the translation from keyframe to specific frame in the background rather than having to actually play the video forward to the desired frame.This is not a streaming file and has nothing to do with buffering. The player is just downloading a movie file from the web and playing it from memory.

View 1 Replies

ActionScript 1/2 :: Handle Special Characters/han Or Chinese Characters?

Aug 17, 2009

I am having issue with my created flash, it can't handle chinese characters? is there some way i can handle this thru code? or should there be any font or language pack installed

View 3 Replies

ActionScript 3.0 :: Each Field In The Form Only Allows 3 Characters And No Special Characters

Aug 23, 2010

1) Each field in the form only allows 3 characters and no special characters such as @ _ ! . , etc... 2) When the user goes to the next field in the form, the previous field appears blank but the when clicking on that again, the original text appears. 3) When submitting the form, it just keeps saying "in progress" and never shows the confirmation text nor does the email get sent. There is an HTML file included with this form but I am not sure if I need to put that in as I have embedded this form into an SWF file so I don't think I need that code but let me know if I am wrong about this. I am posting both the AS code and PHP code below..

[Code]...

View 2 Replies

As3 :: PHP URLEncoding - All Accentuated Characters Are Displayed As Weird Iso Characters

May 30, 2010

My problem is that all my accentuated characters are displayed as weird iso characters. Example :© is displayed %E9 I send a string to my php file :

[Code]...

View 4 Replies

Php :: Special Characters In Flex?

Jan 4, 2010

I am working on a Flex app that has a MySQL database. Data is retrieved from the DB using PHP then I am using AMFPHP to pass the data on to FlexThe problem that I am having is that the data is being copied from Word documents which sometimes result in some of the more unusual characters are not displaying properly. For example, Word uses different characters for starting and ending double quotes instead of just " (the standard double quotes). Another example is the long dash instead of -.All of these characters result in one or more accented capital A characters appearing instead. Not only that, each time the document is saved, the characters are replaced again resulting in an ever-increasing number of these accented A's appearing.

Doing a search and replace for each troublesome character to swap it for one of the none characters seems to work but obviously this requires compiling a list of all the characters that may appear and means there is scope for this continuing as new characters are used for the first time. It also seems like a bit of a brute force way of getting round the problem rather than a proper solution.Does anyone know what causes this and have any good workarounds / fixes? I have had similar problems when using utf-8 characters in html documents that aren't set to use utf-8. Is this the same thing and if so, how do I get flex to use utf-8?

View 1 Replies

Flex :: Cut The Strings Longer Than N Characters?

May 6, 2010

what's the easiest way to cut string in Flex ?I mean, I have a sequence of urls, I want them at most 60 characters length. If they are longer they should be cut and "..." should be added at the end.

<mx:LinkButton label="{bookmarksRepeater.currentItem.name}" click="navigateToURL(new URLRequest(event.currentTarget.label.toString()))" />

View 2 Replies

Flex :: ComboBox - How To Set Characters To Have Same Width

Jun 25, 2010

I am simulating a multi-column combobox by introducing spaces between each column, such that all rows for the 3 columns should appear in a single line. The gap in this implementation is that due to the varying widths of characters, this spacing technique does not work. How to set the combobox characters to have the same width? The other approach is to calculate the width occupied by characters in each column and then set the start position of the next column. How to achieve this?

View 3 Replies

Actionscript :: Flex - Change The Characters Of Xml?

Jun 15, 2009

I have the following problem,

given this xml

<test>
<comp>

[Code]....

now when reaching the point element = "new content"; my programm tells me I cannot give element the value new content as this is a string and element is xml.

View 1 Replies

Flex :: Get The Bounding Box For The Currently Selected Characters?

Jun 24, 2009

I'd like to do fancy things the selection indicator. How do I get the bounding box for the currently selected characters?

View 1 Replies

XML :: Flex - How To Encode Reserved Characters In ActionScript

Dec 15, 2009

I am writing a business app in Flex that uses web services to communicate with a middle tier. The web services accept and return messages in XML format. In many cases, I need to be able to allow the user to type something like the following into a field in the app, which in turn will be added as an element in an XML payload bound for a SOAP web service (without the quotes):

"account balance < 1000"

The Flex parser chokes when trying to serialize an element with this in the Text node (e.g., account balance < 1000. So I need some way to encode the "<" to "<" prior to doing the XML serialization. In addition, I would prefer a generic way to do this, such as with an attribute on the service declaration, since I have over 40 services that must support this kind of input.

View 1 Replies

Flex :: TextArea Unicode Characters With Control Key?

Jan 16, 2010

I am developing a Flex based window application. In that I have used a textArea, Now when I type some characters like ctrl+b, ctrl+e or ctrl+q, it shows some square characters in text area, I think these are some unicode characters but why these are being entered.

Unlike in simple textArea control on adobe example when I presses these key combination, there is nothing being entered, so why this only with me.

This is my window setup code

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"

[Code].....

View 1 Replies

Actionscript 3 :: Flex - Special Characters Not Embedding?

Apr 23, 2010

I am using the following code to embed Arial into my application:

[Embed(source='../assets/fonts/Arial.ttf',fontFamily='CustomFont',fontWeight='regular',
unicodeRange='U+0020-U+0040,U+0041-U+005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E,U+0080-U+00FF,U+0100-U+017F,U+0400-U+04FF,U+0370-U+03FF,U+1E00-U+1EFF,U+2022,U+2219,U+20AC-U+21AC',

[code].....

View 2 Replies

Flex :: Truncate Address Line 2 To 10 Characters?

Jul 28, 2011

I want to truncate address line 2 to 10 characters if a value greater than 10 characters is returned in the address validation response for address line 2. we also have address line 1 which is set to max of 40 characters, if address line 1 exceeds 40 characters and the result comes to address line 2,and if the length for address line 2 reaches more than 10 characters then i need to truncate that to 10 characters.

View 1 Replies

Flex :: Fonts - Displaying Thai Characters In FTE Components On Mac?

Nov 14, 2011

I am running into issues displaying Thai characters in Flex components that make use of the Flash Text Engine (FTE), specifically on Mac OSX 10.6.8 Snow Leopard.Here's a blurb of my compiler font managers in flex-config.xml:

<flex-config>
<target-player>10.2.0</target-player>
<!-- Specifies the version of the compiled SWF -->[code].....

Thai characters render correctly in mx components such as TextField so far. However, FTE components such as TextLine show those crappy-looking boxes as a substitution. My initial guess was that somehow one of the compiler font managers declared in flex-config.xml was not finding the right system font to fallback to for Thai characters. So, I ensured the system font was installed by going to System Preferences > Language and Text > Edit List. Then I changed fontFamily to Arial, Ayuthaya.Still was seeing the boxes of evil.

Next I figured that perhaps the Arial font might be assigning a box for each unicode value corresponding to a Thai character. So it was effectively overriding the Ayuthaya system font. So I changed fontFamily once more to just Ayuthaya and this worked with one issue - Ayuthaya looks inherently different from Arial for non-thai characters.is there a less invasive way to support Thai in FTE components such that the appearance of the text is closer to the Arial font? I would rather not embed a font because I'm constrained on SWF size.

View 1 Replies

ActionScript 3.0 :: Output Characters From Foreign Languages In Flex

Feb 16, 2009

how to output characters from foreign languages in Flex and ActionScript.

To start, I'm just trying to output Cyrillic in a text control, but its just not working.

Ive tried BOM (Byte Order Marks) indicating UTF-8 in the XML file containing the text. I also specified "<?xml version="1.0" encoding="UTF-8"?>" in that file, and also in the actual MXML file. The actual text control is in a seperate AS3 file without a BOM, but I'm compiling everything with -actionscript-file-encoding="UTF-8".

The original cyrillic text came from an html file with a BOM indicating utf-8. I can paste that text into any html file with the same BOM and it displays correctly; take out the BOM and its garbage, so all that is needed is the correct Byte Order Mark at the start of the html file.

View 2 Replies

Flex :: Find The Number Of Characters That Can Be Fit For A Text Control Of A Given Height?

Aug 12, 2010

In flex, I have mx:Text component. How can I find how many characters can fit into it without vertical scroll for a certain height & font etc.

View 1 Replies

Actionscript 3 :: Unescape (decode) HTML Characters From String In Flex?

Nov 29, 2011

How can I unescape HTML encoded characters (such as &gt;, &lt;, etc.) from a string, in Flex (AS3)?So, I have a string "x &gt; 3" and I want the result string as "x > 3".

View 3 Replies

Flex :: Rich Text Editor - Limiting The Number Of Characters?

Jun 11, 2009

Is there a way to restrict the number of characters in the Flex Rich Text Editor? I guess there should be, since it's possible in a textarea. So, if I could get hold of the textarea contained in the rich text editor, I would be able to do it

View 1 Replies

ActionScript 3.0 :: Get A Flex Text Control To Display Cyrillic Characters?

Feb 22, 2009

Does anyone know what I need to do to get a flex text control to display cyrillic characters for example. [wvxvw? hebrew?] In addtion to the main .swf (.mxml) file there are font libraries loaded that are also in a seperate .swf The text control is subclassed from Flex.Text and in a seperated .AS file. Then to top it, the actual text in cyrillic is coming from an .xml file.I've tried "<?xml version="1.0" encoding='UTF-8' " in the main .mxml file and the xml file. I believe I've put Byte Order Marks (BOM's) for utf-8 in the .AS file and maybe some of the other files. I've compiled everything with specifying the utf-8 encoding as well. I get nothing where the characters are supposed to be.

View 0 Replies

Flex :: Restrict Textinput To Accept All (including Special Characters) Except Numbers?

Apr 13, 2010

I have a text field (for names) wich must allow all characters, except latin numbers, is this possible? I can't think of a regex for this

View 2 Replies

Xml :: Accessing E4X Nodes Having Special Characters In Name Without Breaking Binding Chain In Flex?

Apr 16, 2010

I am using E4X to bind some values from xml in flex 3.There is a problem when xml tag's (or attribute's) name has special character in it: having xml content

var xml:XML = <tag>
<special-name att="val" />
</tag>

special-name could not be accessed using xml.special-name.@att because it is interpreted as subtraction, on the other hand using square bracket notation xml['special-name'].@att breaks binding chain.

View 1 Replies

Actionscript :: Flex - HtmlText With Full Width Image Cuts Characters Off?

Feb 16, 2011

My mx:Text's htmlText is the following:

mainText.htmlText = "<img src="breadmaker.png" width="339" height="275" vspace="0" hspace="0" />" + "Lorem Ipsum is simply dummy tex......(more here)"

However, the result looks like the following:ScreenshotAs you can tell, it cuts off the first few characters in the text after the image tag (Lorem Ipsum is sim), but it is only because the image is full width. If I change the img tag to width="200", it shows the text floating to the right.However, as you can tell with a full width image (because the Text component's width is 339), it seems the text is still floating to the right, but it's hidden off to the right side of the image.

View 2 Replies







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