I need a simple digital clock, but did not find any such standard component. Then using Timer and Date class I tried to create a Digital Clock in ActionScript.
Solution
I used Timer and Date class to implement this clock. The clock also has the functionality to dispatch events for (every second, every minute, every hour). This clock can be extended to add other functionality as well.
To make a Google map component in Flex. Also provide a marker capability, such that on every double click the marker is added on Google map.
This can be used to develop mesh-up application using googlemap with some other API (like yahoo search)
Solution
On each double click on the map, marker is added to Google map thus creating a overlay of markers on top of the Google map.
Please include the SWC file provided here with as an attachment.
The standard Label component truncateToFit feature that adds ellipses to displayed text that does not fit in its boundaries only works for text that does not have html markup. The truncateToFit feature is also limited to only the Label component which only allows single line text. To do multiple line text, you need the Text component which has the truncateToFit disabled.
Solution
We override the existing functionality of the Label component and mix in some fancy markup parsing and a html truncateToFit component is born. And while we were at it, added the same functionality to the Text component as well allowing for truncateToFit to work for wrapped text.
We know how to do it with functions how to set a default value when nothing comes through but what about variables such as in scenarios of flash vars where we just don't know until run time if we are going to get the variables or not.
Solution
Like anything cool in the world of programing there are a few options. The first is a traditional if statement asking our variable if its empty or not but then that wouldn't be such a cool trick if that was the full solution. come join in this is really cool...
Working with events in AS3 isn't as easy as it used to be in the past. While you need to monitor every event in your application there is no real easy way to do it without manually remembering all of your events and remembering to remove them on a one by one bases(ohi so much work...).
With all the new features and powers of AS3 came a lot of leg work. So many classes out there tried to tackle this issue from many interesting and different directions. But most of them demand a large learning curve and a big shift in the way you would interact with your code, some through a framework that locks you into a development style, some changed the way flash handles events.
Solution
Essentially Event Controller is an easier way to keep track of events in actionscript 3. Event Controller is a simple extension to your normal workflow that allows you to easily tag, group and remove any and all events, pause events and restore them when you want them back and more.
We know that there are many great solutions out there from very talented people. But we wanted to bring out another option the most simple one we could think about and we are with our ears to the community(so far in our 3rd revision) to making it even easier. The goal is to create the most simple yet feature rich event hub. Let unknown leaks be a thing of the past by taking our library out for a spin.