Music visualisation with SoundMixer.computeSpectrum();
3 Aug
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:
12 May
Not so long ago I saw a nice menu from (I’m not really sure) a game console on TV. It had a tilted view on 3D planes with information from a games and after selecting a plane the plane rotate toward the camera so you could see more detail from the selected game. I made something like that with flickr pictures. You can navigate by using the arrow keys. For now I limited the search result to 29 pictures to prevent a crash from the browser.
Visit flickr photo viewer (warning CPU heavy)
I had the idea to make it so you can browse infinite through the photos but sadly that is getting to heavy for the CPU. In the future I will try other effects (for example create the tiles only in one direction) to achieve the infinite browsing idea.
16 Apr
I while back I had some spare time and decided to check out Flint and followed the Flinteroids tutorial. It’s cool but I extended it a little with a few extra effects and a High score.
Have fun!
If someone has tip for good game sound effects please don’t hesitate to share
15 Oct
I have a dataset with more than 200 items. If I use that as dataprovider of a datagrid and set the rowcount to 10 the datagrid is not alway resizing to the right size. Sometimes I see 10.5 rows. This is a nice solution for that problem:
dataGrid.height = measureHeightOfItems(-1, dataGrid.rowCount) + dataGrid.headerHeight; |
4 Sep
Here an example of the advancedDataGrid. I’m using a groupingcollection to get all the data from one searchengine in one group
One problem that I encounter in the advancedDataGrid is sorting a column on application start. I try to sort the “number of visits” field and it is working for the known visit data the sort is working but for the calculated total visits of the groups it isn’t working. If someone knows the solution please let me know
17 Aug
I’m going to try to shift the focus of my blog a little bit more to examples and away from the “I have this problem bla bla”. Well I just try to blog more because it a bit quiet here. I’m going to post some things that is useful for myself to archive and maybe I can help someone else with it.
DateTimeAxis
11 Aug
I send a userId to my application to display a linechart with the application.parameter object. I get the userId parameter inside my application and can trace or alert it and I see the userId on my screen. Ok everything is working fine for now. Then I want to use the userId to call php function. And there is where it breaks. Somehow the userId parameter is empty.
example:
private var userId:int = 1234; private function init():void{ this.userId = Application.application.parameters.userId; } |
for this example I set a default value of 1234 and on creationComplete the userId is set with the real userId value, lets say that the userId in parameters is 1. If I trace the userId inside the application after the init() it returns 1. That is normal. But if I now call the remoteObject:
<mx:RemoteObject endpoint="test/test.php" id="phpCall" source="myFunction" destination="amfphp" showBusyCursor="true"> <mx:method name="getUser" fault="onFaultResult(event)" result="onResult(event)"> <mx:arguments><userId>{this.userId}</userId> </mx:method> </mx:RemoteObject> |
With this call the php function receives a userId with 1234. Very strange because we already set that with an other number.
solution for me
I tried a lot of different ways to fix this problem and now I finally found a solution. I set the value of the userId parameter inside a invisible label. And use that label to send the userId back to php.
this.userIdLabel.text =(this.userId).toString(); |
and in the remoteObject:
<mx:RemoteObject endpoint="test/test.php" id="phpCall" source="myFunction" destination="amfphp" showBusyCursor="true"> <mx:method name="getUser" fault="onFaultResult(event)" result="onResult(event)"> <mx:arguments><userId>{int(this.userIdLabel.text)}</userId> </mx:method> </mx:RemoteObject> |
9 Jul
I have an Bindable ArrayCollection with values and DataGrid that should show all the values (or rows) without the ugly scrollbars (I hate scrollbars). This is working correct by setting the rowCount property in DataGrid like this: rowCount = "this.ArrayCollection.length"
the tricky part is when you add items to that ArrayCollection on application run. Somehow the rowCount is only updated once in the 2 times. I Made a example that is making it clear where it goes wrong (and rightclick –> source view gives you the opportunity to see the source):
Recent Comments