background preloader

Mobile Dev

Facebook Twitter

jQuery Knob demo. iPhone Mockup. Flash Platform * Manual bitmap caching. Use the BitmapData class to create custom bitmap caching behavior. The following example reuses a single rasterized bitmap version of a display object and references the same BitmapData object. When scaling each display object, the original BitmapData object in memory is not updated and is not redrawn.

This approach saves CPU resources and makes applications run faster. When scaling the display object, the contained bitmap is stretched. Here is the updated BitmapApple class: The alpha value is still modified on each frame. Import org.bytearray.bitmap.BitmapApple; const MAX_NUM:int = 100; var holder:Sprite = new Sprite(); addChild(holder); var holderVector:Vector. This technique uses only a small amount of memory, because only a single cached bitmap is used in memory and shared by all the BitmapApple instances. For a smooth final bitmap, set the smoothing property to true: Adjusting the Stage quality can also improve performance. Packager for iPhone: Render Performance. Introduction CS5 is one of the most eagerly anticipated releases of Flash Professional in years and the inclusion of the iPhone Packager finally makes it possible for Flash developers to write exciting content for iPhone using the same tools they use day in, day out.

Mobile development requires special design and coding considerations, and the iPhone is no exception. Although the Packager compiles all ActionScript byte code into native iPhone application code, an understanding of the Flash rendering pipeline on iPhone will help you maximize performance. This article will lead you through code examples detailing how to get the best results from your iPhone when performing frame-based animation. Requirements To make the most of this article, you’ll need the following software and files: Prerequisite knowledge Prior experience of Flash and ActionScript 3 is advised. The iPhone Hardware The following list highlights the CPU differences across models: CPU v GPU Rendering Vectors versus Bitmaps.

Object Pool class. Two of the slow operations in the flash player are object creation and garbage collection. If we pool objects – save objects when they’re no longer needed and reuse them later when another object of the same type is required – then object creation is kept to a minimum and garbage collection is reduced to zero. Joa Ebert discussed this in his presentation at Flash on the Beach. I already use specific object pooling in Flint particles, but while Joa was talking I had an idea and wrote a class for generic object pooling of all object types. I finally had time to test the class, and it works as expected, so I’ve added it to my open code repository. The object pool class manages pooling of all objects through two simple methods. You can obtain an object from it like this var obj:SomeClass = ObjectPool.getObject( SomeClass ); If there are any such objects in the pool, one of them will be returned. When you no longer need an object, you can add it to the pool for later reuse like this.

Blog » iPhone 4 icon PSD file. I’ve updated the iPhone / iPad icon PSD I released not too long ago with some fixes and a 114×114 pixel icon template for designing icons for Apple’s hottest new device. Download it here. I cannot be held responsible for inaccuracies, flaws and errors in this this PSD I might have overlooked, but if you notice anything please let me know in the comments.

Again, if you appreciate it, tweet this to help your fellow designers and developers make nicer icons for iPhone 4 (and beyond). Related: iPhone / iPad icon PSD template Update: Get the updated version. Here, Icon Icon! A while ago Buck Wilson, the designer in a small team of Portland-bound guys, contacted me about icon design for Here, File File! Designing Warships Warships, a game designed by me and developed by the Canadian Edovia is now available on the App Store.

Composition As I alluded to earlier today, Sean Patrick O‘Brien and I are working on the very first Mac application that will be released under the Cocoia... Game Physics 101. How To Implement Simple Physics and Gravity in a Flash Game | General Computer Software. Mixing_Games_and_Applications. Flash sample : Interactivity sample: Joystick controlled movement. How to Create a Platform Game in AS3 – Part 1 | Flash Game Tuts. Part 1: Basic Character Programming Well, here we are in our first advanced tutorial. This time we’ll be creating a platform game similar to my GlowSticks except in ActionScript 3 and coded better. Let’s begin, shall we? Let’s first begin with the basic setup of our game. Its dimensions are 25×25 pixels. Next, convert it into a MovieClip and give it an instance name of mcMain. Just create a new “actions” layer and place this code in the first frame: This code will simply make the character move left and right.

//whether or not the main guy is jumpingvar mainJumping:Boolean = false; //how quickly should the jump start offvar jumpSpeedLimit:int = 15; //the current speed of the jump;var jumpSpeed:Number = jumpSpeedLimit; Then, we’ll define a function which will make the guy jump. //jumping functionfunction mainJump():void{ //if main isn't already jumping if(! That’s some pretty intense code, eh? But now, it is time to close up this part of the tutorial. Animating with ActionScript 3. The Timeline in Adobe Flash Professional presents a visual means of creating animation, but it is not the only means by which you can create animations.

Programmatic animations offer more nuanced control. For example, you can create animations based on user interaction that are impossible to do with tweens created in the authoring environment. The next sections describe the most popular and useful ways to use ActionScript to create animations, including animating with frame events, animating with the Tween class, animating with Motion XML, and sequencing animations Even when nothing exists on the timeline, a SWF file will dispatch an Event.ENTER_FRAME event for any display object on the stage, once for every frame that passes. You can use the frame event to create games in ActionScript, even in just a few lines of code. Example To get the source files for this example, download Breakout.zip from the top of this page. Programmatic animation also provides nuanced control of playback. How to use a Document Class in Flash with AS3. We're making some changes at Activetuts+. From now on, our tutorials will be using class-based code, instead of timeline code, wherever possible.

This Quick Tip explains what you'll need to know. Why Use Class Files? I'll admit it - sometimes, coding entirely on the timeline is useful. It's a quick way to test out an effect, and the easiest way to sync actions to specific frames of an animation. But for any project that relies more on code than on animation, there are serious disadvantages. Using class files sets your code free. (Part of the reason we're switching to classes is to make it easier for AS3 developers that don't use Flash itself to follow our tutorials. Step 1: Create a FLA I'm sure you already know how to do this.

