ActionScript 2.0 :: Move Upwards 10 Pixels When Hit?

Dec 20, 2003

Ive got an object called "heart" and I have another object called "k". The heart follows the mouse and when the heart hits the k I want the k to move upwards by 10 pixels. Can anyone give me the AS on how to do this?

View 1 Replies


Similar Posts:


Actionscript 2.0 :: _y Movement By Pixels - Move The Movie Clip In Incremental Moves Consisting Of 30 Pixels?

Nov 18, 2009

I have a movie clip called column1_mc. when I click a button I need to move the movie clip in incremental moves consisting of 30 pixels.

column1_mc._y = 30;

Does not work because that is giving a _y coordinate.For example.I need to make the movie clip jump to _y 300 but make 10x30 pixel incremental jumps. Moving 10 times 30 pixel jumps.

View 1 Replies

Move A Distance Of 2178px Upwards On Stage?

Jun 8, 2009

I have a large image (w: 1071px, h: 2222px) which I need to move a distance of 2178px upwards on my stage and the quality of the tween is terrible.
 
I've ticked the box in the image properties to allow smoothing and I've also reduced the image quality to 50% but it still lags. I've tried chopping the image up into seperate pieces so that when some of the image has gone beyond the stage area and is no longer visible that part of the image is removed and flash no longer has to move it. I've used timeline and actionscript tweens. I've tried exporting a quicktime movie to see if the results would be any better but they were pretty much the same. I am pulling my hair out here!!

View 2 Replies

Professional :: Move The Mouse And Check How Many Pixels?

Aug 13, 2010

I'm trying to move the mouse and check how many pixels I "walked" by comparing the positions every frame, my idea was doing it with arrays, but I really don't know how to make it.

View 5 Replies

IDE :: Telling MovieClip How Many Pixels To Move In X Direction

Apr 29, 2009

I'm moving a movie clip using actionscript (as2) instead of a motion tween (because I want to save file size) and I have this code on the first frame of the main timeline ("stone" is the movieclip instance name) and it tells the movie clip how many pixels to move in the x direction:
Code:
xTargetstone = 600;

I have this code on the movie clip itself ("stone" is the mc instance name) to handle the actual moving of the movie clip:
Code:
onClipEvent (enterFrame) {
xstone = getProperty(_root.stone, _x);
movestone = _root.xTargetstone - xstone;
setProperty(_root.stone, _x, xstone + (movestone/5));
}

The movement works fine, but the issue is that it starts out fast and then slows down over time (even though that amount of time is small). The result is that the movie clip seems to wiggle and vibrate before it stops. Is there a way for me to change the code so that it doesn't wiggle and vibrate? perhaps something with the math I'm just not totally understanding? I would like a nice consistent motion from start to finish, while being able to set the time it takes to move etc.

View 4 Replies

ActionScript 3.0 :: Layers - Move All Those Objects Together As A One Unit By Some Pixels?

Oct 11, 2011

if there is an option to refer to a layer as a named object. so if I have a layer named 'myLayer' I can to control about the alpha amount, for instance, of all the objects (symbols, movieclips etc.) that inside this layer or to move all those objects together as a one unit by some pixels.

View 5 Replies

ActionScript 3.0 :: XML Animation - Move The Movie Clip By N Amount Of Pixels?

Aug 3, 2009

I have a small tween animation, which i copied to AS3 code using the automatic feature in Flash CS3. the animation basically shifts a certain movie clip horizontally (only X axis) a few pixels. the line of cose which is responsible for this is: <Keyframe index="4" x="500"/> i wanted to make this animation slightly smarter. i want to have that code take the movie clip to a specific X coordinate no matter where it is on stage at the moment the animation is triggered.

for that i wrote the following code: var n:Number = work_btn.x - (-172.4); whereas work_btn is the instance name of the movie clip controlled by the code and -172.4 is the specific X coordinate i want the movie clip to go to when the animation is triggered. i figured that way, n stores the pixel distance between the current location of my movie clip and its final destination. now is there any way i can tell the code to move the movie clip by n amount of pixels?

[Code]....

View 1 Replies

ActionScript 2.0 :: FMX : Make A Button In Flash - Font Doesnt Accually Move But It Looks Like A Few Pixels Get Bumped Around?

Jan 5, 2003

