Starling components in flash feathers Learning notes

Source: Internet
Author: User


Recently in learning Starling, and then feel that it is impossible to write their own components, heard that there are now supporting starling of the feathers components, to take a look at

This seems to be a new, no learning materials, are in English. Some of the notes are as follows:

There are three classes and one interface under the 1.popups package to implement the pop-up layer


2.CalloutPopUpContentManager is relatively simple, the open method directly using Callout.show (content, source) to pop


The 3.Callout control feature is similar to tip. It can pop up a tip with an arrow pointing to the specified displayobject, and you can set its direction. It seems to automatically adjust the position in the range that the stage can display. The Callout.show method is actually called Popupmanager.addpopup () to pop the hint.


4.PopUpManager is under the Feathers.core package. This bag is actually the interface and management class of the specific control


The 5.popupmanager.addpopup method does not need to set the popup display object's parent, as it is directly stage.addchild to the top level


6.VerticalCenteredPopUpContentManager for center eject, its open (Content:displayobject, source:displayobject): Source in the void method is not being used. That means the parent of the pop-up layer is directly stage.


The <aspectRatio>landscape</aspectRatio> in 7.app.xml is to let the application landscape


8.DropDownPopUpContentManager is to eject a layer above or below the specified displayobject. It depends on the y-coordinate of the displayobject to determine whether it is up or down. Similar to the callout. But it's not without arrows.


9.PickerList is equivalent to pulling the selection control. It contains a button and a list, click on the button, popup popup list lets you choose. As for which Popup method, it is set by the current theme.


The LabelField of 10.9.PickerList is used to set the text value of the button with which key of the Dataprovider item


11.9.pickerlist.listproperties. @itemRendererProperties. LabelField = "text"; the text value used to set item in the list is Dataprovider Which key of item


12. Custom list Itemrender to create a new class, inherit from Defaultlistitemrenderer and then This._list.itemrenderertype = Testitemrender;


13. It is necessary to initialize a new topic in main (Game), which will set the list's defaultlistitemrenderer in the theme.


14.featherscontrol.validate will trigger redraw draw


_btn.upskin =new Image (uptexture); normal state

_btn.hoverskin = new Image (downtexture);

_btn.downskin = new Image (uptexture), mouse down

Starling Components Feathers Learning Notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.