Moving Objects Are "distorted"
Jul 15, 2011
For some reason I was not able to edit my posts and my posts were being filtered, so they didn't get sent. Then they all got suddenly posted resulting in this mess. I also accidently double-posted the whole topic for the same reason.
[URL]
View 5 Replies
Similar Posts:
Oct 23, 2005
I have a problem where Flash takes it upon itself to modify the width/height x/y values I set objects (MC's) to, usually by less than a pixel. I don't get that.. and wouldn't that mess some things up like when I'm increasing the size of an mc someodd 300 times its original size, then that 0.2 pixel Flash adds in white space could become 50 pixels. Also, when I change the size of x MC, some other MC's will change their size. I can tell because the other MC's are about 1 pixel apart and when I change x MC that pixel is filled in sort of. I noticed some decrease in these problems when I was using whole numbers and x/y values, but it hasn't stopped it completely. I can give an example swf if necessary.
View 3 Replies
Jan 22, 2009
I'm making a game where a character moves around a level and stays in the centre of the screen as the background scrolls past. I have created a movie clip of an enemy that moves up and down, and used hitTest to stop my character flying through the enemy and also to deduct a point from the score. However, if my character hits the enemy and stays underneath him, the enemy's movement pushes my character out of the screen, and you can no longer see him.
View 3 Replies
Feb 1, 2010
i'm not quite sure which forum to use, so therefore I post this discussion here. I want to animate an object that is turning 360 degrees around.
[Code]...
It does'nt need any navigation like this example, but it's going to just an animationmovie.This animation is going to be viewed on a widescreen tv. How do I make the animation fit the screen? I'm not sure which resolution the animation must be. I guess this has to match the resolution of the tv. But is it just as simple as changing the flash file settings in 1920 x 1080?
View 6 Replies
Nov 25, 2011
I'm making a catching game and I only wanted the falling objects hit certain area on my catcher. My catcher is a girl with mouth open and I wanted the falling objects to hit only the mouth, not any other parts of her body like arms. So I made two objects, the full girl and just the mouth. How do I make the two objects (movieclips) move around with the mouse?I tried to embed one object into another but it didn't work....
This is actionscript I wrote so far:
package {
import flash.display.*;
[code].....
View 6 Replies
Jan 16, 2012
I'm having a little problem with collision detection. I'm currently with very simple game, where the only thing that is off is the collision.I tried with hittestobject and (as I found) it checks for the outer layer (my objects are a circle, and a weird star), so this method was of no use to me. Then I tried with hittestpoint, and I found that it checks for the center of the objects, so game over happens only where the center of an enemy touch the center of my character.I know that I must have something missing and I found a lot of guides but all of them were with squares or with static objects
View 3 Replies
Jun 11, 2010
I have a 2d plane rotated on its x axis, with 2d display objects I want to move around on the plane. Its pretty similar to a chess board [URL]..
The board is a rotated rectangle, and the pieces are just 2d display objects. Whats the easiest way to manipulate those objects so they appear to be moving on the board?
View 1 Replies
Sep 1, 2010
I have this class named MovingObject which extends the MovieClip class. This class will be instantianted for several times. Inside this class is a Timer that handles the speed of the objects moving. There is another class called TheStage and this is where I will instantiate MovingObject (s).
public class MovingObject extends MovieClip{
public var tmr:Timer = new Timer(1);
public function MovingObject(){
[Code].....
Assuming that the code is working fine (I haven't debugged it), this makes the particles to move all at once. However after several seconds of running it, the particles seem not to be moving in synchronization with each other (because their distances between seem to get nearer).
View 2 Replies
Apr 14, 2011
I have an array wich is filled with platforms that are supposed to move.
var MovingPlatformArray:Array = new Array();
for (var c:int = numChildren - 1; c >= 0; c--){
var child3:DisplayObject = getChildAt(c);
if (child3.name == "movingplatform"){
MovingPlatformArray.push(child3);
[Code]...
Right now I have 2 moving platforms in this array. But only one moves up and down. But they both register a touch with the birdie.
View 3 Replies
Jun 23, 2009
I have a MovieClip on my stage. Inside the MovieClip there are a few buttons (all MovieClips also) and a mask layer to keep anything on the outside invisible.
Problem: My MouseEvent fires and should move objectA into position over objectB. All code in the script tells me it has moved. Tracing the x,y coordinates of objectA also tells me it has moved. The Alpha on objectA is 100% and it is positioned on the topmost layer beneath the mask layer. All this tells me that when the object moves, it should be visible on the stage (the event moves the object into the masked area). Testing disproves everything. The traces all tell me the object is where it is supposed to be but it cannot be seen. I don't understand this and it, amongst other AS3 hiccups, is seriously turning me off Flash as it seems to be a waste of time to try and learn as it seems like 90% of the scripts written will fail 90% of the time.
View 3 Replies
Nov 3, 2011
Code:
var arrowleft_btn:Button;
var arrowright_btn:Button;
arrowleft_btn.addEventListener(MouseEvent.MOUSE_DOWN, startScroll, false, 0, true);
[Code]....
What I am trying to do to solve my first problem is have the image (which holds several smaller images in it) scroll across the screen when the user clicks on either the right or left arrow found at the top of the screen. If anyone is interested I can send them the file to have a look at? All of the instance names are the samer though, the arrows are buttons and the 'housecompilation3_mc' is a movie clip.
View 2 Replies
Oct 29, 2004
I have a main menu box that contains navigation buttons. This box can be dragged anywhere on the screen. If i want a button to move that box to a certain x and y point, no matter where it is at anytime, how can i script this?
View 13 Replies
Sep 17, 2005
how to move an object with easing with actionscript on flash mx 2004..
View 2 Replies
Jul 24, 2006
I want to move an Object via AS in this way:Start: x = 0 moving to x = 300 waiting there for 4 seconds moving from x = 300 then to x = 500 .
View 5 Replies
Jul 3, 2010
I have imported a lot of paths from an Adobe Illustrator document right into a flash file. The paths exists as Drawing Objects inside the scene. Using pure actionscript, how can I move a symbol following each of the lines, without using predefined Motion Guides.
EDIT: I've attached the Flash file, full of drawing objects.
http:[url]....
The question is: Are these drawing objects accessible through AS3 or I should convert them to symbols / whatever format necessary.
View 3 Replies
May 10, 2011
I am creating a scheduling application that shows projects (wrapped within a canvas) on a 2 week calendar timeline.If the user decides to move a project over by a day, i need to check and see if the moving project would then overlap with any other existing projects. If it does, one of the two projects would need to move down the screen along the y axis until the two projects no longer overlap.I've created a function that loops through a repeater item which is used to create the projects... the end result of this function is an arrayCollection that holds:
0. the id number within the repeater
1. the project title
2. x coordinate
3. y coordinate
4. the width of the project
5. the height of the project
I have also created a function that takes the two objects within the array collection and determines if they're overlapping.I can not, however, figure out a working loop that goes through the array collection, compares each item within it, checks to see if they overlap, moves the project if they do overlap, and then continues onto the next project.
Also, I need to make sure that moving one project will not make it overlap with another.I ended up having to reset each elements y value to 0 each time any project is moved and then re-evaluating whether or not they collide.
View 1 Replies
Jun 22, 2009
I have this code inside an ENTER_FRAME event. I'm trying to move the "ball" from its x- and y-position to a tartget x- and y- position:
Code:
if (processClick)
{
if (ball.x < targetX) ball.x += 8;
if (ball.x > targetX) ball.x -= 8;
[Code]....
But the "ball" doesn't move in a straight line, I think it is because the x- and y-movements are processed independently?
Is there a way thay I can make the "ball" move in a straight line from the starting point to the target point?
Also, is there maybe a way to manually create a tween between the starting point and the target point using actionscript? If I export the "ball" movieclip for actionscript?
View 4 Replies
Jan 4, 2011
i got 5 bubbles on my stage and each is moving from the bottom to the top. additional i want to be able to push the bubbles with the cursor.this is working, but only on 1 bubble ...
ActionScript Code:
function image_move(e:Event):void {
for(var i = 0; i < bubbles.length; i++) {
[code]....
View 0 Replies
Aug 26, 2009
I'm just curious how you'd hitTestObject a fast moving object? The problem I'm having is that my bullet seems to skip over large areas depending on the speed. Since the speed of my bullet is 40 pixels per millisecond (I think), it seems to only appear on the stage in instances that are 40 pixels apart, so I cannot hitTest in between those instances.
Here's an image of the bullet patturn as I hold down the shoot button. It just looks like this, unchanging. I won't be able to hit the yellow object ever.
View 2 Replies
Apr 9, 2010
[flash 8]
[URL]
I make your object move with your tutorial,but Icant move my own object,
View 1 Replies
Nov 25, 2011
I'm making a catching game and I only wanted the falling objects hit certain area on my catcher. My catcher is a girl with mouth open and I wanted the falling objects to hit only the mouth, not any other parts of her body like arms. So I made two objects, the full girl and just the mouth. How do I make the two objects (movieclips) move around with the mouse?
Attachment 54347Attachment 54348
I tried to embed one object into another but it didn't work....
Here is my attached actionscript file.
View 8 Replies
Mar 13, 2009
URL...Not too sure how to name this issue so its hard for me to search for such a tutorial..
View 1 Replies
May 27, 2011
There are a couple of problems i'm having with this - the first is how to work out how to find where the tip of each sine curve is (ie the frequency) and the second is to work out how to rotate each object so that it slides sideways along the sine wave(note file is 800 x 600)here's my code: CarouselTest.as:
package
{
import com.greensock.easing.Sine;
[code].....
View 1 Replies
Mar 10, 2009
I have about 4 or five objects moving around the screen. when I rollover one of the objects, I need all the objects to stop moving... when i move the mouse away from the abject, all objects on the screen need to start moving again.
View 1 Replies
Feb 7, 2010
has anyone found an AS3 source/Maths-lib etc that covers not just simple collision tests but swept collision tests (at least swept AABB/circle tests) for fast moving objects? I had a quick look at flixel but even that does not seem to have sweep tests for fast moving objects.
View 2 Replies
Jul 23, 2011
One of my main interests is playing games so I thought why not make a game? I see lots on the Internet games based in Flash so I thought that would be my best starting point to make actual graphic based games... (not to mention I actually got taught at university how to use flash to a certain extent). The game I decided upon was tetris. I'm sure you're all familiar with the block based puzzle game and might be able to shed some light upon what I am doing right and what I am doing wrong. So, I've firstly made my game screen with a window for all the blocks to come down in.
I've also put some dynamic text place holders ready for when I come to keeping track of how many 'lines' the player has scored, the time and so on in the right hand side of the screen. I have made graphics for the different colour 'building blocks' (just one block of 24x24 in different colours for each shape) and then used the 'building blocks' multiple times to create my shapes (I, J, L, O, S, T, Z). These blocks are called tetrominoes. Now I've come to a point where I need to import these tetrominoes randomly from the library and get them to appear in the middle just off the top of my block screen.
How do I import random objects from a particular folder in my library to the stage in Flash CS5 AS3? After realising a quick solution to my problem was not to be found quickly I then thought about what will happen to this block once it has been imported... Well, in Tetris the block moves slowly down until it hits another block or the bottom of the block screen. I know that I can do something with a detectHit() function. How do I get my block to move down the screen by a set amount of pixels every second or so?
View 4 Replies
Nov 17, 2010
I have been trying to develop a drag and drop Mr. Potato Head type game for a couple of days now. I am new to AS3 and I have hit a roadblock that I was hoping someone out there could help me get through. My game has 3 separate menus (mouths, hats, and eyes).Each menu is a nested MC which has several dragable objects. Unfortunately, when I move to the next frame on the timeline the object I drug out resets itself and disappears. Is there any way to keep a dragable object on the stage once it has been placed there? I think my problem is more of a logic and structure issue with the way that I set up the game rather than an issue with actionscript.
View 3 Replies
May 13, 2009
I´ve made a couple of simple buttons and I have placed a sound on the over frame, when I export the swf the sound sometimes get very distorted and in a browser too, so I made a movieclip "button" instead and attached the sound and the same thing happens!The sound is a mp3, a short "classic" click.
View 2 Replies
Mar 8, 2006
I've got an isometric view of a flat surface. On this surface there are various characters running around and I obviously need to control the depths of each object.
My flat surface needs to be used in two views: top-bottom + isometric.
The original mc is generated in the flat top-bottom mode. For the isometric view, that same mc gets distorted: this way the whole XY coordinates system gets distorted too.
Have a look at this (updated).
So i'd need to create this extra coordinate (is it the classic Z-depth?), and manage to gather information about it...
Does anyone know what the formula would be to calculate the depths of each character (red lines)?
View 2 Replies
May 18, 2002
For some reason, my buttons appear distorted. Not always, but most of the time. Why it that
View 3 Replies