2. Outlines
• What is imFlash SDK
• Basic knowledge about imFlash4.0
• Important classes
• Examples : Lily and her Australia trip
3. What is imFlash SDK
• imFlash SDK helps developers to design
applications on imTop, which is the multi-
resolution interactive display system from
ivlab.
• Enhances the rendering performance by utilizing
GPU
• Allow designers to design animation easier
4. Basic knowledge about imFlash4.0
• Base on Flex, AIR and Away3D SDK
• Use Flash Builder IDE
• Run on Adobe AIR runtimes
10. Ex1:ApoTag and Horizontal Display
• Add Tai.png Aus.png Airplane.png to vertical display
var Tai:iVerticalBitmap = new
iVerticalBitmap("assets/image/taiwan.png",200,300);
var Aus:iVerticalBitmap = new
iVerticalBitmap("assets/image/Aus.png",400,400);
AirPlane = new
iVerticalBitmap("assets/image/247228-air-australia.png",200,100);
scene.addObjectVertical(Tai,30,30);
scene.addObjectVertical(Aus,700,200);
scene.addObjectVertical(AirPlane,0,0);
11. • Listen to Tag event
private function onTag(e:iEvent):void {
var te:TagEvent = TagEvent(e._data);
var rad:Number = te.angle;
switch(te.state){
case Tags.BIRTH:
AirPlane.visible = true;
AirPlane.x = te.xpos * 1280;
AirPlane.y = te.ypos * 720;
AirPlane._rotate(rad);
break;
case Tags.MOVE:
AirPlane.x = te.xpos * 1280;
AirPlane.y = te.ypos * 720;
AirPlane._rotate(rad-AirPlane.rotation / 360 * (2 * Math.PI));
break;
case Tags.DEATH:
AirPlane.visible = false;
}
}
12. Ex2:Seeing Koala
• Add Koala.jpg to horizontal display
var image:iHorizontalBitmap = new
iHorizontalBitmap("../assets/image/koala.jpg",1280,720);
scene.addObjectHorizontal(image,0,0);
image.addEventListener(iEvent.DRAG_EVENT, onDragHandler);
image.addEventListener(iEvent.ZOOM_EVENT, onZoomHandler);
image.addEventListener(iEvent.ROTATE_EVENT,onRotateHandler);
13. Ex2:Seeing Koala
• Listen to drag, zoom and rotate events
private function onDragHandler(e:iEvent):void{
iHorizontalBitmap(e.currentTarget)._translate(Location(e._d
ata));
}
private function onZoomHandler(e:iEvent):void{
var ze:ZoomEvent = ZoomEvent(e._data);
iHorizontalBitmap(e.currentTarget)._scale(ze.getScale());
}
private function onRotateHandler(e:iEvent):void{
iHorizontalBitmap(e.currentTarget)._rotate(Number(e._data));
}