Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Moving Movie Clip With Button



Hello AS wizards everywhere. Can anyone help with this. I have a movie clip which displays a very long horizontal line of thumbnail movie clips which will eventually have actions attached. Right now, I'm trying to find a way of moving the long line to the left or right by 165 pixels. The movie clip I want to move has an instance name "scrollalong" and is part of a movie calIed "scroll thumb nails". I wish to do this with 2 buttons residing on the main timeline called "go left" and "go right". Once I've got to a certain point with the "scrollalong" clip I want to disable the button action so that it won't move.thank you from a frustrated musician Map of Limbo



Adobe > ActionScript 1 and 2
Posted on: 01/05/2008 04:31:07 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Problem With Movie Clip Moving When The Mouse Passes Over A Button On The Clip
The swf in question calls up a series of ads. To change the ads the user clicks on the forward and back button. However, when you mouseover the forward and back buttons the controlBar goes a bit haywire (as a result of the mouseOut on it).

All the files are attached in a zip file. Thanks in advance for your help guys.

'Motion' & 'Still' Button For Moving Movie Clip
Glory!

I have a Movie Clip, in which a wheel is rolling constantly on it's own position.

Afetr having brought the Movie Clip on Stage, i gave motion to the rolling wheel by making it move from Right to Left on stage, through motion tweening. When the wheel is moving, as it's a rolling wheel movie clip, it looks as if the wheel is actually rolling back.

Now all that is good, there is one additional feature i want to put in.

I would like to include two buttons in the Movie.
One for "Motion" and one for "Still".

By default the wheel would be rolling backwards, moving along the stage. If a user Clicks on the "Still" Button, i want to make the wheel stop on it's position, i.e, not roll backwards on stage, but not stop the Movie Clip itself, i.e, it should keep rolling on it's own still position.

If a user clicks the "Motion" button, the wheel should then again start moving backwards from it's 'current' position.

What kind of ActionScripting is going to make this possible.

Supremacy,
Rahul S. Johari

Moving A Movie Clip With Button Script
I have worked it all out with easing and all with


ActionScript Code:
on (release) {     textbox:x_target = -450;     textbox:y_target = 0; }


but how do i keep moving with the same button?

eg an arrow which moves the target say 100 pixels?

I have don`t it before with a simple change of the button code but I have forgotton it!

Chhers

Byron

Moving A Movie Clip When A Button Is Held Down.
I have two buttons in my movie that move a movie clip up and down on my stage. the code in the buttons atm is as follows,

on (press){
if (this.pics1._y<-240) {
} else {
this.pics1._y = (this.pics1._y-10);
}

(this is just the down button)

This just checks to see if the movie clip has reached its lowest position and if it hasn't it movies it down by 10px.

What i would like to do it make is so when the button is clicked and held the movie clip moves down untill the button is released.

How could i do this?
(Im using Flash 8 with Actionscript 2)

Moving A Movie Clip With Button Script
I have worked it all out with easing and all with


ActionScript Code:
on (release) {     textbox:x_target = -450;     textbox:y_target = 0; }


but how do i keep moving with the same button?

eg an arrow which moves the target say 100 pixels?

I have don`t it before with a simple change of the button code but I have forgotton it!

Chhers

Byron

Flash Button Moving A Movie Clip Scroll
I'm trying to get a movie clip to scroll on a click of a button, I know I could do this in frames, but the issue is that the movie clip, which is a vertical scrolling, background highlight bar for the buttons, has to go to three different buttons on click of the button. So the the Movie Clip bar will be able to scroll, in a fixed position, to which ever button, on click of that button.

How Can I Make A Moving Movie Clip - Clickable - Lika A Button ?
Hi friends,

My name is IGX and I have a problem,

how can we make a moving movie clip - clickable - like a button (for game), and go to a specified frame as we wish ?

Change Direction Of Movie Clip/stopping Moving Clip
Hello everyone,
I cannot wrap my brain around this anymore. It's been sometime since I have done much actionscript but here it is:

Functionality:
I have the movie clip moving from left to right and once it reaches a certain point, it changes direction and goes back, infinitely.

I have a hitTest to check weather the mouse is over the target movie clip, if it is, the movement stops.


Problem1 - Movement:
When I mouseover the target movie clip it stops (hitTest=true) but the movement does not resume when the hitTest is false.


Here's the code:
var xchange=10;
holder_mc.onEnterFrame = function() {
//trace("x_pos: "+this._x)
//trace("xchange: "+xchange)
this._x += xchange;
if (this.hitTest(_xmouse, _ymouse, true)) {
xchange=0;
this._x += xchange;
}
else{
if(this._x > 0){
xchange=10;
xchange*= -1;
}
else if(this._x < -645){
xchange *= -1;
}
}
}//--------------------------------------
Problem 2 - CPU Resources
Also I have code on the individual movie clips within the target movie clip, they simply play frames forward and backward to enlarge a thumbnail. After a while the computer starts hating life and chugs. I know it is from the hitTest checking on each enterFrame and it eats up the resources. Is there a way to do this without the chug?

Here is the code that expands the thumbnails within the target movie clip:

stop();
this.onEnterFrame = function() {
if (rewind == true) {
prevFrame();
}
};
this.onRollOver = function() {
this.swapDepths(this.getNextHighestDepth());
rewind = false;
play();
};
this.onRollOut = function() {
rewind = true;
};

//----------------------

If someone could give me any insight into this problem I would greatly appreciate it.
Thanks guys,
I hope I've been clear.

Moving A Movie Clip From A Parent Movie Clip
Fellas..


I've played with Flash 5 and action script a few years back.. just getting back into it recently. This might be a noob question, but I'm having a hard time trying to search for a solution.



I'm putting together a silly little game (Flash 8) that involves a tank, or missile base (ala Space Invaders) with a rotating turret. The tank consists of 2 movie clips.. one for the base/treads which attaches the mBarrel movie clip to itself.

This is a hard one to describe, so please bear with me.

I've managed to have the turret 'look-at' the mouse cursor, so it's angle adjusts to aim at where the player has the mouse reticle.

I'm firing a missile, by using some thing this..


Code:
function FireRocket():Void {

// firing a missile with attachMovie
_level0.mPlayer1.mBarrel.attachMovie("mMissile_Normal",
"mMissile_Normal" + _global.nRocket,
_level0.mPlayer1.mBarrel.getNextHighestDepth(),
{_x:(_root.mPlayer1.mBarrel._x), _y:(_root.mPlayer1.mBarrel._y)});

}


My missile has a script that simply += it's _y.




THis works beautifully. A missile appears *right* inside mBarrel, and adopts it rotation, and by having the missile MC increase/decrease it's _y will send it in motion. I was originally planning on having to use matrices to have the fired missiles inherit the barrel's angle, but having the barrel movie clip call the missile movie clip worked amazingly well.

The thing is.. if I rotate the barrel (by moving the mouse cursor) ALL the rockets automatically change their angle along with the barrel.. as to be guided missiles per se.

How do I stop the missiles from moving along with their parent MC?


wheeew..

Movie Clip Button Inside Movie Clip Button Is Driving Me Nuts
hellllllo everyone, this thing has been bothering me for weeks, i've been hiding from it for days but it always seems to come back and bug me..
this is the problem..
on my main timeline i have a movie clip button that plays over/out state within this clip and on the over state it also opens 8 other movie clip in this movieclip that i am hoping to make them clipable, i only made an over state for the first movieclip out of the eight, but it just wont do the rollover effect..
i think there is a better way to do this..if i need to start over..let me know..thanks!!!

i will attach the file please help me out! i am tired of hiding!
thank you again!!!!!

Moving A Movie Clip?
Hello

I can not seem to figure out or find the answer to this.

I have a movie clip called 'ball'.

Ball starts out at x/y of 100,100.

