Tag Archives: Adobe Flash

Screen Sharing for desktop Users with Adobe AIR

I have made a tool in adobe AIR, which can capture your screen on runtime and can send it to other user you’re connected to; mean to say that it is a kind of remote desktop component.

I have used an open source screen capture driver named” ScreenCapturer”. It helps me to capture the users screen. The basic idea behind this is that we are capturing screen data on enter Frame and storing it in byte array and then converting it into bitmap and displaying to user.

Driver provide us the data of user’s screen and we convert it into byte array and then into bitmapData. Some C# background processes are there in screen capture device.

You can found the source code here:

https://github.com/vipul11088/Screen_sharing

Tagged , , , , , ,

Recyclable Scroll list for large set of data in pure ActionScript 3.

Some days ago I was working on a project, in which I have to make a scroll component for device because I have to show a very long list on device. First I used simple touch list, which I had used in my earlier projects for desktop and for devices for short list comparatively. When I checked that component on iPhone 4, it completely stuck for only 500 list renderers. It was like a shock or me because I have to load around 2500 list, and it was sticking in 500.

Then I use flex’s recycle list component, which is perfect for my need, but the another problem for me is that I couldn’t use flex component as my project was a pure ActionScript project.

Then I decided to reform that touch list component with pooling concept, so that I can recycle the renderers and can load it for large list. I used the flex recycle concept and apply it in my touch list component. I used object pooling for recycling, which works on following concept:

The List creates an instance of a class called ObjectPool, which manages used and unused renderers. Whenever the List needs a new renderer, it asks the pool for a new one and when it does not need a renderer, it returns it to the pool. The pool tries to find unused renderers to satisfy the request for a new renderer and if it cannot, will create a new object and return that.

The core part of the logic resides in the onVerticalScroll function. The list always maintains a map of all visible renderers and as the scrollbar scrolls, the map is recalculated and renderers managed if the map is changed.

You can find the source code here:

https://github.com/vipul11088/Recycle_scroll_AS3

Tagged , , , , , , , , , , , , ,