How come when you make a button in flash, and you roll over it . the font seems to move some. It doesnt accually MOVE but it looks like a few pixels get bumped around. Its the wierdest thing.

View 3 Replies

ActionScript 3.0 :: Transition Manager PixelDissolve - Instead Of The Pixels Being Dissolved The Pixels Being Added?

Mar 24, 2012

so instead of the pixels being dissolved, the pixels being added? :

ActionScript Code:
var Anim:TransitionManager = new TransitionManager(blackbox);
Anim.startTransition({type:PixelDissolve, direction:Transition.OUT, duration:1, easing:None.easeOut, xSections:35, ySections:35});

basically what i would like is the end point to be the start point and the start point the end point.

View 2 Replies

ActionScript 2.0 :: Slider Bars And Scaling - Code Keeps Shrinking Initial Object Down To 10 Pixels By 10 Pixels?

Jun 17, 2009

I have a swf file that loads into my main movie, and within that swf there is a masked image that i would like to scale using zoom in and out buttons and also by using a slider bar.However i cant find any tutorials that will allow me to combine the two.I have used the following code for the buttons. Which seems to work ok but i would like it to be a little smoother. (using speed or some sort of easing??)

ActionScript Code:
zoomPlus.onRelease = function(zoomIn) {
if (test_shirt.shirt._xscale == 400 && test_shirt.shirt._yscale == 400) {[code]....

but for this code it keeps shrinking my initial object down to 10 pixels by 10 pixels..

View 0 Replies

ActionScript 2.0 :: Snow Falling Upwards?

May 26, 2005

I've done the tutorial on falling snow but what I really want it to do is fall upwards... like bubbles on water.what part of the code I need to change...

View 6 Replies

Actionscript 2 :: Have Flash Textfields Expand Upwards?

Feb 2, 2012

With actionscript2, is there anyway to expand make a text field expand upwards if more text was added then the current size could hold, rather than downwards? Data is loaded from XML.

View 2 Replies

ActionScript 2.0 :: Detect When The Mouse Has Moved Upwards Or Downwards?

Feb 18, 2009

Is there any way to detect when the mouse has moved upwards or downwards?

I currently have a mouse listener with an onMouseMove function that uses the _ymouse to detect any movement within a restricted distance.

But I want the mouse to detect up and down movements in any distance.

View 2 Replies

ActionScript 2.0 :: Force V2 ComboBox To Open Upwards?

Oct 15, 2005

Is there any code to force a V2 combobox to open updwards, rather than the default downwards?

View 1 Replies

ActionScript 2.0 :: MX04 Making Object Get Propelled Upwards

Nov 30, 2009

Im trying to make a character get propelled upwards when he steps inside a bubblejet, but as i am very new to actionscript i have no idea where to start. heres what im trying to do:I hope that makes sense! im sure it will be a simple thing to do just i really am clueless!

View 2 Replies

ActionScript 2.0 :: MX04 : Making Object Get Propelled Upwards?

Sep 21, 2011

Im trying to make a character get propelled upwards when he steps inside a bubblejet.

View 7 Replies

ActionScript 2.0 :: Make A Spring To Launch The Character Upwards?

May 23, 2011

I'm making a platformer, and I'm trying to make a spring to launch the character upwards, and im using this script:

Code:
_root.player._y -=300

The code works, but it just teleports the character 300 pixels upwards, but I need a fluid motion.

View 2 Replies

Boundaries - Ball Will Get Stuck In The Wall And Slowly Travel Upwards

Feb 8, 2009

I am making a pong game and am having some problems with the boundaries. The ball bounces off just fine but if i hit it to close to the boundary, the ball will get stuck in the wall and slowly travel upwards. Bouncing back and forth. It happens on both sides. Also How do you set a key press movement to stop. I want to be able to stop at the boundary if i hold the left key down but it would stop the game entirely. I have it set now so that the controls reverse every time a boundary is hit. My big problem is the boundary though. I will eventually figure out the paddle movement on my own. Another problem I am having is getting my score value to increment correctly. It always reads as a NaN until I score. When I do it goes 1, 11, 111, and so forth. I have the variable set as number values but the dynamic box, I think, is still reading them as strings

View 1 Replies

ActionScript 2.0 :: Getting A Dynamic Textfield To Count Upwards To A Specific Number?

May 28, 2009

If there a quick way code wise of getting a dynamic textfield to count upwards to a specific number?

i.e. I have a global variable named: _global.num and this equals 30 and I want it to count from 0 to 30 quite quickly.

View 1 Replies

ActionScript 3.0 :: Add An "If Statement" If The Panel1 Is At The Bottom It Goes Upwards?

Dec 19, 2010

The following is the working code. I want to add an "If statement" to achieve the following result: If the Panel1 is at the bottom of the page (y:750), then it goes upwards (y:150) when user clicks on Panel1_btn, if it is already upwards (y:150) then it should goes downwards (y:750) when it is clicked on the same button. How to re-code it? The following is my code:

Panel1_btn.addEventListener(MouseEvent.CLICK, clickHandler);
function clickHandler(event:MouseEvent):void {
var Panel1Tween:TweenMax = new TweenMax(Panel1, 6, {y:450, delay:1, ease:Strong.easeOut});
}

View 1 Replies

ActionScript 2.0 :: Get The Move And Zoom To Be Smooth So The Users Can See It Move Across The Screen Then Gradually Get Bigger?

Apr 11, 2004

tutorial where when you click on a movie clip it moves to a certain location on the page and then zoom in and makes it a certain size. Also i want it to move back to its original location if you click it again.I want the move and zoom to be smooth so the users can see it move across the screen then gradually get bigger.

View 5 Replies

ActionScript 3.0 :: Make Buttons That On Rollover Move To Left - On Rollout Move Back To Their Initial Position

Dec 15, 2009

well i want to make buttons that on rollover move to left, on rollout move back to their initial position, and if clicked, they but stay this time at the final rollover place, and be there until something else is clicked. When something else is clicked, the previous button , returns to its initial place. So i ve got it all figured out except for the freeze and move part when the buttons are clicked. All it does now , is when they are clicked they freeze at the position i want, but i havent got a clue how to update them, after so they start moving back, and reacting on rollover and rollout, when the next button is clicked.

[Code]...

View 2 Replies

ActionScript 2.0 :: Move And Loop - Move An Object Across The Stage And Once Out Of Site

Dec 11, 2006

I know this is very noob, but I need a simple AS move and loop. Move an object across the stage and once out of site, loop and start over again? It needs to be a slow and endless loop.

View 3 Replies

Set Stage To 12,00 Pixels?

Feb 18, 2011

I need to cretae a flash banner for a footbal marquee that is over 12,000 pixels wide.how do I make the stage that big? when I try it says I can only make the stage 8,000 pixels wide

View 4 Replies

Flash :: ActionScript - Make Sth Move Somewhere And Move Back?

Jan 27, 2010

Using Tween class maybe? I tried the easeOut. But if will write 2 Tween, the 2nd one will overwrite the 1st one, so I only see the obj moving in the 2nd Tween direction, not the 1st Tween direction. I know the coordinates for the 2nd Tween below is not correct (cos all coordinates shld follow the defined reference point), so I need to find out the logo's width and height. But is alright now cos it is for testing purpose.

[Code]...

View 2 Replies

ActionScript 2.0 :: Click In Ball And Move It Up, The Gravity Move It Down?

May 8, 2002

How can I move (on click) the ball up? I'd like to click in ball and move it up, the gravity move it down as well...

View 1 Replies

Snap Guides To Pixels?

Jan 11, 2008

I want to be able to snap the guides to pixels the way you can in Photoshop by holding Shift. Is it possible?

View 2 Replies

Using Tracking Pixels In Flash?

Nov 19, 2009

Got a question from a fellow designer about the use of Tracking Pixels in Flash. Does anyone use tracking pixels in their Flash creatives? If so, how/where do you embed them?

View 2 Replies

Professional :: How To Get Square Pixels

Jul 23, 2010

if I set the stage to be 800 px X 800 px, it does not appear square, neither does holding shift + drawing a rectangle.  However, drawing an oval and holding shift seems to create a circle(though it could be I can't notice it because it's too small).  Is there some way to make these appear square? 

View 6 Replies

ActionScript 2.0 :: Need A Way Of Reading' Pixels

Mar 26, 2010

I'm trying to get my program to detect when certain pixels (not shapes) have been hit but don't know what sort of code to use for "reading" pixels. I read about the getPixel method, but it seems that's only for bitmap images?If it helps, I'm trying to put it into use with hitTest, with specific pixels rather than shapes in general.

View 0 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved