I used TextConverter to convert a TextFlow in Flex to String to store it in my Database. How to convert that string back to TextFlow in order to display in Rich Text format
I am working as a developer on a Flex/Air application and we are using the buggy Flex RTE (RichTextEditor) to let the user manage his notes. At the moment I am trying to evaluate how costly it would be for us to build a new text component using the TLF (Text Layout Framework).Really important is the question if we can import the HTML text, produced by the RTE straight away. I know that there are some limitations regarding lists with TLF 1.1, but does it work in general?
I have just tried to grab some HTML formatted text from RTE like:
[code]I want a specific toolTip for "icon". I have read about using HTML and rollOver and rollOut but I'm building this as part of a larger text block; it's difficult to switch from incremental objects to HTML in the middle.If I cannot set an event on the icon, can I create an HTML bit in ActionScript as part (but not all) of a paragraph ?
i'm trying to add whitespaces in front of my text, but flex removes all but one whitespace from the text. So i can't format the text.
Here is the specified line:
<s:p> - Lorem</s:p> <s:p> ipsulum</s:p>
Here its shown correctly but when running the swf it reduces the whitespaces of the second line. Of course i tried to use CDATA but this didn't work too.
The link elements I'm talking about are single words, so they are not wrapped inside the container, which means that they should have a single bounding rectangle. But how do I go about finding this rectangle? I'm familiar with Flex3 but don't know enough about the new Text Layout Engine in Flex4.
<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);
open google docs, new document, and type in: hello world (world bolded)
then download it as html(zipped)
i unzip the html file, and save it to the assets folder in src folder of my Flex app
i have a Spark:TextArea instance and i want to do:
var importer:ITextImporter = TextConverter.getImporter(TextConverter.TEXT_FIELD_HTML_FORMAT); myTextArea.textFlow = importer.importToFlow(htmlSource);
where htmlSource should point to the saved html file somehow
how do i do this? i tryed embedding, converting to ByteArrayAsset and to String, but i always get the source of the html file and not it's rendered rich text (ie "hello world).
Given the following:private var errorHtml:String = "<TextFlow xmlns="http://ns.adobe.com/textLayout/2008"><p>Existing account, please <a click="clickHandler(event);">click here</a>.</p></TextFlow>";
I am using text layout framework textflow in Flex 3 to get embedded images. In the edit field for the application the user can apply formatting. This all works fine except if the user deletes all the text they have entered and then starts typing again then the formatting is lost.[code]To setup the initial formatting then similar code to apply the formatting when the user changes it.So how can I stop the user from 'deleting' the formatting if they delete all the text?
Is there a guide or document that deals specifically with migrating CSS and style attributes from Flex 3 to Flex 4? I have an application that I'm keeping on the 2006 namespace, but I'm having trouble with a couple concepts, like the halo only styles, the CSS namespacing conventions, and styling child controls.
I would like to have vertical tabs in Flex 4. I have started implementing this by having a vertical list down one side. On list selection I am updating the selection index of a view stack. This gives the functionality of vertical tabs.
My problem is the look and feel. How do I get the list to have a similar look and feel to the horizontal tab bar? Is it a case of overriding skins? I have found this post: Flex 4 vertical TabBar
which does implement vertical tabs. My problem with this is that I do not get any text in the tab. I think the problem is that this was originally written for flex 2. I am using flex 4 and am trying to put this component inside a
I have an ArrayCollection which has several employees and departments.Each employee belongs to one department. How can I find out how many employees are belonging to the same department from the said ArrayCollection.In database we use join query to do this, but how can I do this by using an ArrayCollection in Flex?
For Example
[code]...
How can i fetch these values from arraycollection in flex? is there in inbuild function or property provided by adobe.
I try to load an swf in my flex 4 project using the following line of code: <mx:SWFLoader id="game_swf" source="demo.swf" complete="init()" /> the demo.swf file is another project i created using flex 4. the problem is that when i run the application i see only the loading bar of the demo.swf flash file and nothing else. if i try to load a different swf file (for a example a game i downloaded), it loads just fine.
What is the best way to make a multi column form in Flex?My current solution if more than one column is required is to put the form items inside an <s:HGroup> but the alignment isn't the best.
When using BasicLayout (i.e. absolute positioning) - what is the best approach to place a Flex component in the center of the application?In the test case below I'm using x="{width/2}" but this gives me at least 2 problems:How do I account for the component dimensions (the ProgressBar in the test case)?Is the binding {width/2} a good idea to use? Wouldn't it send unnecessary DATA_CHANGE events in some cases?And finally I wonder, how this all applies to full screen applications using StageScaleMode.SHOW_ALL - because currently my application is aligned to the top-left in the full screen mode and there is a white dead zone on the right of it. (Which is at least a change from pure Flash/AS3 behaviour, where the full screen content is displayed in the center of the screen and 2 dead zones on the left and right).[code]
I have been stuck on this for far too long. I think it's simple so I must be misunderstanding something. I want these to display across the full width of my flash app. When I shrink the width of the flash player I want a scrollbar to appear. At the moment no scroll bar is appearing.
I'm trying to use the Profiler for the first time so I don't know much about it. But it doesn't seem to work.I run my project under profiler, it says it is running, but no window shows up. Nothing. I can see the project's icon down there but I see no window at all.Can this be cause by the fact that I'm using Flex 4.5? You can the app in the dock and it shows its live objects, but I don't see the apps' window and cannot interact with it. The app is just a simple 400x400 window with some black shapes in it.
problem is I have a spark Tabbar, with many forms in each tab. But I have a single global save button.problem is, if I don't open a Tab,it doesn't get initialized and therefore the forms it contains do not exist..
How Can I make it as if the user had clicked on every tab?
In Flex3, I could compile pure as3 code and use "embed" tags to load in images. This was done by Flex making a BitmapAsset class.I can still do this in Flex4.
However, there was a trick to fakeout flex3 and use my own mx.core.BitmapAsset class to remove some of the extraneous stuff Flex's BitmapAsset brings in with it. This is described here: [URL]..Unfortunately, I cannot get these tricks to work with Flex4 and get smaller file sizes. I end up with the error "VerifyError: Error #1014: Class mx.core::BitmapAsset could not be found."[URL]..Following this advice, I add -static-link-runtime-shared-libraries=true, and my swf loads without an error... but this means I am loading in the pieces of the flex framework I wanted to omit (and the file size says so too).
Is there a better way to fake out flex4 when it comes to using Embed?
I have a video file in my local system.I am using windows XP in my system. Now i want to send this video file byte array to server in Flash Builder (Flex 4). I am using PHP at server end.
Why do I need to do add extra namespace declarations (below) in a Flex 4.1 "MX only component set" project to get it to compile within Flash Builder? (It says mx:LineChart cannot be resolved when a chart is added via Design View, and datavisualization.swc is referenced.)
Is there a way I can get this to compile without adding these special xmlns:charts, xmlns:series and chartClasses to the declaration? (If I just leave the default namespaces and use mx:SomeChartComponent, it doesn't compile.)