ActionScript 3.0 :: Stopping Picture From Moving When It Reaches The End?

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


Similar Posts:


ActionScript 2.0 :: Moving Box Back To Xpos When Reaches Certain X Coord

Nov 2, 2006

making an object move from one side to another by using actionscript. so now i was wondering how to make the box get back into the same place as it started when it reaches a certain point.

dding the code to this AS i already got:

Code:
onClipEvent(enterFrame) {
speed = 5;
this._x += speed;
}

View 3 Replies

ActionScript 2.0 :: Moving And Stopping Objects?

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

ActionScript 2.0 :: [CS3] Stopping A Tween From Moving?

May 14, 2008

I have a yellow square that i am tweening along the x axis using the .tween class, however this animation starts as soon as the frame is loaded, i have tried several ways to make it start at a stationary position yet to no avail. The play control works so far and it does loop the animation like i want it to yet i just want the square to start at a stop.I also need a working stop button as i can only make it pause curently

View 1 Replies

ActionScript 3.0 :: Stopping Code When Moving To A New Frame

Feb 20, 2009

I'm trying to create a site based on flash.I have 5 frames that correspond to different links and then buttons created with functions to move to each frame using gotoAndStop. On one of those frames i'm loading an image gallery (which seems to be working); however when I click on another button to go to a new frame the images from the gallery stay.I would like for them to disappear when I go to a new frame.I think this is an easy fix but i've been stuck on it for three days.[code]

View 0 Replies

ActionScript 2.0 :: Moving And Stopping Movie Clips?

Jan 20, 2011

