ActionScript 2.0 :: Moving Background With Character?
Sep 12, 2004
what i am trying to do is get the background to move with the characteri checked out a few tutorials.but not enufheres the deal..i have a character that can fly...and when the character goes upward...thebackground moves down to expose sky..then eventually black space with stars...does that make sense?
View 2 Replies
Similar Posts:
Sep 12, 2004
what i am trying to do is get the background to move with the character.i have a character that can fly...and when the character goes upward the background moves down to expose sky..then eventually black space with stars also i want the background to stop..like when the background ends.
View 2 Replies
Nov 2, 2010
im currently making an "AS3 beat em up" ala streets of rage or double dragon.Currently i have my character moving and a few animations done and i am trying to figure out how to make attacks work.I have some "basic" animation for his attack, but im not sure how to get it to work correctley.What happens is, if you press control (the attack button) whilst the character is walking he just keeps moving and is stopped on the attack frame.I want the character to stop moving if the attack is pressed and once it is released start moving again.
hero.gotoAndStop('still');
var left:Boolean = false;
var right:Boolean = false;[code].......
View 2 Replies
Jan 13, 2004
I would like my character to move as if he was drunk I am unsure how to do that I am using the keyboard for his movement. I also have a character that moves at random I would like the drunk moving character to be able to catch this character and play a scene from within the drunk characters movie clip but I want this character to try and escape the idea is the drunk character gets points for how long he is able to hang on to this character
View 2 Replies
Apr 15, 2002
i posted up lookin for flash tutes to make my game in flash 4 but i guess it's virtually impossible to do so..... well, now i decided to do it in flash 5. here's my concept >
it's basically a game controllling a character to move in grid filled with objects like so >
1 0 1 0 1 0 1 0 1
0 0 0 0 0 0 0 0 0
1 0 1 0 1 0 1 0 1
where 0 (path) is passable n 1 (objects)not....
n i want d character to stand still when not moving and get to an animated frame of it moving when moved in whichever direction. i guess dat's all i need for now. please help me with this as like i've said, i kinda new to actionscripting.
View 14 Replies
Jul 26, 2011
At the first scene of the game My hero character stands still when he's idle but at the second scene he keeps walking in one spot when he's idle. What's going on? Why are the scenes messing with the hero character?
View 2 Replies
Aug 17, 2009
i got my character to move left, right, down and up wit this code:
[Code]....
My question is, how can i block the up and down movement? I tried simply deleting some part of the script to block does movement from the user. But then the script would not work properly : s Here is the uploaded page i'm working on: link.
View 2 Replies
Apr 8, 2011
I'm brand new to flash and want to create a character with moving legs. I've created the character with legs, but don't know how to get them moving properly. Does anyone know a good tutorial?
View 2 Replies
Oct 9, 2011
I want to stop the movieclips movement when it hits a wall (another movieclip). The example below works, but after the collision the movieclip 'blocks' all movement to the left...
For now the example with the leftArrow key;
variables to check the key, if it's hitting the walls and if it's moving or not:
var leftArrow:Boolean;
var speed:int = 10;
var hitting:Boolean;
[Code]....
View 2 Replies
Jan 3, 2010
I have a character with multiple animations by way of movieclips, and I'm trying to have it move using the Key.isDown function. Now, my character is moving correctly, but when the key is released, the animation keeps playing. I tried adding a stop command at the end of the walkcycle animation, but that just causes the character to stay frozen on the last frame of the cycle.
Here is the ActionScript Code:
onClipEvent(load) {
var direction = "left";
var speed = 2;
} onClipEvent(enterFrame) {
[Code] .....
View 3 Replies
Mar 1, 2011
I need to get my character to follow an moving object. I've got an object that's moving around in different directions and I'm wondering how do I get my character to follow the movements when standing on the object ?
View 0 Replies
Jun 6, 2011
I am trying to limit the area in which the character (mcMain) can move I want to be able to keep it in an area (mcBuilding) I also have another area (inwhich the character is not supposed to get to) (mcBackground). (Also I want to be able to to make a dynamic text box that starts at 100 then decreases by 5 when the enemy (mcEnemy) hits mcBuilding and also that it gets removed)
View 1 Replies
Mar 15, 2011
I have a mc called boy and I have an instance of that mc called boy_mc. I have figured out how to make his position change on the stage, but I cannot figure out how to do some other things.
Here is the code that I have so far:
import flash.events.KeyboardEvent;
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
function keyPressed(evt:KeyboardEvent):void{
switch(evt.keyCode) {
[Code] .....
I am trying to learn 3 things.
1. How do I make him be facing left when I push left and facing right when I push to right?
2. How to I restrict him to a certain area of the stage? I am going to have some buildings on the top and I don't want him to be able to walk past the street level. So basically I don't want him to be able to go off the stage or up some to be determined height.
3. When he walks up and touches a door on my stage, I want to jump to another place in the timeline.
View 7 Replies
Dec 13, 2009
I've been struggling with making boundaries with my game. I've managed to make boundaries, but in stead of my game character not moving across that border it just bounces back. Which is not the effect I want.
Here's my code
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
xspeed -= power;
} if (Key.isDown(Key.RIGHT)) {
xspeed += power;
[Code] .....
View 3 Replies
Jan 28, 2012
I am currently working on a platformer using accelerometer to move the character and xml to load levels as so..
[as]
level.x += (e.accelerationX*40);
if (e.accelerationX > 5) {
e.accelerationX = 5;
} if (e.accelerationX * 40 < 3 && e.accelerationX * 40 > -3) {
player.gotoAndStop(1);
[Code] .....
And it is all added into one movieclip called level. My problem is when the character hits under a platform it will go up it which I don't want it too, I don't know how to fix it heres the gravity code.
View 11 Replies
Dec 3, 2011
I'm trying to create simple 2D action game, something similar to well known Fancy Pants Adventures :) I've been looking for answer for more than week and all I've found is [URL] which not answers the question. (I've found also moving on platforms that are rotated but that's not I'm looking for). I have also found great (and free!) flash game engine - CitrusEngine which I'm currently using, but, it doesn't provide moving hero along curved terrain. How to make hero moving along curved terrain like this one: [URL]. There are plenty of games like this (for ex. Fancy Pants or Robot Unicorn Attack) where main character moves along the curved terrain but I can't find answer how can I do that.
View 2 Replies
Jun 3, 2010
I'm making a post-apocalyptic series and I'm drawing all my backgrounds/characters in photoshop and importing them into flash. The problem I'm encountering is that the file size is WAAAAAAAAY too big whenever I import the character drawing straight from photoshop. Is there some trick to making characters look like they're drawn in photoshop or some trick to greatly lowering the file size? Three items on screen at once with no animation and my file size is over 1 meg.
View 1 Replies
Mar 12, 2009
Right basically I have a character and a background. The background scrolls as you press left or right on keyboard to create the illusion of movement. I want the character to flip when you change from holding down left to right and vice versa, but when I do the following code it doubles the size of the character once and then it stays. It flips fine but in the transformed fat size.
Here's the code:
var mySpeed:Number = 10;
function keyIsDown(evt:KeyboardEvent):void{
if(evt.keyCode==Keyboard.RIGHT){
walkingPlane_mc.x+=mySpeed;
greyCharacter_mc.scaleX=-1;
[Code] .....
View 4 Replies
Nov 5, 2003
I'm making a game...and I want to change my background image depending on where the character is. I thought I would make a MovieClip...with all the different background images on different keyframes. My question is....can I use AttachMovie, and if so...how do I reference the particular frame that I want to...? I've never used AttachMovie before, and wasn't sure of the syntax...and how to reference it...to go to a particular frame.
View 1 Replies
Oct 22, 2010
I have a flash file using actionscript 3.0 that when the mouse moves left the background moves right to simulate looking left and vise versa with the other directions. My only issue is that acceleration is a new concept to me and I have never worked with it before. I have read some things on it but they don't really answer my full question which is...
How do i made the background move faster the farther my mouse goes and slower the closer my mouse goes (to the middle).
Here is my script:
ActionScript Code:
stop();
var midXup:Number = 310;
var midXdown:Number = 270;
[Code].....
View 6 Replies
Mar 19, 2010
hi i m new to flash and i want make a site in which the back ground moves with mouse just like URL...
View 1 Replies
Sep 30, 2009
i um want to make a sprite flash movie but i cant afford flash cs4 or 8 so i only have mx heh.. >_> i guess im good at animation but im not as good as alvin earth worm or rpg fan but i want to be good as them is there any way to blur like they do in flash mx? it can be easy or hard i'll work as hard as i can to get it right
View 3 Replies
Feb 17, 2009
How can I do this: [URL]
I love the image moving in the background. show me where to start or some similar code?
View 1 Replies
Aug 12, 2009
How would I go about making clouds continously move across my website as a background?
View 4 Replies
Jan 12, 2011
I'm somewhat stuck in a project that I have to deliver next Friday. Thing is... I've got to code a webpage like The Killers Band webpage with a panoramic picture moving according to your mouse movements.
I've tried several things already, but I had no success yet. (Everything must be coded in AS2.0, and I'm using Flash CS3 to cover the project).
All I have is the panoramic picture, which I might be able to upload if you ask me to.
Additional info:
I've already converted the background picture into a movie clip symbol. Also, if I ever have to send the picture to anyone, I'll send it as a Private Message, since I can't post links yet.
View 9 Replies
Nov 15, 2011
I am currently doing a project that involves animating a background image up/down when buttons are pressed.
1.) It will need to check if a button has been pressed and then animate the background up.
2.) It will also need to check to see what the position of the background is. If it has been animated up already, it will need to be animated down.
3.) Finally it will need to contain if and else statements to animate the background movie clip. If, will animate it to y = 180. else will check the position, if it has been animated up, the background movieclip will be animated down to y = 330
View 4 Replies
Aug 30, 2005
New to this forum, but was wondering if the moving background on this site [URL] is actionscript or just an animation. It looks very cool. I wanted to use the same effect for a school project I'm working on, I am using MX 2004.
View 4 Replies
Nov 24, 2005
I've got this space background image that you can move around with the arrow keys. What I'm trying to accomplish is kind of hard to explain so I'll just give an example...
First, look at the SWF and move the background in any direction. You'll notice that the actual image is pretty small, just barely bigger than the stage itself. I want to make a script that will create duplicates of this image and place those duplicates in the right place so that you will never see the empty white space.
Ok, so say you hold down the right arrow key.. and the image moves left. Once the right edge of the space graphic touches the right edge of the stage, i want a duplicate of the picture placed so that the left edge meets the right edge of the original graphic. Keep holding right, and eventually the original graphic will be pushed off the stage. I'd then like for that graphic to be removed, and for the whole process to repeat itself while moving the picture.
View 1 Replies
Sep 8, 2009
so i have a project where i will be making a website. I will be using flash to make it interactive and visually appealing. I found a website with a really cool entrance page,please view it he mouse moves, the background looks like its moving.
View 3 Replies
May 26, 2010
Trying to build a website where the background of the site is a video and then there would be an actual html page laid on top of it.
View 4 Replies