blog
2009 November ArchiveJozef Chúťka's blog
November 5, 2009
Quick tip: Array vs. Vector
Take a closer look at the ActionScript 3 memory consumption, when stored huge amount of values in Vector and Array. First list of uints:
(10000000 / 32) uints in a Vector (10000000 bits) = ~7k
(10000000 / 32) uints in an Array (10000000 bits) = ~1228k
… and list of Booleans:
10000000 Booleans in a Vector = ~8k
10000000 Booleans in an Array = ~39070k
Read more about AVM2 Memory Considerations.
November 4, 2009
Quick tip: Flex Builder already appears to be running.
Flex Builder already appears to be running. Running two copies of Flex Builder at the same time is not recommended. Are you sure you want to continue? [ Ok ]
… and you do not see one? In windows, open task manager, find javaw.exe and end task.
November 4, 2009
Quick tip: [tincan]
While using flex app profiling / performance profile, I found out that a lot of cumulative time (>70%) was spent on [tincan] method. After some googling it revealed it is time processing RTMP messages. It includes FMS video/audio traffic, rtmp data services, and remote shared object synchronization.
Tincan used to be the code name of Flash Communication Server 1.0, now known as Flash Media Server.
There are also some more methods logged: [pre-render], [mouseEvent], [enterFrameEvent], [mark], [abc-decode], [verify], [render], [reap], [io], [all-complete], [avm1], [builtins], [execute-queued], [generate], [newclass], [openEvent], [sweep] … unknown for me for now.
November 4, 2009
Facebook app: “Je v tobě kus rockera?”
Few days back, a new facebook application was released called Je v tobě kus rockera? (Is there a rocker in you?). I participated on this one by programming flex part. Enjoy
November 3, 2009
Augmented Reality Away 3D FLARManager FLARToolKit Papervision 3D pixel bender video tutorial
Quick tip: Augmented Reality – where to start
I am looking forward to work with augumented reality in next project. This technology seems to be fun, but for now I did not worked with it. So my first steps were to see some tutorials and examples and I want to share interesting stuff I came across. This video tutorial from Lee Brimelow gives you great preview of some examples and basics. Then your next step is to get FLARManager (wrapper for basic FLARToolKit) and one of the 3d engines away3d or papervision3d (would be a good choice).
More tutorials:
More examples:
http://www.boffswana.com/news/?p=392
http://ge.ecomagination.com/smartgrid/#/augmented_reality
http://www.livingsasquatch.com/
http://www.trick7.com/blog/2008/05/17-005233.php
http://saqoosha.net/2008/08/31/1221/
http://flash.tarotaro.org/blog/
November 3, 2009
AFCS CoCoMo LCCS RTMFP stratus
LiveCycle Collaboration Service … first impressions
Adobe Flash Collaboration Service (formerly CoCoMo) is now Adobe LiveCycle Collaboration Service (LCCS). It is hosted on adobe servers, comes with pricing model so it pretty much reminds me kind of socketing cloud . LCCS has 3 different dimensions that will be metered on a pay-per-use basis: live stream bandwidth ($0.49 per GB), push messages ($0.10 per 1000 messages) – count messages sent in to LCCS and user minutes ($0.01 per Hour) – time clients spend connected to LCCS. P2P bandwidth is excluded. So when available, you pay nothing! There is also $15 per month free quota for evaluation / trial and also for paying customers.
Few days back I tought there were some connecting issues with stratus (my mistake, actually, it works), but I decided to switch onBoard app backend to use LCCS, in order to try new service pricing. OnBoard only uses custom message broadcasting so it is pretty easy to switch to a different communicating abstraction. So i did some coding and soon app changes were live. After two days I checked account stats:
November 2, 2009
BasicRenderEngine Camera3D Cube MaterialsList Papervision 3D Scene3D Viewport3D WireframeMaterial
Simple working Flex papervision 3d example
Today I started to play with papervision3d after a long time again. If you are looking for a simple scene example try this one:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
applicationComplete="init()">
<mx:Script>
<![CDATA[
import org.papervision3d.materials.utils.MaterialsList;
import org.papervision3d.objects.primitives.Cube;
import org.papervision3d.materials.WireframeMaterial;
import org.papervision3d.render.BasicRenderEngine;
import org.papervision3d.cameras.Camera3D;
import org.papervision3d.scenes.Scene3D;
import org.papervision3d.view.Viewport3D;
private var viewport:Viewport3D;
private var scene:Scene3D;
private var camera:Camera3D;
private var renderer:BasicRenderEngine;
private var cube:Cube;
private function init():void
{
viewport = new Viewport3D(pv3dCanvas.width, pv3dCanvas.height, false, true);
pv3dCanvas.rawChildren.addChild(viewport);
viewport.buttonMode = true;
renderer = new BasicRenderEngine();
scene = new Scene3D();
camera = new Camera3D();
camera.zoom = 10;
var material:WireframeMaterial = new WireframeMaterial(0x000000, 1, 1);
material.oneSide = false;
material.smooth = true;
var materials:MaterialsList = new MaterialsList();
materials.addMaterial(material, "front");
materials.addMaterial(material, "back");
materials.addMaterial(material, "right");
materials.addMaterial(material, "left");
materials.addMaterial(material, "top");
materials.addMaterial(material, "bottom");
cube = new Cube(materials, 600, 600, 600, 1, 1, 1, Cube.ALL, Cube.TOP);
cube.x = 0;
cube.y = 0;
cube.z = 0;
scene.addChild(cube);
addEventListener(Event.ENTER_FRAME, loop);
}
private function loop(event:Event):void
{
cube.rotationX++;
renderer.renderScene(scene, camera, viewport);
}
]]>
</mx:Script>
<mx:Canvas id="pv3dCanvas" width="100%" height="100%" />
</mx:Application>Do not forget to add Papervision3D.swc into your project.