ActionScript 3.0 :: Animate From A Png Tile Based Image File?
Dec 17, 2010
Is there any way to animate from a tile based .png image file? I have multiple images in 1 png file having slight changes in each image, which if cropped and put into layers one over the other, will give the feel of animation or a character moving or walking etc.I want to know can we do that kind of animation in flash as we do it in C++ or Java and how can we do it.
I'm relatively new to AS3. There's one thing that I don't quite understand about Sprites. I'm making a tile based game, and all the tile graphics for a level are inside one movie clip in each frame. Would I be able to go about creating multiple sprites based on the frames in said movieclip's timeline I would I have to go through and make a separate library graphic for each.
i'm fiddling about with tile based games at the moment and am working from the super good tonypa tutorials. i'd like to change the source code a bit so that i can play about with placing items onto the tile grid dynamically but need some help! tile_dev2.fla.i've linked to the source file and would basically like some help to change a value in the map array so that it change the graphic displayed on the screen using a button or keypress maybe? i have a detectKey function working on the stage that is used to control the movement of the little birdy character i made. also maybe a function the change the character displayed on the screen.
I'm trying to create a simple side scrolling platform game. So, my question is, which direction should i go in? Tile based or art based?So far i have a jpg that extends far beyond the stage and if i wanted to make a real level then instead of having it 480x2000 i would need to make it more like 480x5000 at the least.Im interested in tile based but all the guides i've found are rather dated.
This is my code so far, is square.graphics the way to go? How do I draw a tile that is a picture? Do I need to hold the graphics in some sort of array to do checking like collision?
I am trying to make a pacman game and was advised that collision detection for a game like this is much easier if you create it using a tile based methodology. I have the map created and the character moves fine around the grid. But once I added collision detection it seems to be a bit off and inconsistent. Im not entirely sure what the problem is with the collisions.
I am having problems with my collision detection. basically when I hit a solid tile my character's body is half way in the tile already. here is my code.The properties wY and wX are my game world positioning. Not the stage positioning. dx and dy is the velocity the character is traveling. This first snippet of code is within a game loop. The focus point of my character is centered on the x axis
I've been playing around with ActionScript 3. They have a new way of placing clips onto the stage, "addChild(clip)," which automatically places the clip onto the stage with it's own depth. So here's my problem, when making a tile based game, I have to constantly depth sort to make sure the object lower on the screen has the higher depth than an object higher on the screen. Pretty much, their depth depended on their y-coord. Does ActionScript 3 still let us play with depths?
I've recently picked up some flash work after a long respite into motion graphics via after effects, and I'm slowly mucking my way through things. I've currently got more than 250k pixels I need to seamlessly scroll through horizontally, via a scrollbar and buttons. I've bitten off more than I expected! I've been searching around, and it seems like tile based scrolling is what I'm going to need, due to max bitmap restrictions, is this correct?
If I'm on the right track here, I throw myself on the mercy of the community for any tile-based scrolling resources out there that you know of, something that explains the idea and setup from a non-game point of view maybe? Sorry if I seem like another noob looking for a quick fix, I've honestly been trying to find info on this all morning. Also, feel free to smack me into shape if I'm making this harder on myself than necessary.
I need to create an image gallery, based on an XML file, which displays both the thumbnails and the normal-sized images. Here's a link for you to get an idea of pretty much what I want to achieve, except for the fact that I don't want the thumbnails to slide to the left or right, I'd rather want them to be static, and if there are more thumbnails than, let's say 3, to display a "previous-next" controller. After following some tutorials, here's what I created so far:(you can also find all these files + the thumbnails in the attachment)The XML file (settings.xml):
PHP Code:
<slideshow> <images> <thumb tLink="th/01.jpg" desc="This is the first thumbnail" bLink="bigImgs/01b.jpg" /> <thumb tLink="th/02.jpg" desc="This is the second thumbnail" bLink="bigImgs/02b.jpg" />
[code]....
So far, so good, the script does trace what I told it to But I need to further improve this rather simple script. So, basically here's what I need:How do I load each thumbnail into a "container" movieclip, so I can further manipulate this movieclip's properties (do an easing for position, alpha, filters etc.)? There's one more thing I need to specify: I want to display only, let's say, 3 thumbnails at runtime, not all of them. how could I assign an instance name to each of them.
im trying to make a website based on flash.and im trying to link flash to XML.And here is my problem.I have a layer called "Pages", and im working in one of the pages.I made a timeline, which also had few more pages (5 to be exact).I want to load 1 linked image (as in you click on the image and then load something) on each of the 5 layer based on XML File, and when its clicked it loads on a new page in the "MAIN" site. If thats possible. How would I make that happen?
I'm trying to make a movie clip animate based on a boolean variable.
so that if boolean a is true, I want the movie clip to play frame 1. if boolean is false, play frame 2. I tried using an onClipEvent but it doesnt want to work.
I'm familiar with C/C++/Scheme/Java/OpenGL/TCP/IP.I need to learn how to build a tile based / platform flash engine.What tools should I be using? What books should I buy?I strongly prefer tools that let me do things programatically rather than through a graphical UI.
I am using Flex Builder 3.0 and i want to add image in tile list dynamically then how its possible.Images are stored in Images folder of src. and my array is similar like that.
private var arrImage:Array = [ {source:"Images/1.png",tooltip:"1"}, {source:"Images/2.png",tooltip:"2"},
I am trying to tile a small mc instead of a bmp image and I was wondering if anyone knows what aspects of Lee's tutorial need to be changed to accomedate that?
[Code]...
I tried a couple of things and was not able to get the mc loaded onto the stage.
I'm making a game where you place tiles on a grid. When placing a tile, I need to check the existance of another tile to the left, right, or above and below, otherwise the tile should not be placed.. Here is a function I thought would work, that accepts one variable (the position of the tile just as it is about to be placed) :-
private function checkSurroundingTiles(gridPosition:uint) { var t1 = gridPosition - 12; var t2 = gridPosition - 1; var t3 = gridPosition + 1; var t4 = gridPosition + 12; for(i = 0; i < gridRefArray.length; i++) { var checkTile = gridRefArray[i]; if(checkTile == t1) { return true;
If possible I would like to tile an image or MovieClip along a line using the standard moveTo() and lineTo() methods, The lines are directional so need to show something similar to >>>>>>>>>>>>>. The lines can be at any angle, so using drawRect() with beginBitmapFill() isn't an option. Also if possible I would like to have the lines animated. Is this possible or will it require a custom class?
I want to create a tile map and my fla is 600 x 400. Now I create 7x7 Sprites (Size 40x40) and I want them to be in the middle of the scene with text around (not in the map!). One way is do update the sprite containers, but this isn't "smoothly", I wanna scroll the content, when a new raw appears.
I am using a horizontal tilelist in flex to display an image gallery with only one item in horiz. tilelist being shown at a time. I have next and previous buttons on both sides. The problem is I want to display a particular item/image in that list when user clicks on a thumb image from another thumbimages tilelist at bottom. I used someTilelist.selectedIndex property but it just selects that particular index in list, it does not show that particular item/image. I want the list to show that particular image, not just select it. Please take note that the horiz. tilelist shows only one image at time.
I'm loading an external logo (.swf) into a movieclip. The user would actually select what logo to load from a list. After loading the selected logo into the empty movieclip, the user can than apply certain changes such as changing the logo colors, the size, the rotation and the position of the logo over a certain product.What I want to do is to expand on this by allowing the user to select whether they want the logo tiled across the product
I want to tile a pattern across the stage, but I want to load it with loader (png file).I used to do it like that, Tile being bitmap in the library with export name Tile
Code: var pattern:Sprite = new Sprite(); addChild(pattern); var g:Graphics = pattern.graphics; function resizeHandler(event:Event=null):void
[code]....
what do i need to do actually to send this to beginBitmapFill ?
I have a bitmap (bitmapData) that I'd like it to change colors over time. I've seen examples of applying a color transform and I couldn't get it to work. Also, with those examples they only apply one color. I would like to animate through the ROYGBIV range.
I have a read a few ways to animate an image in AS3 and not sure what is the most efficient way.I want to load 4 images(in 4 files) in a class. Each image is a different frame of a walking movement of a character. What I want to do is load all the images in the constructor and assign the sprite the current frame to display.eg sprite=bitmap1 then after some time swap images sosprite=bitmap2 then after some time swap images so etcsprite=bitmap3....Is this the logic you do in AS3?The code loads 1 image so I can change this to 4 images to load (4 bitmaps and 1 sprite for the current frame?)
I have 170 images that I need to place on the same place on the left side of the stage and and have them move across the stage one at a time, increase in size and then fade out after 10 sec. The sequence then continues for all 169 images. My initial thoughts are to animate the first image inside a movie clip, duplicate it and swap the image. When I tried this it worked fine until the image had shape tweened to the larger size (at this point the image displays for 10 sec and fades out). At the key frame at this point the image changed back to the original one. What do I need to do to make the new image visible throughout the whole movie clip when I swap the image like this? Is there a better way to produce this type of animation? I am using Flash Professional 8 and quite new to the world of Flash and Action Script.