Step 2: Create an ActionScript File Click File > New ... This file is where we're going to put the code that powers the FLA itself, but how will Flash know how to find it? Step 3: Link the FLA to the AS File If you're using Flash CS3, it'll look like this: Wrapping Up. Blitting and caching movie clips in Flash. 10 tips for designing mobile websites | These Days Labs. 10 tips for web designers in 2010 - the year of the mobile. 1. Design with a fluid layout, min-width: 320px There are two factors that make this a necessity. First, mobile device screens are so small that you really need to utilise all of the available space. Second, there are a lot of different screen resolutions out there. I have found websites with a minimum width of 320px will look good on most high-end mobile devices like the iPhone, Android and Nokia N97.

Technically, the retina display on the iPhone 4 has a screen resolution of 640 x 960 pixels but don't worry, if you optimise your site for 320 x 480, the iPhone 4 will scale it up by a factor of two so it fits the whole screen. 2. The iPhone 4 display has four times the number of pixels as that of the original iPhone. Designers should create their Photoshop documents with a width of 640 pixels. Here's how to use a CSS media query to insert a high resolution image for iPhone 4: 3. 4. 5. 6. 7. With this: But be careful! 8. 9. 10.

How to Design and Build a Mobile Web Site. Did you know that in the world today there are more than 5.9 billion mobile phone users, and a thousand more are added every minute! About 20% of these mobile phone owners (more than 1.2 billion and growing) have browsed the Internet through their mobile phones. This is the reason why mobile Web browsing is predicted to become the next predominant Internet platform. Many consumer-driven companies have already seen how promising the mobile platform is and have already equipped themselves with a mobile web site. A mobile web site today is not simply a passing fad. This is because there are special procedures involved in designing a mobile Web site. Understanding Mobile Website Users The first step to making a successful mobile website is understanding who will be viewing your site. The key difference between mobile and desktop users is that mobile users browse the internet in "on-the-go" situations, where desktop users are in stationary and predictable environments.

Details ▸ Mobile Web Users. Optimizing a website for mobile devices - Modern Nomads. Mobile browsers are growing rapidly and a lot of webmasters start to wonder how optimize their website for these new users. First there are some general rules of thumb which you do have to take into account for mobile users, then there are some decission to be made how to allow access to mobile users. A point of special consideration, before you start designing your website, is how you would like to allow mobile users to access your page. There are several options, ranging from automatic generation of mobile pages under the same URL's to having dedicated mobile pages to even having special (sub)domains for mobile devices.

The way you want to deal with the pages in your domain greatly impacts the way you design the mobile webpages. Using the same URL for both the mobile and desktop version has huge benefits. Adding a specific subdomain ( mobile is most commonly used, resulting in mobile.yourcompany.tld ) to your site is another way of opening your website for mobile users. Meta-tags. Setting up your Game Development Environment in AS3: Object Oriented. Adobe AIR (for iOS) and Other RIA News. This week in the world of RIAs; we're looking at some examples of Adobe AIR for iOS, discussing Connect Mobile for Android and taking a peek at the awesome 360|Flex developer conference… Adobe AIR (for iOS) is Everywhere Now that AIR 2.6 is in the hands of developers, many examples of AIR for iOS have been appearing from both internal Adobe sources and by members of the community.

Over the past week, there seems to be a particular emphasis on AIR for iOS applications running on iPad with a focus on how performant it appears in contrast to applications produced with the old Packager for iPhone tool. Michael Chaize demonstrates a Twitter application compiled with a future build of AIR for iOS and compares performance and responsiveness to the default iOS Twitter client with remarkable results. Christophe Coenraets demonstrates an application filled with charting components on iPad2, along with iPod Touch and the Android-based Galaxy Tab. Read more on this subject: 360|Flex is Next Month!

Using Air 2.6 with Flash CS5. Hey there all, here is what i am doing so far to use Air 2.6 with Flash CS5. i counts seem to find any help online with this, hope this helps someone... Setting Up Flash CS5 1. replace Program FIles\Adobe\Adobe Flash CS5\Common\Configuration\ActionScript 3.0\AIR2.0\airglobal.swc with the airglobal.swc in the AdobeAIRSDK\frameworks\libs\air folder of the AIR 2.6 SDK zip file (AdobeAIRSDK.zip) This lets you compile with the new SDK and use all the new API for camera roll, microphone, etc. 2. replace Program Files\Adobe\Adobe Flash CS5\AIK2.0 with the AdobeAIRSDK folder in the zip file (AdobeAIRSDK.zip) you downloaded from Adobe. now you can do a test movie in Flash CS5 and it will use the new ADL for testing in Flash (finally works with landscape!).

Publishing for publishing, unfortunately you cant use the built-in publish for iOS. i wrote this batch file and use it (also you can write an ant task if you use FDT/Flash Builder). Adjusting the app.xml File 1. namespace has to change from to from. AIR 2.6 performance on iOS devices. BitmapCaching API – help cache display object on Pure AS3, Flex and AIR projects | Deep Dive Into Flash. Archive » Handle Activation/Deactivation of a Flash-Based App. In this video you’ll learn how to deal with cases in which your app is interrupted by a phone call or is closed all together and then relaunched. Learn how to handle those “deactivations” as well as how to treat your app when it is activated again. Below is the basic ActionScript, or download the source files (Flash CS5) and follow along yourself.

//Main menu button is pressed, a phone call comes in... stage.addEventListener(Event.DEACTIVATE, Deactivate); function Deactivate(event:Event):void { //Stop all event listeners, timers etc. } //When the user comes back to the app... (start over? CacheAsBitmap & cacheAsBitmapMatrix in...