Adobe Air - Starling/Features | Controls and device simulator

80 views Asked by At

I have few questions here, regarding creating app in Adobe Air using Starling and feathers.

I created yet a very simple app, which has Feathers list controller with static data provided to its dataProvider. According to the code it should work fine, but there are three major issues I am facing.

1: Touch/Click Positions

I am using:

list.addEventListener( Event.CHANGE, list_changeHandler );

Now the problem is, clicking coordinates are not correct. Clicking on 3rd Item triggered 4th item, to trigger 3rd, 2nd item needs to be clicked it's half way through etc.

2: Nothing, without Theme

I am using a custom theme, came along with a tutorial. If I don't use the theme, I am unable to see anything on the screen, somehow.

3: Resolution (Device Simulator) Problem

Though buggy, but it works with Theme, but my app doesn't fit with the resolution for each device simulator. Either its, iPad or iPhone 4 or any android simulator.

Also, can anyone please also explains, what is significance and use of Context3D render mode in starling class.

Any help is appreciated:

Thanks in advance Waqar Iqbal

2

There are 2 answers

0
BotMaster On

Starling is a Stage3D framework that displays content directly on graphic card using Context3D. Everything displayed by Starling is always under the regular display list. Feather is a component framework based on Starling.

  1. Stage3D cannot handle any mouse operations so Starling and Feather simulate all their mouse event (those mouse event never really happen anywhere, they are created by calculation of mouse position on the stage)

  2. not sure, never used Feather

  3. Starling does not handle screen density and dpi calculation, if you want your app to fit any screen you'll have to handle it yourself.

0
Arvind On

I think you should see the example carefully. if u want to use any feathers component either you have to use feathers theme or custom theme.

if you use feather theme you need to provide theme path and before using any component you need to initialize that theme.Then use component any where.without theme you will not see any thing.

1: Touch/Click Positions please provide minTouchHeight in class theme of DefaultListItemRenderer like:-

        renderer.minWidth = this.gridSize;
        renderer.minHeight = this.gridSize;
        renderer.minTouchWidth = this.gridSize;
        renderer.minTouchHeight = this.gridSize;

2: Nothing, without Theme, 3: Resolution (Device Simulator) Problem

Follow the example given in feather library feathers-2.1.1\themes\MetalWorksMobileTheme\source\feathers\themes