ActionScript 2.0 :: Moving Picture Right To Left And Stop At Certain Point
Nov 24, 2003
I read the Movement using ActionScript tutorial [URL]. My question is: How can I make the box stop at a certain point, instead of disappearing. What I want to do is to have a picture move from right to left, and then have it stop when it reaches the left side of a banner that I'm trying to make. I'm working with an image of a ship, and I want to make it look like it's floating from the right, and when it reaches the end, I want it to stop there and have text appear on the right side of the pic.
View 8 Replies
Similar Posts:
Jul 27, 2007
So when you load a picture into a movie clip, it loads into the Top-Left hand corner.I really want it to load into the Top-Right hand corner. Is there a way?I am loading it via AS - not placing it manually, as I have a variety of images which are of different dimensions....
View 4 Replies
Jun 8, 2005
how do i stop the movement of an object moving from left to right. I want to be able to place it anywhere id like.
View 2 Replies
Aug 20, 2009
if i have a movieclip or a sprite could i find (via code) where is its registration point compared to its top left point (no rotation included) ?
View 4 Replies
Jul 15, 2011
i have the follow issue :
I have a point which is setted at the border on a component, with changed transform point to the center of a component in order to match the component rotation.
the important part is when i try to get the point XY after rotation - they remains the same as before rotation.
how to get XY, after rotation ( changeing point.rotation property to specific degrees of rotaion )
View 2 Replies
Feb 19, 2005
I know some basic trig. but how do i find an angle from an anchor point and a moving point?
adjecent = _root.anchor._x-_root._xmouse;
opposite = _root.anchor._y-_root._ymouse;
hypotenuse = ((adjacent ^ 2)+(opposite ^ 2)) ^ 0.5;
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
Feb 2, 2011
Have a flash picture slide show that fades in and out to transition from picture to picture. Would like to use a shared object so that when someone goes to the next page it will load on the picture it left of at. Should the shared object load at the last state or should it save the frame position? The movie has so many pictures that people will only see the first couple pictures every single time they change pages and never get to the end of the movie. This was made in Flash CS5
View 1 Replies
Nov 30, 2006
panning my content from left to right (with stop as intervals) then right to left (also with intervals)
1. I created an mc (name: "content")Notice in this mc, I layout 4 sets of text (like a page) from left to right
2. I created another mc (name: "pancontent_mc")
-I added a layer for "content" and created a motion tween for it to pan from left to right
-I created a mask layer on top of "content" that will show 1 set at a time
-I created an action layer that has total of 4 stops(); on each frame where the 4 sets of text will show directly under the mask.
3. maintimeline -There's only 1 layer. I placed an instance of buttons (left/right) and an instance of "pancontent_mc"
4. actions for right button, works fine and stops on each set of text.
on (release) {
this.pancontent.play();
}
5. actions for left button - none. I havent figured this out yet.
on (release) {
this.pancontent. - something like play previous frame until stop...
}
View 3 Replies
May 21, 2009
Click the 'download picture' button on the lower left aligned movie.url...How do they bring up a save as box for the jpeg? I have searched high and low for a solution on how to make flash save a jpeg to your computer that is stored on a server. I can make it work with a zip file but when I try the jpeg I end up linking to another page.This is the code I currently use to retrieve a zip file if anyone wants it.[code]
View 1 Replies
Mar 18, 2009
Do you usually set the registration point in the upper-left corner ?I usually have always troubles with the registration point in the center.. or is maybe useful in any situation ?
View 1 Replies
Jan 18, 2010
Can I set a loader component to load a picture whit a middle align instead of top-left?
View 9 Replies
Sep 4, 2007
I have this picture which has the dimensions 5599x660 and it's kinda like a moving background, it's moving to the left.Now, when it reaches the end I want it to be replaced by the same pic.Stage size is 950x720.I came up with two possible options:
1. make a duplicate of the pic movieclip and place it on stage right behind the first one and then when the first one is off stage place it right behind the second one and so on...
2. have flash duplicate the pic automatically and place it right behind the original one (I read about that option somewhere I think it's called DuplicateMovieclip)[code]
1. it works, but after the first round - it goes through image 1 (img) then through image 2 (img2) perfectly and then when it's supposed to place image 1 right behind image 2 there's a space of about 100 pixels between them... I don't know why because I gave the right x coordinates in the code...
2. now when u still go on and u go through (the misplaced) image 1 (img) and then u come to the point where it's supposed to place image 2 (img2) right behind image 1 there's also a space between them but only maybe of 5 pixels.How come that with the same pictures with the same code for both of them it's doing something different both times ?
View 1 Replies
Aug 8, 2009
I once needed to pan a sprite full of movieClips (picture 1) which were draggable with no bounds so you could drag them up and left (higher than sprites registration point).
You could also drag them down and right and expand a sprite that way (as well) but that didnt matter.What did matter was how much is 'up' and 'left' from the sprite registration point so i can include that in my formula for panning.
This was easy to find, i just sorted my array of movieClips, sorted on x and sorted on y after each drag, and thats how i got my up and left points.
Now I am trying to do that same thing, exept my movieclips inside a sprite have a custom rotation (picture 2), so i also have an up and left point, except this time up and left are caused by rotations of movieClips inside a sprite... (and these are dragable as well with no bounds)
View 1 Replies
Jun 17, 2009
I seem to be having difficulty figuring out the code required for mouse over and scroll left to right. Basically, I have arrows either side of the window and I would my timeline to smoothly go to the left or the right when the cursor is over the arrow.
View 5 Replies
Mar 11, 2009
Basically I need to have a cartoon character walking to the right hand side of the screen and then turning around and moving back to the left hand side and so on.
I have some code done but it could be all wrong as I am not the best coder at all, just starting out.
Code:
package classes{
import flash.display.MovieClip;
import classes.RollableChar;
public class MainApp2 extends MovieClip{
//public var theCharacter:MovieClip;
//public var myCarrot:RollableChar;
[Code] .....
View 1 Replies
Mar 17, 2010
move picture according to mouse movement.
I have this picture moving based on mouse position. Can anyone tell me how to stop it from moving when the pic reaches the edge of the stage? On the example posted I can't stop it from moving, it goes all over the place.
This is the code I am using now.
Code:
// add listener to the stage to detect mouse movement
stage.addEventListener(MouseEvent.MOUSE_MOVE, scrollPictureLeft);
stage.addEventListener(MouseEvent.MOUSE_MOVE, scrollPictureRight);
stage.addEventListener(MouseEvent.MOUSE_MOVE, scrollPictureUp);
[Code].....
View 2 Replies
May 17, 2010
Ugh how to start...Each thumbnail image is a link which enlarges to an easel to the right with a neat effect. If you move the cursor over a thumbnail it has a little effect on it (very transparent "snow" like on a TV screen) I don't know why Flash keeps "moving" (if you call it that) the snow effect on top of the thumbnails when I open the file at a later time. All I remember doing is just editing simple text and swapping one bitmap thats not even tied to the thumbnails.
I can still click the thumbnails and they open to the right just fine. I just don't get why the "effect/link" moves on top of the thumbnails. If I delete the snow it deletes every effect on the website so they won't enlarge to the right. I don't care if I lose the effect but I don't remember/know how to make each thumbnail a link so they open on the spot I want.
View 3 Replies
Nov 30, 2005
On this site:[URL].. you navigate by moving your mouse over the picture.
How is that effect done?
Have anyone seen a tutorial och fla-file somewhere?
View 4 Replies
Aug 7, 2009
I'm having some troubles trying to scroll a container MovieClip across the stage.I've attached an EventListener to the stage to track the MOUSE_MOVE MouseEvent, but it scrolls in a weird way (when halfway the screen it shows about 300 px of the container, when going below the horizontal centre, it goes up and disappears from sight.This is my code:
Code:
private function moveHandler(e:MouseEvent):void
{
[code]....
View 2 Replies
Nov 16, 2010
I'm making a 3D room builder. The user places Sprites around the 2D stage and my script converts those Sprites to Papervision3D DisplayObject3D objects. I'm having problems with the 3D object positioning because Sprites have registration points at their top-left corner and 3D objects have registration points at their center. How can I make that conversion?ere's a scheme of how the 2 different coordinate systems work:
I've tried this code:
child3D.x = child2D.x;
child3D.z = child2D.y - child2D.y - child2D.y; // just to make it negative
[code]....
View 5 Replies
Apr 17, 2011
is it possible for the same actionscript 2 script to be working if its inside the frames frame frame when you get down to the point where it says LEFT RIGHT UPP DOWN?
View 0 Replies
Jul 11, 2003
I start with a question: how could I change the registration point of a movie clip created or loaded at runtime? I want to move the registration point from top/left to center.
View 2 Replies
Aug 14, 2003
I've got a scrolling image gallery which I have a zoom button that lets the user zoom in on the images... If they click on the stage, the scrolling stops. Now, if they try to zoom in, the image scales from the left side, since the images registration points are on the left side of the movie clip they're loaded into. This causes the images to shift right, but I want it to appear as if its a straight on zoom...
View 3 Replies
Apr 21, 2009
I have an image that's being moved like so:
Code:
mcSky.addEventListener(Event.ENTER_FRAME, moveSky);
function moveSky(evt:Event):void {
[code].....
View 1 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
Feb 13, 2009
i am trying to find out wether the mouse is moving to the left or to the right but i reckon by storing the old mouses location and updating the new postion and store this in a varaible if thats possible
to update and check the mouse x and y postition on the stage saw i can locate
wether the mouse is moving to the left or to the right .
mouse old postion to the mouse new postion
example by using a variable
mouse_old_xpos. _xmouse
mouse_new_pos
this want i tried
var mouseListener:Object = new Object();
mouseListener.onMouseMove = function() {
mouse_oldxpos = _xmouse;
mouse_newrightxpos = ""
[Code].....
View 7 Replies
Nov 20, 2009
I'm making a game in AS3 and I need to move an object from left to right using the keyboard, it works fine but the problem is that when i push left or right the object moves but not in a fluid way, I assigned to movement to KEY_DOWN but first it moves the ammount of distance i gave up then pauses for half a second and then I moves fluid in the direction i gave. Now my question is how do I need to program it so that when I push the button it move fluid in that direction immediately instead of taking a little pause?
View 2 Replies
Jun 5, 2010
I'm trying make a jumping animation move to the left when I click the left arrow key and up arrow key and don't know how. I'm new to AS, just sorta winging it.
[Code]...
View 0 Replies
Jan 12, 2007
I've got several small moveiclips moving around the screen to different locations using the tween class, and for some reason it leaves little red artifacts in their trail on the screen that won't go away. any way to refresh the screen or something? Is the only way around this to cache the movieclips as bitmaps?
View 3 Replies