so basically i have 3 red cups which are movie clips and i got them to move but they move out of the screen and i want them to move at a speed and switch positions within each other.so how do i do this with coding ( actionscript 2.0 _

View 6 Replies

IDE :: Stopping The Mouse From Moving Over A Movie Clip?

May 15, 2009

how to prevent the mouse from moving over a movie clip, so that the movie clip in a sense has a boarder around it that stops the mouse from entering its area on the main stage.

View 1 Replies

ActionScript 2.0 :: Moving Picture To Different Coordinates

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

Professional :: Pictures Effect Keeps Moving On Top Of The Picture?

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

ActionScript 2.0 :: Navigate By Moving Mouse Over The Picture?

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

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

ActionScript 2.0 :: Flash Actions - Get The Picture Menu To Keep Moving And Not Just For The First Time When Click On The Arrows

Jul 25, 2010

I have got the banner on this webpage [URL] made from a guy in India but i want to add an additional feature. When i click the left or right button multiple times how do i get the picture menu to keep moving and not just for the first time i click on the arrows.. Is there some action script that i can include??

View 3 Replies

ActionScript 2.0 :: Make A Picture Gallery And Use Buttons That Move You From Picture To Picture And Backwards?

Apr 22, 2002

I want to make a picture gallery and use buttons that move you from picture to picture and backwards, but I don't want to tell button 1 to go to frame 2 and button 2 to got to frame 3 and so on (I hope you know what I mean)Can I use on button on a separate layer with the same action set? I tried something like that, but it didn't work:

on (release) {
thisframe =+1
}
[code]........

but it didn't work. I'm kind of new to any action script other than gotAndPlay, easy functions and all that.

View 2 Replies

Stopping Flv In A Slide Presentation When Moving To Next Slide

Jul 2, 2009

I am creating a flash slide presentation to use as part of an online portfolio. I have created a presentation that so far has three slides, each containing a flv that I imported and added a skin to.Is there any way to stop the movie on slide one (besides manually) when I move to slide two? I don't care if the mvie returns to the begining or not i just want to beable and view the video on slide two without hearing the sound from slide one.

View 5 Replies

ActionScript 2.0 :: Calling A Picture Into A Target In The Movie Without Placing The Picture Inside An Swf File?

Mar 22, 2003

I recently used the loadMovie action to load a .swf file to a target in the movie which it was being called from. Then I tried calling a picture to another target in the movie, but it did not load the picture as intended. I read about it on my book, but it didn't seem to work. Is there anyways on calling a picture into a target in the movie without placing the picture inside an swf file?

View 7 Replies

ActionScript 2.0 :: When Each Picture Loads The Loading Frame Resizes To The New Picture Size?

Jan 5, 2005

I have just been to a really nice website that has some really nice use of Flash on it.... I'm totally wowed by the resizing picture effect though? When each picture loads the loading frame resizes to the new picture size.

View 3 Replies

ActionScript 3.0 :: Build A Site That Would Give Users The Ability To Upload A Picture To A Picture Frame?

May 12, 2010

I am trying to build a site that would give users the ability to upload a picture to a picture frame on my site. I would like AS3 to dynamically re-size, and upload the file from an upload bar under the frame.

View 1 Replies

ActionScript 2.0 :: Resizing Uploads - When Each Picture Loads The Loading Frame Resizes To The New Picture Size?

Jan 5, 2005

I'm totally wowed by the resizing picture effect though? When each picture loads the loading frame resizes to the new picture size.It must be some sort of actionscripting but how is it done?

View 3 Replies

ActionScript 3.0 :: Flash Animating A Picture By Using A Script Need To Break The Picture?

Oct 2, 2011

I how that any Can help I have a Picture that I want To destroy it As someone break it as a glass and then something made it go back as she was

View 1 Replies

ActionScript 2.0 :: Drag Throw Scroller - Ease Into Place Stopping And Showing The Second Image Stopping The Image At X Axis 0

Feb 18, 2009

I want it to while still easing into place like the iphone does. For example my stage is 550px. The drag and throw MC is 1650. That's 550x3. If the first image is showing starting at x axis 0 and you drag to the left it will ease into place stopping and showing the second image stopping the image at x axis 0. And the same thing scrolling to the next one and scrolling back. So the code is below and I've attached the movie that I'm working on.

[Code]....

View 8 Replies

Actionscript 3 :: Stopping Sounds Without Stopping Bgm?

Dec 25, 2011

flash pro. as 3.0.animation . almost no codes except ends of scenes having :

import flash.media.SoundMixer;
if(SoundMixer.areSoundsInaccessible() == false)
{
SoundMixer.stopAll();
}

[Code]...

i got this scene, with this specific bgm , individual frame layer. and the sounds at another layer. what i want is to stop the sound without stopping the bgm . (yes, i know the above code wouldn't work as it stops all sounds)

View 1 Replies

Remove The Old Picture And Then Start Fading In The New Picture?

Dec 7, 2010

i got five images, and five buttons, every image has a color, and lets say we start at the red one. When i click the the green button i want the green image to fade in.. i fugured out a way to do this on the timeline, but then i have to have a black box first fading in to remove the old picture and then start fading in the new picture..

View 2 Replies

ActionScript 3.0 :: Make Every Picture Go To A URL When The Picture Is Clicked?

May 27, 2011

I made a simple picture slideshow with a timer, prev/next buttons, pause/play buttons and jump buttons. Everything went good so far.Now i'm trying make every picture go to a URL when the picture is clicked but only the link on the first frame goes to the URL when clicked the other 5 buttons do nothing when click.(FYI: I made alpha 0% buttons in a layer above pictures)I tried two different codes but both have no effect.

as layer

Code:
stop();
var nextImage:Timer = new Timer(3000);
nextImage.addEventListener(TimerEvent.TIMER,playNext);
nextImage.start();

[code]....

View 1 Replies

Flash - Calling The Function Within That Function And Later Stopping The Loop - Starting And Stopping Functions?

Jan 7, 2012

I am making a character walk. This code will make him wobble to the right and when thats done it will trigger him to wobble to the left and then call the function again to continue the loop.I can get the loop to work fine by calling the function but how do I STOP the function? Also I want to call it later on. Is there a way to start and stop a function?

function wobble()
{
var ws = .1;
var dis = 1;

[code]....

View 2 Replies

Actionscript 3.0 :: Regarding Picture Rollover Another Picture?

Jun 18, 2009

is some thing like i have a menu as the background, then if i click the picture, another menu rollover the background picture covering ard 40% of the background.any1 can lead the road for me >< me jus start learning AS3 ><

View 3 Replies

ActionScript 3.0 :: Making Beat Em Up - Character Stop Moving If The Attack Is Pressed And Once It Is Released Start Moving Again?

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

ActionScript 1/2 :: Associate Buttons With A Moving Moving Clip?

Jan 30, 2012

what i have is a tween on a movie clip of a popcorn kernel on one layer and a tween on a button on another layer to follow the movie clip. i want to be able to roll over the kernel and make it "pop". i changed my over on the button to popped corn (this works) but i want it to stay popped for the rest of the tween.

View 11 Replies

ActionScript 2.0 :: Moving Scene By Moving A Mouse Over Them?

Apr 22, 2007

I want to know how i can moving my scene by moving a mouse over them.

to understand what i want exactly ckeck this link :- [URL]

View 1 Replies

ActionScript 3.0 :: Trace The Value Of A Slider When It Reaches A New Value?

Nov 25, 2008

How do I trace the value of an slider when it reaches a new value? So that I can change other properties depending on what value the slider has.

View 1 Replies

ActionScript 3.0 :: Get Rid Of A Movie Clip When It Reaches The End?

Oct 19, 2010

I am placing and modifying a movie clip using actionscript, and I want to know how I can use an if statement with the movie clip ending. I tried using this. but it didn't work:

addChild(thing);
thing.width = (500/3)+25;thing.x = 225;thing.y = 250;trace(thing.totalFrames);if (thing.currentFrame >= thing.totalFrames){  removeChild(thing);
}
 
It plays and resizes the movieclip, but doesn't get rid of it(i.e. it keeps looping). I also noticed that when I just used removeChild(thing); without the if statement, it only removed the graphics, and not the sound.

View 9 Replies







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