Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
New Contributor
Posts: 9
Registered: ‎01-14-2013
My Device: 9320
My Carrier: Orange PL

Tutorial - First App(Flash Builder & BlackBerry 10)

Hello

This is my tutorial for beginners:

http://youtu.be/enCptW25RRc

 

package
{
   import flash.display.Sprite;
   
   import qnx.fuse.ui.dialog.AlertDialog;
   import qnx.fuse.ui.events.ListEvent;
   import qnx.fuse.ui.listClasses.List;
   import qnx.ui.data.DataProvider;
   
   [SWF(height="1280", width="768", frameRate="60", backgroundColor="#FFFFFF")]
   
   public class MyFirstapp2 extends Sprite
   {
      
   public var list:List = new List();
   public var arr:Array = new Array();
   public var alert:AlertDialog = new AlertDialog();
   
      
      
      public function MyFirstapp2()
      {
         super();
         alert.title = "MyInfo";
         alert.addButton("Exit");
         
         arr.push({label:"Monika88"});
         arr.push({label:"Monika987"});
         arr.push({label:"Monika9898"});
         arr.push({label:"Monika987"});
         arr.push({label:"Monika876"});
         arr.push({label:"Monika78"});
         arr.push({label:"Monika6"});
         arr.push({label:"Monika65"});
         arr.push({label:"Monika887"});
         arr.push({label:"Monika435"});
         arr.push({label:"Monika45"});
         arr.push({label:"Monika12"});
         arr.push({label:"Monika432"});
         arr.push({label:"Monika6540"});
         arr.push({label:"Monika87"});
         arr.push({label:"Monika7"});
         arr.push({label:"Monika9"});
         list.dataProvider = new DataProvider(arr);
         list.setPosition(0,0);
         list.width = 768;
         list.height = 1280;
         this.addChild(list);
         list.addEventListener(ListEvent.ITEM_CLICKED , _alert);
         
      
         
         
      }
      
      public function _alert(event:ListEvent):void{
         
         alert.message = event.data.label;
         alert.show();
      }
      
      
      
      
      
   }
}