ActionScript 2.0 :: Sprite/animation Handling In Upgrade Game
Mar 29, 2012
Can't figure the best/conventional way to manage the sprites/animation. Players are supposed to upgrade their weapons and armors, and its to reflect on their character appearance. Instead of drawing each armor to pair with each weapon. What are the best way to go? I've tried nesting weapons(sub-movieclip) inside each set of armors(main movieclip). But then I have trouble playing the clip using gotoAndStop().
View 1 Replies
Similar Posts:
Jan 24, 2011
I'm making a little game in which you guess what pictures are of... I'll be storing the answers in a database..
I'm wondering if I'll need to rely 100% on the user to correctly spell the answer? For instance, if the answer was E.T could I accept ET, E T and E.T.?
View 6 Replies
Jul 18, 2010
Below is simplified version of a game I am creating. Basically, the game have some circles. Each circle shoot bullets that is dispatched with timerEvent. When the circle is clicked it is removed from the stage. However, the bullet still keeps on dispatching. I couldn't figure out how to stop timerEvent of each individual circle when it is clicked.
var _timer:Timer = new Timer(1000);
var speed:int = 20;
for(var i:int=0; i<= 3; i++) {
var _shape:MovieClip = new MovieClip();
_shape.graphics.beginFill(0x999999);
[Code] .....
View 1 Replies
Oct 3, 2010
q1)when would I use a sprite in a game? eg private var sp:Sprite=new Sprite();
Currently I load bitmaps and bitmapdata fro frames.
q2)My player class extends Sprite but does Sprite class speed things up or it is better to use when I have many images?
q3)If I use a Sprite how t=do I get the Bitmap out of it to use with bitmap collisions test?
View 3 Replies
Aug 23, 2009
I don't know, whenever I try to make a sprite animation and I click on Trace Bitmap, it shows a loading bar, I wait and wait, and when about more then half is done loading, and a little is left, the screen freezes, and I cant even click cancel to stop the loading bar.
View 6 Replies
Mar 18, 2012
What I'm about to ask might be completely nonsense/basic or something else. Because my AS knowledge is too little. Hope I can explain correctly. I am tring to create a sliding banner animation dynamically. The reason that I create dynamic is that I want to load banner images and headlines from XML file.
[Code]...
View 4 Replies
Mar 18, 2012
What I'm about to ask might be completely nonsense/basic or something else. Because my AS knowledge is too little. Hope I can explain correctly
I am tring to create a sliding banner animation dynamically. The reason that I create dynamic is that I want to load banner images and headlines from XML file.
So I found a sample project with .as and .xml file. It does what I want but it has no animation. You can see the demo here: [URL] As you can see, there's a transparent info panel below. Here's the code how it is being created:
private var infoPanel:Sprite = new Sprite();
private var titleField:TextField = new TextField();
private var description:TextField = new TextField();
[Code].....
View 2 Replies
Jan 3, 2010
The app I want to build is an interactive map for a site I'm designing. In a nut shell, students looking to enter an exchange program should be able to use the map-image (as in, an actual 'map of the world') to preview possible destinations (I've attached an image of the two basic states to clarify).
After an introductory animation, I want a mouse-over to trigger a function that populates the map-image with a series of buttons. I need the buttons to be distributed according to information in an XML file (ie. x/y coords, some information text, and an animation to load upon being clicked). I want each button to call a mouse-over function that loads info data from an XML field and place it in a dynamic text field at the top. Then, I want each button, when clicked, to call a function that animates replacing the map-image with an image of the corresponding travel destination. Finally, I want a button on each image that will clear that image from the stage and call the function that populates the map so the process can start again.
I'm working out of a couple of books on AS3, but I'm a little hazy on how I ought to be constructing this thing. So here's the first place I've run aground: After the intro animation, I want the user to mouse-over the stage and have a second animation play (clearing away the introductory text), and I want the conclusion of the clearing animation to immediately call the map-populate function; but I don't want a mouse-over to have any effect until the introductory animation is finished. Is there an event dispatched automatically at the end of an animation? What is the event listener class?
I'm not sure if I should be storing each of these animations in an independent .fla file or if I should create them on all one timeline and have the program redirect to specific frames.
View 1 Replies
May 31, 2011
/*the point of this is to add a keyboardEvent to animate the image*/I am loading a bitmap image using this function:
var myLoader : Loader = new Loader();
var myURLRequest : URLRequest = new URLRequest("thesus.png");myLoader.load(myURLRequest);
function myOnComplete(event : Event) : Bitmap{ var loader : Loader =
[code].....
View 4 Replies
Sep 2, 2009
I'm trying to generate an animation containing all the frames from a sprite sheet. Then also append them again but flipped vertically. I have an animation class to create the animation, the stuff I wrote just gets the image from the sprite sheet and sends it to this class. But "frame.scaleX = -frame.scaleX;" isn't changing anything, neither is "frame.scaleX = -1;". It's just leaving the bitmap the same..
here's my code:
Code:
for(var i:uint = 0;i < 20;i++)
{
var frame:Bitmap = getFrame(i);
[code]....
View 1 Replies
Apr 27, 2009
We're trying to find the most optimal memory solution to doing Player Color in a flash game for sprite animation. We're using CS3 Action Script 3.0. Basically we're using sprite animation but currently for every player we create a duplicate set of animations with just different color. This is very expensive. Vector graphics tend to slow down performance too much for our games so we need to use bitmaps and would like to stick to that. So for a bitmap the alpha channel really only needs 2 values 0 for transparent 1 for draw the pixel. Is there any way I can use the other 254 values for a player color algorithm. The best we've come up with is to do 1 set of animations & 1 set of color mask animtions. So in total we would have 2 full set of animations for 2-x players. The Color mask seems to need to be 32 bits. So what I have is 2 questions.
1) Is there a way we can make 1 set of bitmap animations but use the 254 other values in the alpha channed to do player color?2) Is ther a way to use a Mask set of animations but only use 8 bit not 32 bit?
View 7 Replies
Mar 18, 2010
I was trying to code a rollover rollout dropdown menu in code. I made a movieclip in the library which imports a rectangle sprite. The rectangle sprite moves down on frame2 and back up on frame3. When I called the frame from document level it gives me following error:
[Code]...
View 5 Replies
Jan 10, 2011
I am following this page to create a custom preloader extending Sprite to load an animation SWF, but it is not working (the animation SWF is not displaying): [URL]. I know the Animation.swf file is okay, because if I load it into the main app it displays and runs. The preloader works if an image is loaded by the preloader instead of the animation SWF.
test.mxml (main app)
BTW, I typically have many more lines of ComboBox in the app to force the preloader to display, but limiting number of lines here.
CustomPreloaders.SparkAnimationProgressBar.as
package customPreloaders {
import flash.display.;
import flash.events.;
import flash.net.;
import flash.utils.;
[Code] .....
View 1 Replies
Dec 11, 2011
It has been a ong time since I have poste a question but I am returning t AS3 after a break.I am starting a simple game and have used the "Copy as Motion in Action Script" after creating a Motion Tween in the timeline.The test works fine but I am not able to removeChild().After clearing up the error messages one by one I have a working anmation that will not remove itself.I have kept this part f the code in red. I have moved the addEventListener inside and outside the curly brackets with no difference in the end result.
import flash.display.MovieClip;
import flash.events.MouseEvent;
var cursor:MovieClip;
[code].....
View 5 Replies
Jul 17, 2011
Just as the title says, can flash be used in an android game to show animation? Like say an animated Lightning bolt appearing on the screen when a user touches a spot on the touch screen?
If this is not possible, what are alternatives to this?
View 2 Replies
Apr 4, 2011
I am currently making a platformer game but I can't seem to get a walking animation for my character. So far I have made a character which can move fine. Inside the characters movie clip are 2 frames (one standing and one walking) Now my problem is that I can get my character to move right and play the walking animation but when I walk left the walking animation doesn't play but the character still moves. I am using action script 2 and flash pro 8
onClipEvent (load) {
var ground:MovieClip = _root.ground;
var grav:Number = 0;
var gravity:Number = 2;
var speed:Number = 7;
[Code] .....
View 6 Replies
Apr 26, 2011
im a cs5 noob and i have been working on a platform game. I recently created my first main player animation. My question is how would i import that animation to my game?Can i compress the animation to only use 1 layer at all? right now my original is using about 6 layers for 40 frames. How can i take my 6 layer animation .flv file and incorporate it into my game? also, how would i call the animation in as3?[code]
View 0 Replies
Apr 1, 2011
Basically what happens is 5 eggs fall from the top of the screen. What I'm trying to have happen is, to have flash recognize when all 5 have been clicked and goto and stop on frame 3. The other problem is I want the animation to reset when the timer runs out. Thus clearing all current eggs off the stage. I've zipped the 2 files I'm working with the (fla and as files).
View 3 Replies
Jul 14, 2009
I have Adobe CS3 Web Premium installed on my computer. Is it possible to get an upgrade to CS4 for just Flash?
View 1 Replies
Jul 10, 2010
EVERYTHING installs except adobe flash and that sucks ALOT but i also already have macromedia flash 8 pro and i wanted to upgrade to CS3 (CS3 Pro)
View 2 Replies
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
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
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
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
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
Sep 1, 2010
I have some old projects I made while in school that were made using flash MX. Is there any way to get these updated to work in cs5, or even cs4,
View 7 Replies
May 26, 2011
Simple questions: can I upgrade FMS 3.5 to FMS 4 and not have to change any setting or our programs - so I upgrade and our existing system keeps working without any problems??? and - how many concurrent streams (audio only) can be streamed with FMS 4?
View 1 Replies
Oct 12, 2011
currently i have installed flex builder 3 with the default sdk 3.0. Now i want to upgrade flex sdk to 4.1. is this possible or i have to purchase flex builder 4?
View 1 Replies
Oct 25, 2011
I've written android app, and its working. Now i got task to upgrade app's GUI. I have new UI made in Flash. Is there any way to import .swf files into existing android app? and used them like layouts or some kind of custom views? Or how to make some kind of callback functions, that are triggered when something happens in flash GUI, and process some JAVA/Android code?
View 1 Replies
Jun 27, 2009
I was wondering if I could get your opinion on whether or not I should upgrade from Flash CS3 to CS4. I understand It has 3D and IK capabilities as well as what is supposed to be an improved IDE. But what other good reasons are there? I tend to code all my animations. I probably should take more advantage of the timeline. The work I do tends to be for clients in the music/tv industry, so I'm not doing hardcore database apps, well not yet anyway.
View 1 Replies