Archive

Archive for May, 2011

Simple TLF Text Editor

I found a great TLF editor that is simple and to the point, it is under the MIT license, and is of course open source.

I don’t remember the combination of search terms to find it, but I’ve looked for something like this before and was unable to find it despite it being written in Q3 last year. The other examples that I’ve seen are way too heavy or are just plain bad.

Advertisements

Flex 4 Vertical Scroll Speed

May 18, 2011 9 comments

By default, scrolling content when using the Scroller component occurs very slowly – Even down to 1px per event.

Try running the following example:

<?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" minWidth="955" minHeight="600">
	<s:Scroller width="100%" height="100%">
		<s:Group width="100%" height="100%">
			<s:Group width="100%" height="100%">
				<s:VGroup width="100%" height="100%" horizontalAlign="center">
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
					<s:Label text="I need to be scrolled, man!" height="50"/>
				</s:VGroup>
				<s:layout>
					<s:VerticalLayout paddingBottom="100" paddingLeft="100" paddingRight="100" paddingTop="100"/>
				</s:layout>
			</s:Group>
		</s:Group>
	</s:Scroller>
</s:Application>

In order to bring scrollable content using a Scroller up to normal web standards (say 50px or 100px per event) with a setup like the above, you have to override the VScrollbar and assign a custom skin to the scroller that uses the override.

Read more…

Categories: Flex 4 Examples

SkinnableTextBase focusManager runtime error popup

May 5, 2011 4 comments

When you show a popup in Flex in a mobile environment, defined as the style “interactionMode” being set to InteractionMode.TOUCH in this context, that is based on a component that does not implement the mx.managers.IFocusManagerContainer interface, you will receive a runtime error when the user taps the control that is to receive focus.

Lets pretend you have a custom component that is based on <s:Group/>:

Read more…