Archive | component RSS feed for this section

Distort with drawTriangles()

29 Jun

There are a growing number of posts about the technique to distort an image with the drawTriangles() function. But most of those examples create a lot of extra vertices that aren’t needed for displaying the image and more calculation means more CPU consumption. I explain here how to work with verticals and show some basic examples.

Basics

Look at this example:

(more…)

Get the dataprovider of another Line in lineChart?

26 May

In some cases you have 2 different XML files to show 2 different lines in a lineChart. For example you want to compare a companies incomming with another month and each month is in a different XML. In a dataTipRenderer I show the styled data but I can only access data from 1 line. My goal is to create something like this in my dataTip:

April 2009
$29,000
May 2009
$30,000
+3%

Is there a way to get a dataProvider from the other line that is in the lineChart? Or is there a way to work around this?

Strange behaviour of Tree component

12 May

I’m  making a tree like menu structure. It is already a hacky business but now I encountered another problem. And I have no clue where it is happening and if I do something wrong or Flex is messing it up.

I have a Tree component that uses a tree renderer to render the items. In this tree renderer I determine if it has children and style it by setting the left position and adding an icon.

(more…)

How to find an address with Google maps Flash API

19 May

After the Flash Google maps API release I spend some time to see what is possible. I started with the documentation from Google. In there documentation they are using the latitude and longitude coordinates to set the center of your map. This is not really a human readable way to do it and personally I never used the latitude and longitude coordinates to find a city or street in Google Maps. That is why I started searching for a way to center the map with an address.

Google Maps Application

I build a small application with source-code available in Flex that is using this technique. In the left upper corner you can search your own address. I use ClientGeocoder to search for the address but the problem i’m running in to is that you can’t run it local because he returns this error.

Warning: Domain maps.googleapis.com does not explicitly specify a
meta-policy, but Content-Type of policy file
http://maps.googleapis.com/mapsapi/crossdomain.xml is
'text/x-cross-domain-policy'.  Applying meta-policy 'by-content-type'.

You can’t use ClientGeocoder crossdomain. You should call it from a domain that has a registered Google Maps API key in my case “http://blog.arnomanders.nl”.

Direction of the TileList behaves strange

18 Apr

I stumbled into an incorrect working function of the TileList in Flex. It looks like they swopped a few variables around.

If you set the direction of the TileList to horizontal it looks like Flex doesn’t care about the option and just scolls vertical. After that I checked an Adobe quickstart guide to know sure that I wasn’t doing anything wrong. But I couldn’t find anything that I missed.

Because I hate it if things don’t work I try everything to get it working. So I tried to set the direction to vertical just to see if something was happening and now the TileList scolled horizontal… very strange.

here is a example with source code (right click)

TileList problem example

Maybe I’m doing something wrong? Do other people have the same problem?

ImageViewer3D final release

11 Mar

Today I’m going to release the code of ImageViewer3D like I promised before. It is not finished but I have to move on to other things. I few days ago I asked everyone to give input and because of the shortage of time I can’t put every suggestion in. Sorry for that but many thanks for the comments. On the bottom of this article you can find the download urls. To make this component I used Away3D as 3D engine and Tweener for the tweens.

Features

A few features of the ImageViewer

  • Slideshow
  • Flickr search
  • XML picture load
  • Multipage option

Example Application
Example with Flickr

Download example code so you can see how to use this component. I also used the as3 Flickr Library for this example.

Simple Application

Simple example

Download simple ImageViewer3D

Everyone can use the simple application. Just put the” imageviewer3d.swf” and the folder “assets” with the xml file on your server (you can’t run it local) . For the Simple ImageViewer3D you have to make sure that the photos.xml is located at the folder “/assets/xml/photos.xml”

Component

Download component

For example you can add xmlns:imageviewer3d="imageviewer3d.*" inside the application tag and add this between the application tags

Feel free to modify this component

If you find bugs our just errors please report it in the comments.

NOTE: This component isn’t working in IE6, Fireworks is expired so I will post a picture of the application later

Page 1 of 11