ActionScript 2.0 :: Set And Then Reset X Boundaries?

Feb 3, 2012

I have been working with some code back and forth but am pretty much stuck now! I have four movie clips of different colored cars - two on the left side off the stage, and two on the right side off the stage. The clips move across the stage to the right and the left respectively. I have all the elements that I needed to get working, but now I am stuck because the animation only plays one time. I need it to play over and over again, never stopping. I tried to "reset" the _x boundary for each movie clip since they are in different starting locations, but have not been successful. Below is my code and I also attached a screen shot of how the clips are positioned so you can see how they will cross the screen.

Code:
var loop:Number = 0;
var messageTxt:TextField;
var mc_name:String;
function time():Void {

[code]....

View 9 Replies


Similar Posts:


ActionScript 3.0 :: Reset The Display By The Means To Start The Motion All Over Again (reset Button)

Jul 13, 2010

Just new in forum and just new in as3 programming. All i want to do is to make some physics simulations (i'm physics teacher...). So i made my first sim with the following code, just to simulate a simple motion with constant velocity. It works ok, except the part i need to reset the display by the means to start the motion all over again (reset button). Then the motion starts but the traces of the previous motion remains on stage. I tried the null command (sp=null) but the sim could not start again because the sp nedded to be non-null...

[CODE]...

View 2 Replies

ActionScript 1/2 :: Make A Reset Button And Add Script To It To Reset All Of The Drag And Drop Movie Clips?

Apr 13, 2011

I have an issue with adding a reset button to my drag and drop movie clips.The problem is, if a student drags a movie clip to a wrong location on the SWF file I want them to be able to hit a reset button that would take them the same SWF that they opened and what would showup would a clear page for them to restart their drag and drop exercise.I know how to make the button for this just want the proper action script to be able for user to start over with no movie clip symbols on the page.

View 3 Replies

ActionScript 3.0 :: Bg.reset() Can Only Find Reset Used For Timers?

Dec 28, 2010

reset in google yields only its use for timers.However I have code bg.reset() which I suppose puts the background back to the beginning of its timeline.

View 3 Replies

ActionScript 2.0 :: Reset All Variables - Command That Will Reset All The Variables In A Swf At Once?

Nov 25, 2009

With out getting into a ton of background I am wondering if there is a command that will reset all the variables in a swf at once with out having to do them individually?

I've googled and searched my books and can't find anything. Another option I could see is having the current flash reload, that would set everything back to the start but I couldn't find how to do that either.

Anyone know?

View 2 Replies

Loads The Clip Outside Of Those Boundaries?

Apr 14, 2009

i am looking to make something like this for my page.[URL].. i can do all the vid work etc.. the thing im stumped on is how can they resize the working area it uses eg.. where the presenter comes up.. because to start with the swf looks like its only tiny little play start stop thing then it loads the clip outside of those boundaries?

View 1 Replies

ActionScript 2.0 :: Drag A MC Within Set Boundaries?

Nov 3, 2011

What i am trying to do is move a MC around by dragging it, but i dont want the MC to move so far that it could be lost on the stage. i need some sort of parameters so that the MC is always showing. basically i have a large map of the united states and i want to be able to move it around and look at the individual states. the map is much larger than the stage and i am using a mask to clean up the appearance. i just want to make sure that the user cant move the map so far in one direction that it gets lost.

View 3 Replies

IDE :: Setting Boundaries On Zooming Map?

Jun 8, 2009

I am attempting to create a map that has the ability to zoom in and out as well as a click and drag feature.What I need help on is setting boundaries for the map. I can set them for the map when it is zoomed out, but they need to change as the map zooms in. I've been searching lots of forums lately to see if anyone can help, but no luck yet...

View 1 Replies

IDE :: Mc Follow Mouse With Boundaries?

Jun 1, 2010

I can't find any info on this so I guess I'll just ask. I'm trying to make moveclips that will follow the mouse pointer on MOUSE_OVER but only up to a certain distance then tween back to its original coordinates (preferably with a bounce or elastic ease).I tried startDrag(); on mouse over and that works quit cool but the problem is stopping the drag...

View 5 Replies

ActionScript 3.0 :: Rotating With Boundaries But With A Catch

May 8, 2009

I have a pointer that follows the mouse movement only in determined angles. lets say the pointer can only follow the mouse when the mouse is moving below the pointer. (it rotates perfectly and smoothly to the left and right) but the thing is, lets say that the mouse is now above the pointer to the right, the pointer stays to the last permited right/down angle BUT if i go down with the mouse from the left, the pointer obviously will jump from facing right/down to facing left/down...what i would like is the pointer to make a nice transition/rotation to the inverse side...just what it does when moving the mouse from left to right, right to left (having the mouse below the pointer).

[Code]...

View 1 Replies

ActionScript 2.0 :: Drag Within Custom Boundaries?

Nov 12, 2009

I am trying to create a movieClip that will always stay on a track. You get me, or have a lost you?Picture the London underground map, I want a little circle that will follow the track BUT also follow my cursor.So if I drag the circle to the right it will go to the right but always stay on track even if there are slopes or corners in the track.

View 3 Replies

ActionScript 2.0 :: AS 2 Image Scroll Boundaries

Nov 15, 2010

i've been trying to solve this for an hour now and I have to resort to a forum post. I don't understand why this isn't working.I have two background images that scroll up,right,left and down with arrow keys. They also scroll to the left while no arrow keys are being used.What I want is the background images to reach a boundary, so the player never leaves the background image and sees the stage.My background image x,y coordinates by default are: x(223.0), y(272.4)Just to see if my condition works, I have it move the wisp(player). However, even in the debug screen when it shows the Y coordinate of backround image go below 170, it never moves the wisp.

View 1 Replies

Make Boundaries On My Stage For My MC Box1_mc?

Dec 16, 2010

Im am trying to make boundaries on my stage for my MC box1_mc, there are no errors but it doesnt seem to work.. Here is the code..

function limitStageBorder(box1_mc) {
var box1_x:Number = stage.stageWidth - box1_mc.width;
var box1_y:Number = stage.stageHeight - box1_mc.height;[code]......

View 7 Replies

ActionScript 1/2 :: Set Boundaries For Magnifying Cursor

Nov 15, 2009

I have placed an image within a movieclip that I would like to zoom in on when the mouse passes over it. The zoom on the cursor is working, but the mouse remains a magnifying glass even after it rolls off of the zoomable image. I have tried putting the image and zoom code inside an swf and loading in it into a container via loadmovie, but the same problem with the cursor occurs.

[Code]...

View 16 Replies

ActionScript 3.0 :: Boundaries For Draggable Objects?

Jul 24, 2010

How can I make draggable objects not go off screen?

View 5 Replies

ActionScript 3.0 :: Movement Boundaries Big Movieclip

Nov 3, 2010

I have a big movieclip in a movieclip (bigger then the stage) when i roll over different movieclips the big movieclip moves, right now it just keeps moving when i keep the mouse on the movieclip/ I would like the movieclip to stop moving when its edge is about to leave the screen. I have no idea how i should do this, and all the tutorials i've found explain how to keep and object in the stage (this one is a lot bigger then the stage)

View 1 Replies

ActionScript 2.0 :: Create Boundaries For Clips?

Jan 5, 2005

I created a bubble clip, when u blow the mic it generates bubbles, problem is, because of the continous blowing, the bubbles gets more and more and this makes the movie lag, and as u blow more and more, the movie ultimately hangs... how can i refresh the movie so that the bubbles will refresh as it appears outside of the movie area or create a boundary where it goes back to 0 when it goes over the height of movie, i tried using the 'creating snow flakes' tutorial but it doesnt work

View 5 Replies

ActionScript 2.0 :: Mouse Follow X Within Set Boundaries

May 14, 2005

Not sure how to explain this, but I have a horizontal menu, and a small image above it that follows the mouse, within it's set boundaries. The only thing I have trouble with is getting it to stop right above the button when it's clicked, and wait for the user to move over the navigation menu again before it starts following the mouse... So, when a user clicks on a button, the image should stick there. I had the idea to have a transparent area above the nav that would detect for the mouse? Because right now, your mouse can be anywhere on the page, and this image scrolls right or left. How to set that up?

Here is the code I have on my image mc (called 'niteLite')... it's in the root (my navigation is in another mc though - couldn't get the mouse follower to work right within another mc, unfortunately)... On niteLite (image mc)
Code:
onClipEvent (load) {
_x = 347;
_y = 497;
speed = 2;
} onClipEvent (enterFrame) {
[Code] .....

View 2 Replies

ActionScript 2.0 :: Set Up And Down Boundaries For A Vertically Scrolling MC?

Jul 8, 2005

How to set the up and down boundaries for a vertically scrolling MC?

I have the up/down buttons working fine - the mc scrolls both ways vertically but doesn't stop in either direction.[code]...

View 1 Replies

ActionScript 2.0 :: Top Down Shooting Game - Boundaries

Nov 23, 2005

I've been making this space shooting game but I'm having problems getting boundaries to work. I've read tutorials and done lots of searching here and couldn't get anything to work... On the main time line, there's 2 layers. One with the ship, and one with the background (both are movie clips). Inside the background movie clip, I'd like to add boundaries, almost as complex as a maze but not so restricting.. as in, a path to fly through that'd probably be as wide as the screen itself. Here's what I'm trying to work with. Use the arrow keys to move, space to shoot, and press control to toggle between fixed camera and fixed ship modes.

View 1 Replies

ActionScript 2.0 :: StartDrag And Setting Boundaries?

May 14, 2006

I have a movie clip that can only move to certain parts in the stage. For this I used another movie clip that supposedly should constitue the rectangle constraint. But this doesn't seem to work !startDrag(this,true,bounds._x,bounds._y,bounds._x+ bounds._width,bounds._y+bounds._height);

View 2 Replies

ActionScript 2.0 :: Click To Move Boundaries?

Mar 26, 2008

how to move a movieclip with a mouseclick [URL]

I was wondering how to make boundaries E.g theres a wall if i click on the wall the movieclip cant go through the wall

View 1 Replies

ActionScript 2.0 :: Motion Boundaries On Rollover

Sep 15, 2008

I've been a longtime reader and lurker but have only just felt confident enough with my flash skills to post here and contribute. I've been trying to migrate my tween animations over to AS and I've run into what is most likely an easily explained roadblock.

Currently I am making a nav bar that has 7 buttons and a floating movieclip that moves from its point of origin over the button upon rollover. All of the buttons are in a line on the x-axis. I'm using if statements to generate the boundaries and guide the clip over the appropriate button. On rollout, the clip returns to it's origin. For some reason, my conditionals aren't working, and on the second mouseover, there is a jitter and the clip jumps back and forth rapidly. I assumed it is because the leftover onEnterFrame is still operating, so I added the delete command, but this did not work either.

[CODE]...

View 1 Replies

ActionScript 3.0 :: Rendering Outside Stage Boundaries?

Feb 26, 2011

I realize there have been a number of other threads on this subject, but none of the solutions seems to be working for me.

I am developing a flash file, that will dynamically load other swf's and play them on screen, but the loaded swfs are displaying things outside of their stage boundaries. I had limited success setting up a custom mask, that masked off all areas outside of the loaded swf. The problem is that when the loaded swf adds dynamic content to the stage, the new content ignores the mask.

View 3 Replies

ActionScript 2.0 :: Creating Boundaries For Clips?

Jan 5, 2005

i created a bubble clip, when u blow the mic it generates bubbles, problem is, because of the continous blowing, the bubbles gets more and more and this makes the movie lag, and as u blow more and more, the movie ultimately hangs... how can i refresh the movie so that the bubbles will refresh as it appears outside of the movie area or create a boundary where it goes back to 0 when it goes over the height of movie, i tried using the 'creating snow flakes' tutorial but it doesnt work

View 5 Replies

ActionScript 3.0 :: Cursor Boundaries Within A Flash Document?

Apr 13, 2009

I made a custom cursor in flash using AS3.0, but I only want it to appear in a certain spot on the flash banner I made. Basically, it will be hovering over an image, but throughout the rest of the area I want the standard cursor

View 2 Replies

ActionScript 2.0 :: Setting Boundaries For Mc With Random Movement

Aug 2, 2009

I'm a noob on this forum & pretty desperate now. I've been on a research & trial&error odyssey for days now, but this problem remains unsolved. I am creating a game with an mc (say "target_mc") randomly moving around. Everything is working beautifully, except for one thing: My stage was initially 900x600 and the game took up all of that space. target_mc's movement was accordingly set for a width of 900 and height of 600.

I have now resized the stage height to 958 with the game (still 900x600) being centered vertically. The top border is now at 170.8 (y). The bottom y border is at 770.8. But target_mc still thinks the top border is at 0. As a result, it is still covering the same area as before, hence floating off the actual game area into the stage margin area between 0 and 170.8. As I have other frames following which require my new and larger stage size, going back to the original 900x600 is not an option.

I have tried and tried but not managed to tell target_mc to keep its random movement within <=170.8 and >=770.8. I have tried all variations of "if statements" and other tricks at my disposal. And since I'm not an expert, I'm at my wit's end. Everywhere I looked, the solutions offered were for draggable objects or cursor movements, but not for movieclips moving randomly as soon as the frame is loaded. My script & codes are very, very elaborate and there is a lot happening on the stage, so a mask is not an option for me. Surely there's got to be a way to set variables and commands in the script...? I just don't know which to go for...

Do I work with some kind of math involving the total stage height of 958? I have tried setting variables for xMin, xMax, yMin, yMax, but must have done something wrong in implementing them in the rest of the random motion code cos nothing worked.

View 3 Replies

ActionScript 3.0 :: Rotating Drag And Drop - How To Set Boundaries

Jun 1, 2010

I know how to set boundaries for a drag and drop, but is it possible to have one of corner of an MC stay anchored, thus forcing the mc to rotate around it like the hands on a clock? (I only need the MC to rotate about 90 degrees).

View 5 Replies

ActionScript 1/2 :: Set Boundaries To Find A Mouse Position?

Sep 25, 2009

I'm stuck trying to define the y mouse position inside a mask.How does one set boundaries in which to find a mouse position?

View 1 Replies

Professional :: See Stage Boundaries Within Symbol Edit?

Jan 17, 2010

Sorry for lack of terminology but I want to create movie clips with moving graphics or objects and so want to see the boundaries of the stage. At present the whole area is filled with my stage colour. A setting somehwere?

View 1 Replies







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