a litl sdk for flash and flex
DESCRIPTION
how to get a developer account, and get started with our sdk. includes detail about the events and requests available in our AS3 API.TRANSCRIPT
© 2010, litl LLC. CONFIDENTIAL
A litl sdk for flash and flex
© 2010, litl LLC. CONFIDENTIAL
kathryn rotondo channel developer
flashionista.org
@krotondo
© 2010, litl LLC. CONFIDENTIAL
10 steps to get you started
© 2010, litl LLC. CONFIDENTIAL
1. Get a developer account
http://developer.litl.com
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
2. Download the SDK
http://devcenter.litl.com/developer/download_sdk/
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
Developer bundle contains: • AS3 SDK • source• swc• asdoc
• Simulator
• Control Set • Sample Channels
© 2010, litl LLC. CONFIDENTIAL
Developer bundle contains: • AS3 SDK • source• swc• asdoc
• Simulator
• Control Set • Sample Channels
© 2010, litl LLC. CONFIDENTIAL
3. Install the Simulator
© 2010, litl LLC. CONFIDENTIAL
AIR 2 RC 1 runtime
http://labs.adobe.com/downloads/air2.html
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
4. Create a Project
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
5. Import the SDK
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
6. Instantiate LitlService
© 2010, litl LLC. CONFIDENTIAL
varservice:LitlService=newLitlService(this);
© 2010, litl LLC. CONFIDENTIAL
7. Connect LitlService
© 2010, litl LLC. CONFIDENTIAL
service.connect("litl_countdown","CountdownChannel","0.1",true);
• channelIdString • channelTitle String
• channelVersion String • hasOptions Boolean
© 2010, litl LLC. CONFIDENTIAL
8. Listen for events
© 2010, litl LLC. CONFIDENTIAL
service.addEventListener(InitializeMessage.INITIALIZED,onInit);
privatefunctiononInit(e:InitializeMessage):void{//yourcodehere}
© 2010, litl LLC. CONFIDENTIAL
Initialize
© 2010, litl LLC. CONFIDENTIAL
InitializeMessage.INITIALIZE
• channel calls connect() method
• litlOS transmits initial state (network connectivity, view, properties)
• litlOS transmits initialized event
© 2010, litl LLC. CONFIDENTIAL
View Changes
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
ViewChangeMessage.VIEW_CHANGE
• e.view: CARD, FOCUS or CHANNEL
• e.details: NORMAL, OFFSCREEN, SELECTOR, or SCREENSAVER
• e.width: • e.height: ex. CHANNEL_HEIGHT (800px) or
CHANNEL_HEIGHT_HDMI (720px)
© 2010, litl LLC. CONFIDENTIAL
CARD Move Next
Move Previous
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
UserInputMessage.MOVE_NEXT_ITEMUserInputMessage.MOVE_PREVIOUS_ITEM
• Sent by clickable navigation arrows • Next is also sent on a timer • To enable, set service.channelItemCount > 1
© 2010, litl LLC. CONFIDENTIAL
FOCUS Options
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
OptionsStatusMessage.OPTIONS_STATUS
• Boolean optionsOpenproperty
© 2010, litl LLC. CONFIDENTIAL
CHANNEL Go Button
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
UserInputMessage.GO_BUTTON_HELDUserInputMessage.GO_BUTTON_PRESSEDUserInputMessage.GO_BUTTON_RELEASED
© 2010, litl LLC. CONFIDENTIAL
CHANNEL Wheel
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
UserInputMessage.WHEEL_NEXT_ITEMUserInputMessage.WHEEL_PREVIOUS_ITEM
© 2010, litl LLC. CONFIDENTIAL
ALL VIEWS Network Status
© 2010, litl LLC. CONFIDENTIAL
NetworkStatusMessage.NETWORK_STATUS
• Booleanconnectedproperty
© 2010, litl LLC. CONFIDENTIAL
ALL VIEWS Property Changes
© 2010, litl LLC. CONFIDENTIAL
PropertyMessage.PROPERTY_CHANGED
• propertyScopeproperty: GLOBAL, ACCOUNT, SHARED, DEVICE
• Parameters array of NameValuePair objects
© 2010, litl LLC. CONFIDENTIAL
9. Make requests
© 2010, litl LLC. CONFIDENTIAL
Set Title service.channelItemCount=3;
© 2010, litl LLC. CONFIDENTIAL
Set Favicon service.channelIcon=“foo.jpg”;
© 2010, litl LLC. CONFIDENTIAL
Enable Move Events service.channelItemCount=3;
© 2010, litl LLC. CONFIDENTIAL
Close Options service.closeOptions();
© 2010, litl LLC. CONFIDENTIAL
Enable/Disable Wheel
service.enableWheel();service.disableWheel();
© 2010, litl LLC. CONFIDENTIAL
Enable/Disable Screensaver
service.screensaverEnabled=true;
© 2010, litl LLC. CONFIDENTIAL
Open URL in web browser
service.openURL(url:String);
© 2010, litl LLC. CONFIDENTIAL
Set Properties service.sharedProperties.prop=val;service.accountProperties.prop=val;service.deviceProperties.prop=val;
© 2010, litl LLC. CONFIDENTIAL
10. Test in Simulator
© 2010, litl LLC. CONFIDENTIAL
With simulator running:
• Test Movie (Flash) • Run/Debug (Flash Builder)
• Drag swf into browser • Double-click on swf
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
instance list
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
instance info
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
controls
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
log
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
RequestCompleted RequestError
© 2010, litl LLC. CONFIDENTIAL
global properties
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
catalog info
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
11. controls
© 2010, litl LLC. CONFIDENTIAL
Buttons & List
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
Video Player & Filmstrip
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
Modal menu
© 2010, litl LLC. CONFIDENTIAL
© 2010, litl LLC. CONFIDENTIAL
Appendix A: Documentation
© 2010, litl LLC. CONFIDENTIAL
Building Channels in
Flash Professional http://developer.litl.com/documentation/
10stepchannelinflashprofessional.htm
© 2010, litl LLC. CONFIDENTIAL
Building Channels in
Flash Builder http://developer.litl.com/documentation/
10stepchannelinflashbuilder.htm
© 2010, litl LLC. CONFIDENTIAL
Simulator Testing
http://developer.litl.com/documentation/simulator.htm
© 2010, litl LLC. CONFIDENTIAL
USB Stick Testing http://developer.litl.com/
documentation/usb-testing.htm
© 2010, litl LLC. CONFIDENTIAL
Meet our controls developer.litl.com/
documentation/meetourcontrols.htm
© 2010, litl LLC. CONFIDENTIAL
Appendix B: Resources
© 2010, litl LLC. CONFIDENTIAL
Developer Forum devcenter.litl.com/
forum
© 2010, litl LLC. CONFIDENTIAL
Developer Blog devblog.litl.com
© 2010, litl LLC. CONFIDENTIAL
Email [email protected]
© 2010, litl LLC. CONFIDENTIAL
Questions?