I want to move ball to say 187,372 but fluidly not just disappear at one x/y and reappear at the destination x/y.

Anyone know how to do this?

Thanks

Moving A Movie Clip
This is really, really newbish..

Anyways, how does one "move" a movie clip? For example, I press the up key and the object moves a bit up?

Moving Around In A Movie Clip
I'm trying to jump to frame 100 of a movie clip (weltext) when i release a button. I can't get it to work.

on (release) {
_weltext.gotoandplay(100);
}

Moving My Movie Clip
im really stuck on some work at the moment and any help will be GREATLY appreciated.
right i have a long movie clip (in length ways not animation,its all in one frame) and i have a number of buttons and what i want to happen is that when i select one of the buttons the movie clip scrolls horizontally into a certain position.
so for instance the registration point of my movie clip is at axis x=100 where picture 1 is and then when i select button 10 (for picture 10, which is off screen) i want my movie clip to scroll so that the picture is onto axis x=100.

any help will be greatly appreciated
thanks

Moving A Movie Clip.
I am making a new movie with a menu system. All the content is in a movie clip. When a button on the menu is pressed then i need the movie clip to move smoothly to a certain position so that the content that is needed is visiable. I would usualy use motion tweens but its complecated when there is a menu because you would have to make a tween for every content bit to go to every other :S

Please could someone help me with the actionscript that is needed. Thanks alot!

-JAM

Moving A Movie Clip.
Hi people.

I can move a MC via actionscript which is loaded into a empty MC called Clip.I use a var called xpos to move the MC across the stage.
i call the MC via a button eg. When you click onto the button the page is loaded into the empty MC called Clip, then the MC scrolls from left to right and stops in the centre of the stage.
Promblem is when i click onto another button i want the
MC to scroll from the centre of the stage to the right then load a new page into the empty clip as before.
The buttons are on the main time line( _root).

How after the MC has moved from the left and then i call another page from a button, how do i get the MC to move to the right.

Cheers Dave....

Moving A Movie Clip Around
I am making a game where players can pick up objects and use those objects to unlock doors, chests, closets, etc. I need to know what would be the best and easiest way to do this. How can I make it to where the player can click an object on the ground, send it to the top of the screen as if it were in their "inventory", and then later use it to unlock a door. I've asked this question for the last 3 days and no one can seem to help me.

Moving A Movie Clip?
got a wide movie clip on the stage and on the press of a button i want it to go to certain X position on the screen, but i want it to move so many pixels per second, so it gives it a scrolling effect!

Currently im doing it on the timline but am encouting a few problems when coming to play it, so would like help on coding it using action script!

Thanks in advance!

Moving In A Movie Clip
Hi there!
Hope u all had a nice holidays!

I have a button in my movie clip. This same button is located down in my movie clip. Once this button is pressed, you reach another frame from the same movie clip but at the same hight of the button.
How could i direct the user to the top of the frame after pressing the button? And not keep the same "hight" of the button.

Cheers.
Leo.

Help With Moving A Movie Clip
I have three movie clips (home,menukaart,catering) when on (rollOver) of menukaart i would like to have catering move 75 pixels down, in order to have a sub menu appear from menukaart. And on release move back up agean.

I don’t have experience with scripting, I have tried all move function examples that i could find bat with no results. Could some one help me?

p.s. There are some other bugs that, you’ll see what I mean when you play the file.

Thanks in advance for all

Moving A Movie Clip
Hi folks,

I'm new to Flash and Actionscript and I'm trying to move a movie clip with the directional arrows, using AS 3.0.

The old code I had:

Code:
var speed = 7;

this.onEnterFrame = function() {
if (Key.isDown(Key.UP)) {
square._y -= speed;
}
if (Key.isDown(Key.DOWN)) {
square._y += speed;
}
if (Key.isDown(Key.LEFT)) {
square._x -= speed;
}
if (Key.isDown(Key.RIGHT)) {
square._x += speed;
}
};


The code is broken for AS 3.0 and I don't how to fix it.


Thanks in advance.

Moving Movie Clip
Hi all,

I have a movie with buttons in it that move a movie clip up and down. How do I make it stop moving up or down once it has reached the top or bottom?

Thank you,
Mike W.

Moving A Movie Clip
If I wanted a user to be able to move a movie clip around...what sort of code would I need to add to the movie's MOUSE_DOWN event listener?

Moving A Movie Clip With AS3
Hi, I am making a game with ActionScript 3.0 but I am having problems with moving the main character. All I am doing is having the main character be stationary and having the ground move below him (A topview game). I made the same thing in AS2 but I need to convert it to 3.0.
Heres a link to the game, http://randomflashgames.net/gamepages/stick.html

What I have now in AS3 is a listener that listens for a key down but it only works for one key at a time. I need it to be able to listen for 2 keys at a time to go diagonal. AS2 has this (To the best of my knowledge)


ActionScript Code:
If (KeyPress.KeyDown(Key.Left) == true){
   //Move the background giving the illusion of movement
}

Is there anything equivelent to KeyPress.KeyDown(Key.Left) in AS3?

Moving Movie Clip
Hi! Im having some troubles on a movie clip. Instead of making this movie clip frame by frame, I want it to keep moving, even when the moving is not playing, how do I do this?

Thanks

-Yut343

Moving A Movie Clip
Hi everyone,

I have a daft question which probably has an extremely simple answer but I am still a newcomer to flash. I wanted to do a trick where I have a movie clip and the user is able to drag the movie clip around the stage while holding down the mouse key. Any ideas? I have an idea but wanted to see what others thought?

Thank you

George

Moving Movie Clip
ok it's simple as hell but I can't seem to do it.
I have a movie clip I want to move back and forth between 200 pixels and 600... this is the code i scripted fomr scratch and it doens't seem to be working for me, it gets to 600 then drops below 600 and doens't slide back to 200. What can I do?

onClipEvent(enterFrame) {
speed = 3.5;

if (this._x>600){
this._x -= speed;
}
else {
this._x += speed;
}
}

Moving Movie Clip
Hi! Im having some troubles on a movie clip. Instead of making this movie clip frame by frame, I want it to keep moving, even when the moving is not playing, how do I do this?

Thanks

-Yut343

Moving A Movie Clip Randomly
Hi all,
my stage size is 550x400 and movie clip is about 20x20 now
i want this clip movie randomly about 5 pxiles from its position how can i do this.
what i did so for is
setProperty ("one", _x, random (5));
when i played that time this clip gose left side og the stage and playing randomly 5, but i need this to play exactly where iam placed in main stage.

Thanks for replay :-)

Naushad.Bangalore

Moving A Movie Clip Using The Keyboard
Does anyone know how to make it so you move a movie clip up, down, right, and left by using the keyboard? Any help would be awesome.

Moving A Movie Clip With A Rollover...
ok, I have an invisible button that I want to activate a movie clip with. When a rollover occurs I want the movie clip to move to the position of the mouse pointer, but over time, not instantly. I have tried several ways but I am a novice scripter and i would appreciate any help you can give. Thanks!

-rYan

Moving A Movie Clip With Buttons
I have a piece thats 720 x 486 that has buttons across the bottom of the page that will launch movie clips into a masked area to the left side of the page. The movie clips fall bellow a bar with two buttons which are arrows that point up and down. I want to tie the movie clip to these buttons so the user can scroll the clips up or down accordingly to view all of the info. Any good tutorials or advice would be appreciated -

Innersight

Moving A Movie Clip, While It's Running
I created a nice movie clip for a flash movie that i'm "trying" to design.

My question is how to I get the movie clip from one part of the stage to another smoothly (the clip is on a figure walking)

I still want the movie to play while the clip is moved from the right side of the stage to the center, so that it looks as if he is walking from the right into the center.

I've tried motion tweening it but tha doesn't play the movie as it goes.

Please help

Simple Moving Movie Clip.....
I have a few boxes (6 actually) lining in one line and i want them to move from right to left in an equal speed and non-stop moving...that's mean I want them to loop until I go next page.....how to do that......can someone help???

HLP: Moving A Movie Clip From Point A To B
hey guys..
I remember seeing a tutorial on this but I don't remember where

I have this button, on release I would like it to move a movie clip from point a to point b. If you could help me with the script please help.

-thank you

Moving A Movie Clip On Rollover
OK, well i have a set of buttons on the main page, along with a simple movie clip of 2 rotating arrows, i have the arrows appear when the buttons do, on the outside the "home" button to tell you that you are in the "home" section. Now there are 6 other buttons, and what i want, is that when your mouse runs over one of the buttons, the movie clip will jump down to the button your mouse is over. I cant get this to seem to work. This is the code i have that doesnt work:

on (rollOver) {
tellTarget ("blah") {
setProperty (blah, _y, -100);
}
}

blah is the instance name of the arrows movieclip. when i try to run it, it says, Target not found: Target="blah" Base="_level0.instance13.instance14.instance28" I THINK it might be that the button im using is in a movie clip, which is in ANOTHER movie clip, which is on the page with the indicator clip, so does it have to be in the same... 'area' as the button? please help if you can! I'm using flash 5. Thanks alot.
--Samsa--

Movie Clip Moving Across Frames
Hello all,

I've seen that it's posible to present a movie clip that moves acress frames or inside a web page.

Just take a look at: http://www.aviso-oportuno.com.mx

See the movie that reads GANATE EL NUEVO CORSA (it appears and dissapears a little bit fast so if you don't see it refresh the page)

So anyone can tell me How to do this? a web reference is also welcome.

Thanks in advance.

Moving Movie Clip Between States
Hi

I'm using Flash MX and I have 5 links on my website like this:

================================================== ============

ONE <<

TWO

THREE

FOUR

FIVE

================================================== ============

I wish to be able to control the arrows I have shown on the right of the text so that whichever number I click on, the arrows tween to that position, be it upwards or downwards.

Is there possibly a tutorial someone could point me two, or perhaps give me some assistance on this?

Thanks

Buttons In Moving Movie Clip
I have a movie clip that I'm moving along the X axis based on the location of the mouse - how can I make the buttons that are in that movie clip useable???

Cole

Buttons + Moving A Movie Clip
I want on rollover to change where the movie clip is. However, I don't wan the clip to just jump there, I want it to gradually get there.

I tried myMovie._x = myMovie._x + 5 but that didn't work as to plan. Any help, even pseudo code, is much appreciated. Im not exactly an expert on Actionscript yet, but I do understand VB programming and am working my way into C++/AS now.

Moving Actiosncript And Such To Another Movie Clip
Hello:
How would I go about moving a move clip with its 30 frames and the actionscript in it, and use it for a different movie clip. Like I want all the data but I want to transfer it to a new movie clip. I hope my question makes sense . Thank You

Moving Movie Clip With Actionscript
I want to move a movie clip using actionscripting. Except the action needs to go on a frame inside that movie clip. Say the instance name is MC1, I tried to put
_root.MC1._x-=3
to move the movie clip to the left, but obviously that's wrong.
Please help.
Thanks.

Moving A Movie Clip Inside Another One
MC moving an object
how can i move a MC inside a movieclip with an action for the main movieclip like this:

onClipEvent (enterFrame) {
// if the mouse is over mc...
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.movieclipinside._y += 200;
} else {
this.movieclipinside._y -= 200
}
}

***BUT IT DID NOT WORK.. WHY? WHAT WAS WRONG... I WERE THINKING ON A TRICK TO DO IT... I DID NOT GET WHAT CODE WRITE

SOMEBODY KNOWS??

I ATTACHED THE FLA.. WHERE I USED 2 FRAMES WITH THE MC INSIDE AND IT MOVES IN ONE FRAME TO A CERTAIN POSITION AND IN THE NEXT FRAME IT MOVES BACK, THAT'S WHY I USED THIS CODE:

onClipEvent (enterFrame) {
// if the mouse is over mc...
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(3);

Moving A Movie Clip Inside Another One
MC moving an object
how can i move a MC inside a movieclip with an action for the main movieclip like this:

onClipEvent (enterFrame) {
// if the mouse is over mc...
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.movieclipinside._y += 200;
} else {
this.movieclipinside._y -= 200
}
}

***BUT IT DID NOT WORK.. WHY? WHAT WAS WRONG... I WERE THINKING ON A TRICK TO DO IT... I DID NOT GET WHAT CODE WRITE

SOMEBODY KNOWS??

I ATTACHED THE FLA.. WHERE I USED 2 FRAMES WITH THE MC INSIDE AND IT MOVES IN ONE FRAME TO A CERTAIN POSITION AND IN THE NEXT FRAME IT MOVES BACK, THAT'S WHY I USED THIS CODE:

onClipEvent (enterFrame) {
// if the mouse is over mc...
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(3);

Moving An External Movie Clip
Hey guys! I am having a problem with loading an external movieclip through the following command being assigned to a frame: loadMovie("calendar.swf", "cal"); Note: The calendar.swf is the external movie while "cal" is the movie clip that I am trying to load it into...

Whenever I load it that way, the "calendar.swf" seems to be very messed up, meaning that most of its buttons don't work correctly. Basically this won't work, so I try to load the calendar.swf into a level_2.

Whenever I try and load the calendar.swf into a level (2 for example) it does not appear where I need it. Can somebody tell me how to move it to a correct place? Thanks a lot for your help!

I know that there is an easy answer to this, but I am lost...

Moving A Dynamic Movie Clip
I need some help with this...

I want to move a duplicated movie clip into another movieclip via actionscript 2.

as of now I've had to resort to exporting the clip I wanted and then using 'loadMovie' to get it onto the level I wanted it. there has to be an easier way!

thanks in advance.

Moving A Movie Clip While It's Playing
Is there a way to move a movie clip in code and still allow it to play?

The reason I ask is because I have a character that moves in the movie clip but whenever I use the keyboard keys to move the movie clip on _root, it stops his animation.

Suggestions?

Moving A Movie Clip Using Codes
Hello everyone. I am currently having a problem with the movement of a movie clip across stage, using codes.

Here is my scenario: I have a movie clip of a moon. I place it onto stage on a layer, at the top right hand corner of the stage. As the flash movie plays, I would like the moon to move from the top right hand corner of the stage, to the top left hand corner of the stage. It would be something like motion tweening, however the reason I do not want to use motion tweening is because I want my movie clip to move REALLY slowly. If I use motion tweening, the amount of frames needed would be huge.

I currently have the following codes, which places my moon at the top right hand side of the stage:




Code:
onClipEvent(enterFrame) {
dx = 750;
dy=130;

this._x = dx;
this._y = dy;
}
Does anyone know how I can move my move clip using actionscript?
Any help would be appreciated. Thanks in advance.

[F8] Moving A Movie Clip And Zooming Into It.
Hello guys. I am using Flash 8 and I have to make a small movie.

My stage is set to 250*250. I have an image 350*350 with 7 words on it. I need to let the image float around randomly but when a mouse is placed over one of these 7 "hot spots" it needs to zoom down on it. Then when the mouse moves away, it needs to zoom out.

I have tried (and all was going fine!) creating it by using tweens and various scenes for each word but the swf is getting too large.

I am a poor actionscripter and therefore I was hoping someone here would be good enough to help me. Im sure its got to do with setting on mouse over the xpos and y pos and height width. But I amnt sure how to do this. Ive searched the site and so far no luck. Please help me out if you can.

Thanks in advance,

khanrahan.

Copyright © 2005-08 www.BigResource.com, All rights reserved