ActionScript 3.0 :: Optimize Flash Sprite Animations For Mobile?

Jan 19, 2011

My name is Ross Przybylski. I am a fellow Adobe Flash developer veteran, and, like many of you, I am determined to find a way to achieve optimal performance for Flash games being ported to mobile devices.

I have 2 goals for this post:

1) Define the particular type of game I am trying to make cross-platform in hopes that fellow developers can offer ideas for the best approach

2) Share the various optimization techniques I have discovered and explored thus far in hopes that they will help other developers find the resources they need to port their own Flash games to mobile platforms

How to Optimize a Flash Turn-Based Strategy Game for Mobile Devices

I have created a multiplayer, turn-based tactical strategy game in Flash called Hero Mages (url...) and my goal is to port this game to Android, iPad, and iPhone using my existing AS3 code.

The game characters are represented in a two-dimensional, top-down perspective grid as animated unit models. For the PC/web-based version of the game, unit animations are accomplished via timeline based vector animations stored within movie clips. There are currently 21 unique models, 15 different animations per model, and between 300-450 unique frames per model. As a turn-based game, typically only one model will move/animate at a time, though two or more models may also engage in combat (attack/block/take damage from spells, etc.) in which case several animations may take place at the same time.[code]...

View 14 Replies


Similar Posts:


Flex :: View State Transitions Optimize For Mobile?

Jul 26, 2011

I have decided to go the route of using ViewNavigator and having one view with 3 states. Each state is a "page". It runs just fine on the desktop but when compiled for mobile, the transitions between the pages is really laggy, even for the Samsung Galaxy S. The phone has the 2.7 runtime and I recompiled my application with ADT 2.7, still no performance increase.

I have also tried cacheAsBitmapMatrix on all 3 pages, which are all contained in a VBox and that hasn't shown any significant performance bumps. All I'm changing is the y component of the VBox for each transition.

EDIT: I have done some more research and I am now to the point where I have hardware acceleration turned on and cacheAsBitmap = true and cacheAsBitmapMatrix = new Matrix(). I am also using Stats.as to see the FPS. I notice on my state changes I go from 25 FPS to 2 and then it goes back up again.

View 1 Replies

Flash :: Sprite Sheets Vs Animations?

Jul 25, 2011

I'm developing a flash game and I hired a graphic designer to make it look more professional. The problem is that I don't know if I should use timelime animations or sprite sheets.Here is an example of his graphics:[url]...

How should I proceed for better performance? Also, if I just split the sprite sheets in many images, put them on an array and keep using add/removeChild() on them will it work properly when talking about performance?

View 1 Replies

ActionScript 1/2 :: Multiple Animations For A Single MovieClip Sprite

Jun 23, 2010

how to animate a simple sprite for the 100th time, I hope I might found I more specific, and better explained answer to my problem. I'm trying to make a flash game, of course, and I want my main Player sprite to be able to play multiple animations based on specific input. So, a running right animation, a running left animation, a jump animation, and an attack animation.

[Code]...

View 1 Replies

Flash :: "append" Html Text To Text Area In Flex And Flex Mobile Project To Display Sprite And Text Formatting?

Jun 7, 2011

I'm playing around with a messaging type of application. Does anyone know how, or of any tutorials on to "appending" html text to text areas in flex and flex mobile projects? And specifically how I could take that and basically "append" a sprite inline to the text when i need to? Something simple like:Username: some text right here!So, Anyone have any experience "appending" sprites or simple text formatting?how to solve these issues!EDIT:Based on an answer below it was sugguested that it's as simple as...textAreaInstance.htmlText += "<b>Username:</b> some text right here!";But its not. you can't do .htmltext with a text area. you can on a text field, so i tried

var TF:TextField = new TextField();
TF.width = 200;
TF.height = 200;

[code].....

View 3 Replies

Flash: `sprite.visible = False` Doesn't Hide Sprite Immediately?

Apr 4, 2011

I've got a sprite which I want to temporarily hide... But changing the .visible property doesn't do what I expect. The code looks roughly like this:

[Code]...

View 1 Replies

Flash :: Rotating Sprite Moves The Sprite From It's Original Location

Jul 6, 2011

I'm doing a simple rotation on a sprite but there's a weird behavior where the sprite does not rotate around it's top left. I think I'm rotating along the top left of the test class instead of the sprite child. I would like to rotate the rectangle around it's top left corner (kinda like a clock hand). The code is pretty short so I'll let the code + pictures explain my problem:

package
{
import flash.display.Sprite;

[Code]....

I've read a lot of stuff about rotating around a fixed point, I've tried doing it with movieclips instead of sprites, I even copy pasted a tutorial on rotation and nothing works.

View 3 Replies

Optimize An Image Before Importing It Into Flash?

Oct 14, 2010

Is it better to optimize an image before importing it into Flash, or letting Flash optimize it during the export?

View 2 Replies

Optimize Flash For Search Engine?

Sep 15, 2010

Is there is a way to optimize flash for search engines??

View 4 Replies

How To Optimize Frame Rate In Flash

Jun 7, 2010

I'm building an application in Actionscript using Flash assets, and my frame rate becomes very low (~7 fps) when I attempt to render 20+ assets on the screen, even though most of those assets are stopped movie clips. I've tried setting .cacheAsBitmap to true, which helps a bit, but not enough. What else can I do to get the frame rate up? I've noticed that some movie clips seem to impact it more than others, but I'm not sure how to alter them to make them easier to render.

View 2 Replies

Flash :: Optimize The Import Of Swfs In The Preloader?

Jan 31, 2010

I work on a big Flash project as the web backend guy that delivers all the files and assets to the main application SWF. Our last, really big packet of data are all the assets and sounds contained in swf files that are imported during the preloader.Are there any ways to optimize this process in any way? I'm really looking for ideas in any direction, no matter if its in the swf, the process of loading and so on. Also I look for solutions for the first time load (empty cache) and for consequent loads (prefilled cache).

View 1 Replies

ActionScript 3 :: How To Optimize Illustrator Artwork In Flash

Apr 29, 2010

I'm working on a flash project that incorporates a lot of artwork done in Illustrator CS4. I've been copy-pasting directly from Illustrator into Flash, and I add some animations as well. Final file is going to be a one single swf file which will be a part of UI for an application and .net will be the core for this. But now flash becomes unusable slow to respond for actions. My machine is a fast i7 with 6gb of RAM, so I don't think that's the issue. We are going to use this file with dual core atom processors. Does anyone have ideas for alternative importing techniques, optimizations within illustrator, anything at all that will make this more manageable?

View 1 Replies

ActionScript 3.0 :: Optimize / Compress Flash Project?

Nov 18, 2010

I`ll be dealing with this few hours now, so I manage to optimize compiled swf file for only 5kb, and I need to achieve 15.

So, what are the options to prevent unnecessary file size?

View 4 Replies

ActionScript 3.0 :: How To Optimize Flash File To Load Fast

Jul 30, 2010

On the home page of my website I have a Flash banner near the top, with a slideshow of my work. The problem is that the Flash file is 300k and takes a while to load on slower Internet connections, and I was wondering if anyone had any tips for me to optimise it. [URL].

View 1 Replies

Data Integration :: Will Flash Optimize Image Sizes

Jul 15, 2008

I have a question about the optimization of pictures placedin a Flash stage.If I put a big sized pictures (for example: 1024 x 1024) andif, in the final result, the picture is downscaled on the Flashstage (for example : 200x200 pixels), once the swf is created ,will the picture be as heavy as before it was downscaled, when theflash web site will be loaded in browse

View 2 Replies

Flash :: Optimize Loading Of Hd .flv Video With Large Size

Apr 2, 2011

There is a simple html page with intro video (.mp4 file). Video frame size is 1280*1024 (I need video to be as large as page up to 1280 px).

With such quality settings video file size is:

.mp4 = 42 mb (HD 1690*1080)
.flv = 32 mb (1280*1024, 25 fps)

For video playing I used as3 sample script (because there must be only playpause, replay, mute buttons with custom styles), like that

var strSource:String = "video.flv";
// create a new net connection, add event listener and connect
// to null because we don't have a media server

[Code]....

The problem is that I can't find a way to play it smoothly. It's loading in very annoying way, video is interrupted after each few seconds of playing.

I understand that the main problem is large video file size and hd quality, but may be there is some way to largely decrease .flv size or handle playback in more friendly way?

View 2 Replies

Actionscript 3 :: Optimize Random Seeking Of Embedded Video In Flash?

Apr 8, 2011

I have an Embedded (synchronized with timeline) clip in a flash movie.I am controlling the currentFrame of the clip by dragging a slider left to right (to simulate rotating an object).The problem is when I go forwards, motion is smooth, but if I drag to the left Flash cannot seem to efficiently play back in reverse and the motion is extremely jerky.Obviously I'm skipping frames depending upon the position of the mouse, but there is a very noticable lag when currentFrame is decreased vs. increased. Is there a way to optimize an embedded timeline clip for reverse random seeking like this?Possible solutions (untested) :Use video instead of embedded - I would expect this to make the situation worse though!Create a second reversed video for when scrolling to the left. This would probably double the file size.

View 2 Replies

Iphone :: Access Mobile Device Camera From A Grails Application Using Jquery Mobile

Feb 23, 2012

I have a grails application using jquery mobile. I am hoping to find some way to access the camera on the devices. I thought about using flash to grab the webcam but that obviously wont work on Apple devices. Does anyone know of a way to do it and keep it all browser based? I am hoping that there is a plugin somewhere or maybe html5 has some magic in there that supports it.

View 1 Replies

Flex :: Mobile Gesture Event : Slide Between 2 Views Like Google+ Mobile?

Mar 23, 2012

I would like to move (right or left according the current view) between 2 views when I move my finger on the mobile screen; for example with Google+ mobile application, in profil section, you can change the view just on move your finger on the screen, and the offset and the moving speed must be checked before change complete view.

View 2 Replies

Actionscript 3 :: Optimize Modular Flash Apps (load Time & Flexibility)?

Jan 26, 2010

I'm working on a large application that is broken up into many independent swfs. There is a master swf that loads a navigation shell and the foundational logic, and a module loading system that loads child swfs into the main display area. This is all working smoothly, and now I'm onto building the modules, and I'm starting to feel like my methods aren't as efficient as they should be.The module swfs (and corresponding flas) are located in a "modules" subdirectory of the main project's src folder. These modules share a large number of classes. In fact, most them define no new classes that are specific to just that module.The shared classes have a complicated structure of inheritance and interface usage, and are located in a view/structure subdirectory of the main src folder.

Currently, in order to use the shared classes from view/structure in my module swfs, I add the main project's src folder to the source path in each of the module flas. Besides being a bit tedious to do every time, it 1.) Redundantly compiles the shared classes into each module increasing file sizes across the board, 2.) Requires addition of new source paths to the modules for every developer who wants to work on/test the application because they are absolute values and different on every os's file system, and 3.) Doesn't allow modules to be built independently without access to the main project src folder.

View 1 Replies

ActionScript 3.0 :: Optimize Flash For Loading External Assets (videos/pictures)?

May 17, 2010

I'm loading a lot of external videos and pictures and I'm wondering what is the best way for handling the loaded videos and images. Should I unload them after they have finished playing and reload them whenever they are needed, or it's not required since they just use the clients memory and not the cpu cycles when inactive?

View 2 Replies

ActionScript 3.0 :: Optimize Coding - Clients Can't Change The Values In Flash Client Program

Jul 24, 2011

Im creating MMO with flash but making it small at first.... I need to know the best way to code the characters.... I was thinking keeping all the data such as coordinates, inventory and cash all in MYSQL so the clients cant change the values in my flash client program. I was thinking of calling quires every few seconds which would eventually becomes thousands... what do you think is the best way about it?

BTW: Flash = Client Side
PHP = Server
MYSQL = DATA

View 1 Replies

Flex :: Mobile Supports Native Mobile Features?

Jun 27, 2011

Does flex mobile supports In-App purchases, push notification etc that can run on all supported mobile platforms (iOS, Android, Blackberry playbook).

View 2 Replies

Calling Certain Animations In Other Animations

Apr 8, 2009

anywhoo i have minimal actionscript training tho i know a bit... im trying to make an Item system were i make an object like a key or a helmet... and if i collide with it it disapears. and i get the item, then somewhere put _root.playerMC.standing.gotoAndPlay ("item"); .. maybe in the item i dunno..

so basically i set my characters up like playerMC then in that animation i have a body head arms and legs.. and in those i have different items equipped on each body part on each frame how should i set this up!!!.. i cant call those items deep in the animation the farthest i can go is like Playermc.gotoandplay ("walk") when i try to do like.. playermc.walking.head.gotoandplay ("item") it doesnt work..

View 3 Replies

Actionscript 3 :: Class Extending Sprite - Set The Sprite's Width And Height Properties?

Mar 5, 2010

I created a class, extended the sprite class, and now in the constructor I am trying to set the Sprite's width and height properties which are inherited from the DisplayObject. However, after I set this.width and this.height, and print the values, I get 0 for both.

What the heck is going on? When I view the livedocs I see that DisplayObject has width and height listed as public properties. I have been able to instantiate a Sprite directly, and set the width and height after it's been instantiated, so I don't get it.

package {
import flash.display.*;
public class ScrollBar extends Sprite {[code].....

View 1 Replies

IDE :: Adding A Single Sprite On Main Moviclip Sprite Remains Invisible

Mar 2, 2009

I created a new AS3 document (550px by 400px) and added the following code to the first frame.

However, when I run this, I see nothing painted on the screen at all, the screen remains completely white.[code]...

View 3 Replies

ActionScript 3.0 :: Sprite.addChild(NumericStepper) Resizes Sprite To 100x100

May 27, 2008

[Code]...

Then the numericStepper is drawn as if it is squished to 20% its normal height. If I pre-set mySprite width and height before adding the numericstepper, the trace output is 0,0 after adding it and it is not displayed at all. Is there some way I can make the sprite only adjust to correctly fit the numericStepper OR resize it afterwards without distorting the numericStepper component?

View 2 Replies

Starting Off With Flash Animations?

Sep 11, 2009

I just started to make flash animations using Adobe Flash CS4, but there's something I just don't understand. To create an animated object, I know I have to create a new movie clip symbol, animate it, and then put it in the main scene. But when I drag the symbol from the library to the main scene, only the first frame of the animation is copied! How can I copy the entire animation of a movie clip symbol to the main scene?

View 5 Replies

Professional :: Flash Animations Don't Appear

Mar 28, 2011

I have uploaded my Dreamweaver CS5 web site and the flash/swf files don't appear.What files are suppost to be with exported swf files when uploaded so they appear on the web on my web site

View 3 Replies

Creating Flash Animations With C#

Jul 27, 2009

i am totally new to flash and want to ask Is it possible to create complete flash animations in .net platoform with C# by using the flash APIs. Can anyone explain how it is done(which apis tools needed) and provide/link to some of the examples.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved