Posted by: bhuvanvel | March 26, 2010

Iphone Scroller

Hi reader

Here discus about the scrollbar scrolling in iphone style in flex

Lets exaplain

create a Panel and make a text as repater

and another create a canvas add image to it

code:

IPhoneScrolls.mxml

<?xml version=”1.0″ encoding=”utf-8″?>

<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”horizontal” creationComplete=”init()”>

<mx:Script>

<![CDATA[

[Bindable] private var listData:Array = new Array(100);

import com.IPhoneScrollerManager;

import com.KineticKox;

private function init():void

{

IPhoneScrollerManager.addContainer(panel);

IPhoneScrollerManager.addContainer(box);

}

]]>

</mx:Script>

<mx:Panel title=”Example” id=”panel” height=”200” width=”200“>

<mx:Repeater id=”rp” dataProvider=”{listData}>

<mx:Label text=”{rp.currentIndex}” />

</mx:Repeater>

</mx:Panel>

<mx:Canvas width=”324” height=”265” id=”box” verticalScrollPolicy=”off” horizontalScrollPolicy=”off>

<mx:Image source=”http://www.wallcoo.net/1440×900/1440_900_nature_scene_wallpapers_01/images/Free_High_resolution_nature_wallpapers_20.jpg />

</mx:Canvas>

</mx:Application>


Advertisement

Responses

  1. HI,

    I am getting few errors while executing the code. Can you tell me the exact source URL, which you downloaded from ?

  2. Thanks Buvanvel


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Categories

Follow

Get every new post delivered to your Inbox.