Make A Wall That The Character Can't Go Through On Either Of The 4 Sides Or Even A Squiggly Line That Doesn't Have A Definite Shape
Jun 20, 2011
So I have a simple game I'm making where you are a box shaped character and you have basic movement around the screen. I know how to make walls and the coding but I would like to make a wall that the character can't go through on either of the 4 sides or even a squiggly line that doesn't have a definite shape. I used this coding:
[Code]...
And that does kind of work, but it's not stable (works better with one side only). Sometimes one side of the wall, the character will still be able to go through. The tool I'm using to make the wall is a rectangle tool if that makes any difference. And I'm on actionscipt 2.0 on adobe flash cs4.
View 1 Replies
Similar Posts:
Feb 9, 2006
Just played around with tween classes first time and cannot find a way to make text or shape to "elastic" from all sides of object instead of "elastic" object to down and right:
Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;[code].....
View 5 Replies
Oct 19, 2008
draw a squiggly or wavy line in the MOUSE_MOVED event as the user clicks and moves the mouse.
View 1 Replies
Jan 4, 2012
I want to draw a squiggle line below misspelled word in a Flex Spark RichEditableText component.
View 1 Replies
Dec 12, 2003
make a character jump by using spacebar make a boundry (character can go no further than a wall or something)
View 1 Replies
Nov 29, 2009
I m under the process to create a platform based game,but stuck in a problem ,its probably concern with x-axis, actually my player stops certain distance before right wall and with left wall too,i tried to reduce the distance but end up in failure,i have attached the concern fla.
[Code]...
View 5 Replies
Sep 7, 2009
I have a line within a rectangle.The line can draw outwards 360 degrees.I need to determine which of the rectangle's 4 sides the line is drawing out of.
View 1 Replies
Mar 16, 2011
I have two rectangles and I want to draw a Line between them.The problem is as follows: I need to select which sides to draw between.What I remember of the algorithm is that you start by drawing a imagined line between the centres of the two rectangles. From that it is possible to calculate which sides are intersected by this line. Chose these sides as start and end for the actual line.
View 0 Replies
Jul 9, 2011
I am trying to make a program that dermines if sides can make a right triangle. The code that I made gives me that it cannot for everything except the sequence 3,4,5.
'Paul Bursu'
'July 08 11'
'To determine if inputted angles can make a triangle'
[Code]....
View 1 Replies
Jan 17, 2010
I am just restarting my flash adventures and am trying to learn AS3. I can a real quick code request. I am trying to make a MC bounce off the sides of the stage. When I use the following code, the MC gets stuck going -2 then +2 at the edge of the stage.
[Code]....
How do I get it disregard the first part of the if/else and then go the other direction? know this is a really beginer question,
View 14 Replies
Oct 10, 2005
I'm wondering if a hidden navbar can be done at the left side of my flash whereby i can trigger it to open by sliding out with all the submenus and close it. I know it can but done in javascript but can it be done in actionscript?
View 14 Replies
Aug 11, 2009
i was wondering if any of you out there could tell me how it is possible to make a movieclip of a character and when the character is dragged about the screen by the curser, how do you make the characters arms and legs swing about in a realistic fashion.
View 2 Replies
Aug 3, 2009
I am wondering how I can make enemies spawn from all sides, anywhere on the side, like in Amorphous or Endless Zombie Rampage 3.
View 2 Replies
Nov 18, 2011
Is there any tutorial how to make a wall which is not straight
View 6 Replies
Oct 30, 2009
I like to create a Flex application, an image gallery, which comes like 3D wall. How can I do that? Is there any examples available?
View 2 Replies
Jan 4, 2010
Imagine loop that contains a ball_mc that bounces off walls for how ever long the loop. I am asking what the math part would be to make the ball_mc bounce off at the correct angle and such.
View 1 Replies
Feb 11, 2008
I'm doing for my website some animated pictures in flash (like banners):when the movie end I want it to loop, but not from the first frame to the last one. I want it to loop from a definite frame (for example "25") to the end.the Actionscript code to use?I tried in this way, but it doesn't work and give me errors:On the last frame: stop();Selecting the object: gotoAndPlay(25);
View 3 Replies
May 10, 2009
I'm trying to create a shape tween to take a line from a point to another point. I can get it to work if I leave the line short but if I try to take it to a point the shape tween doesn't work.
View 1 Replies
Jan 9, 2009
I am currently working on a game and I am stuck. I do not know how to make a rounded surface that will act as a wall/barrier. It is pretty much a semi-circle. I know you can make a circle act as a barrier but I would need to use the perimeter of the circle. Also is there a way you can make an actual image a barrier? I am new at this but I know from reading up that making a rounded wall is pretty tough. I am going to use this wall to make a ball bounce or "roll" around it. Below is a picture of what I am trying to do. The black dot is the ball.
View 3 Replies
Feb 23, 2011
All I really need is to make a post to the Facebook wall of the user from flash movie.Been trying to find any decent tuts for Flash IDE but everything seems to be for Flex mainly.
View 2 Replies
Mar 17, 2002
I am familiar with hit test, but how do you make a ball bounce off a wall with the same angle that it bounced on it with?ex. it hits the wall at 45 degrees, and it bounces off the wall at 45 degrees
View 6 Replies
Jul 20, 2005
I've got an XML document that contains text.The text is read in and put into a HTML format text box.I want my text to have new line characters.I've tried using <br> hoping this would work in the HTML text, but this doesn't work.Is there a special character code I can use?
View 5 Replies
Apr 26, 2011
i want to make a ball move at a constant speed into a wall and bounce of, initially it should move back but then It should carry on moving towards the wall.
I managed to make it bounce but once it hits the wall it carries on in the opposite direction!
View 4 Replies
Dec 5, 2004
im trying to make a custom cursor that when it hits a wall it bounces off and i cant seem to get the right AS. ive got the cursor and i can write AS for a hittest. ive typed in
[Code]...
View 2 Replies
Oct 14, 2009
I'm designing a maze type of game. The character can only walk on a line. I'm trying to test if thecharacter is on the line (land). If he isn't on the line, he isn't supposed to move (i.e. disable the arrows that control him). The easiest way I thought to test this, is to test the color the character is on. (The line is "66CC00" and the rest is "999999").My code:
HTML Code:
var land:Boolean = false;
var bmp:BitmapData = new BitmapData(this.width, this.height, false);
[code].....
View 5 Replies
Feb 20, 2010
I'm designing a maze type of game. The character can only walk on a line. I'm trying to test if the character is on the line (land). If he isn't on the line, he isn't supposed to move (i.e. disable the arrows that control him).The easiest way I thought to test this, is to test the color the character is on. (The line is "66CC00" and the rest is "999999").[code]My character stands on "66CC00" in the beginning, so that he can start moving. When I trace hexColor it stays on "66CC00" even though my character moves onto "999999".
View 4 Replies
Apr 21, 2011
I am trying to draw a line that goes from point A to Point B. Along the way there are objects (of any shape) that force the line to go around them in order to reach point B. It cant go through them. This is like directing someone using a map. You can only draw a line between the blocks / along the streets.
I tried that using collision tests. Fine, I can now find the coordinates at that instance, but I still cant get the line to go around the object before proceeding to point B.
View 0 Replies
Mar 8, 2010
I have a line that is being drawn following a route when a play button is pushed. At the end of the movieclip the whole route is shown with the beginning and end. How do I clear that line if the user hits play again? Right now it connects the beginning and ending points and creates another line on top of the old one.
Actionscript Code:
var shape : Shape = new Shape();shape.graphics.lineStyle( 4, 0x9C1E26);shape.graphics.moveTo( arrow.x, arrow.y );addChild( shape );addEventListener( Event.ENTER_FRAME, loop );function loop( event : Event ) : void{ shape.graphics.lineTo( arrow.x, arrow.y );}
View 1 Replies
Oct 23, 2009
I am tracing a line between two movieClips (called pontoA and pontoB) using the following code:
var my_shape:Shape = new Shape();
addChild(my_shape);
my_shape.graphics.lineStyle(4, 0xFFFFFF, 1);
[code]......
View 3 Replies
Mar 11, 2011
Given a MovieClip containing a vectorshape (loaded from the library) - is there a way to check whether a line (from point(x1,y2) to point(x2,y2) intersects this shape?
View 1 Replies