OnMouseOver MovieClip Move Slowly
Hello,
I am trying to create a slideshow and when the user hovers (rolls over) a down arror, the slideshow gradually moves up or down.
I've attached the file, does any one know I can get the slideshow of images to move slowley?
Cheers, Rob
FlashKit > Flash Help > Flash ActionScript
Posted on: 01-26-2004, 08:42 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Move MC Slowly Using SetProperty
Im trying to figure out how to move a movie clip on it's y axis using setProperty, without the move happening all at once. I'd like the clip to move slowly.
Can someone help me out with the actionscript I need?
How Do You Make An MC Move/shift/turn Slightly Onmouseover?
Hello,
Here's the scenario:
I have a box inside an MC. I'm trying to have it just rotate slightly and return to original angle maybe with a 'bounce-back'.
The idea is to make every movieclip on the site act in this way, to add a little flare
I've tried different things, but the problem is to return it to the original position.
Of course I'm trying to achieve this using actionscript only.
I would really appreciate it if you woud point me in the right direction. I'm a fast learner
Any help is greatly appreciated!!!
Cheers,
/Flip
I Need To Make This Txt Scroller Move Onmouseover, Not Onclick - Help Needed
I have a text scroll box that is moved by an up and down arrow, but you have to actually click it for it to scroll. I'm wanting to set it up to where you just mouse over the arrow and it scrolls automatically. I just downloaded this text scroller, so I'm not sure what to edit in the script. This is what the buttons currently say:
up arrow:
onClipEvent (enterFrame) {
if (_parent.lPressed=="1") {
_parent.gotoAndStop(_parent._currentframe-1);
}
}
down arrow:
onClipEvent (enterFrame) {
if (_parent.lPressed=="true") {
_parent.gotoAndStop(_parent._currentframe+1);
}
}
any suggestions?
It's static text that is moving as well as a layer of graphics. Here's a screenshot of the scrolling movieclip if that helps at all: http://www.nlgraphics.com/screenshot.jpg
Can I modify the code that I currently have in place, or would something totally different have to be put together?
Any help is appreciated.
Moving Mc Towards The Move Slowly Towards The Mouse
Hiya newbie here
I just want to know how to move a movieclip towards the mouse slowly.
i have used this code to get the mc to the mouse, but i am stuck on how i make it move slowly towards it.
please help
thanks
onClipEvent(enterFrame){
this._x = _root._xmouse;
this._y = _root._ymouse;
}
Moving Mc Towards The Move Slowly Towards The Mouse
Hiya newbie here
I just want to know how to move a movieclip towards the mouse slowly.
i have used this code to get the mc to the mouse, but i am stuck on how i make it move slowly towards it.
please help
thanks
onClipEvent(enterFrame){
this._x = _root._xmouse;
this._y = _root._ymouse;
}
How To Make The Object Move Back Down Slowly?
ok you know when on a button it may "move up" or somthing and then you get off the button and it pops righ back into place.. how do u make it move slowly and fluently back to the posision.. liek if the is a block and then you but the mouse over it and it moves slowly taller then you take it off of the button and it slowly moves back to the orignal state? what code do i need for this...?
How To Make An Object Move Slowly Then Stop ;_;
Hello,
This is my first time to post here.. and am new to Flash ^_^;;
ummm.. i want to make an object that moves horizentally in a movie clip..but I dont know how to make it move slowly then gradually stop..! I tryed playing around with the ActionScript ..but no luck ;_; plz help..
Thanks Alot..
OniHime
Script For Cartoonified Animation (Move Head Back Slowly)
Hi People,
Iv'e done most of this little animation but i came to a problem. When i move away from the targeted area with the cursor the head just moves quickly back to the default area. BUT what i want it to do is when the cursor is out of the targeted area i need the head to move back to its original space slowly. If this is possible? Any help i would be highly grateful!
As seen in the attachment.
Thanks for all your help!
Carl Taylor
Script For Cartoonified Animation (Move Head Back Slowly)
Hi People,
Iv'e done most of this little animation but i came to a problem. When i move away from the targeted area with the cursor the head just moves quickly back to the default area. BUT what i want it to do is when the cursor is out of the targeted area i need the head to move back to its original space slowly. If this is possible? I'd be highly grateful for any help!
As seen in the attachment.
Thanks for all your help!
Carl Taylor
OnMouseOver Used With A Movieclip
I'm trying to keep all of my code on the timeline (not on a button). Is there a way to use onMouseOver on the timeline, or do I have to use hitTarget or an if/then with x/y coordinates?
Thanks.
Rotating A Movieclip OnMouseOver Help Please
Hi there,
I want a simple effect. When you rollover a movieclip, it rotates. when you roll off it, it stops rotating. But when you roll off, I don't want it to go back to it's start point - I want it to just stop in it's tracks. So then when you rollon to it again, it carries on rotating from its last position - not from the start again.
I have looked all over the net (google) - and I can find rotate AS. But not one slightly more complex with rollon and rolloff added. Trying to nut this one out, but i'm really newb.
Please help
Shaking MovieClip -- OnMouseOver
I have this code on a movieclip
ActionScript Code:
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_global.disable = true;
if (this._currentframe<this._totalframes) {
nextFrame();
}
} else {
_global.disable = false;
if (this._currentframe>1) {
prevFrame();
}
}
}
Basically when you rollover the mc it moves so far and when you rolloff it goes back to its original point. the only problem I am having is when you roll over the top of it when its in its original position it shakes. I have it in a mask but is there something in the code I am not defining?
Activating A Movieclip Onmouseover
What I want to do is:
I would like to have a button (I know how to do this), and when the user mousesover the button, I want a movieclip to be activated.
So:
When user mouses over my home button, my home_ani clip will be accessed. I would want to goto the frame 2 and play of that movie clip.
Activating A Movieclip Onmouseover
What I want to do is:
I would like to have a button (I know how to do this), and when the user mousesover the button, I want a movieclip to be activated.
So:
When user mouses over my home button, my home_ani clip will be accessed. I would want to goto the frame 2 and play of that movie clip.
Moving A Movieclip Slowly
I have a movieclip in my flash movie that is set to drag on a mouse press. When it is released it snaps back to the specified
x and y coordinates. I want the movement to be slow and not to fast. Is this possible?
Code:
shania.onPress = function() {
shania.startDrag();
};
shania.onRelease = function() {
stopDrag();
shania.swapDepths(0);
shania._x = 434.1;
shania._y = 224.6;
shania._alpha=20;
};
AS3 Movieclip Moving Slowly
I have a game where the FPS are calculated on an On Enter Frame event...
and I have another event that listens for key presses (other for mouse events... but all are disabled...)
And I have game tiles loaded onto a movieclip in the following order...
Flex2Canvas.rawChildren.addChild(map);
map.addChild(thetilecliphere); <- that part is looped alot...at the start to generate the tiles
And then I go and press the down button, and move 'map'... and the game FPS drops from 40 to 10... so i moved the canvas, and it still droped... but nothing moved (strange), and then i went child by child moving them, and it moved again, but still the 10fps...
I tried cacheAsBitmap... and nothing... I would post the code, but with all the stuff inbetween it... it's like 700 lines long.... i'm giving a general over view... Is the problem based on the fact that I'm using the flex canvas to work off of?? Is there any way I can do my own 'canvas' like mc... that falls under the canvas, and before all the GUI? I tried adding children to the canvas and it didn't work.
MovieClip Run Slowly After Resize
Please help.
After resizing my MC(to 800x600 from 1024x768) with (_with and _height) to stage which contain an image than, effect(_alpha) applied to this MC runing too slow.
Unless resize work fine.
How To Move An Object Slowly And Smoothly From Location 1 To Location 2?
Hi,
I am new to ActionScript. I wish to use ActionScript to move an object slowly and smoothly from location 1 to location 2.
I learned that I can use the following to move an object to location 2 (x2, y2):
mThisObject.x = x2;
mThisObject.y = y2;
However the object just "swift" from location 1 to location 2, not moving slowly and smoothly from location 1 to location 2.
Could some experts here provide a guideline for me?
Thanks and best regards
Alex
Flash Component Loads Slowly Or Renders Slowly
Hi,
Does anyone have a problem with flash 8 components loading very slowly. I have a mainmovie page that loads other .swf files into a movieclip. The sub movie has got flash 8 components, basically, 4 buttons, 4 datefields, one combo box, one menu bar and one datagrid. When i load the sub movie into the mainmovie, the components flashes for a second and then shows the components. I use a moviecliploader as well to hide the loaded movie and only after it's loaded then show the loaded movie, still the components flash.
Any ideas as i have been trying to solve this for about 5 hours now. Any help much appreciated.
Thanks
On Mouse Move, Move Movieclip Behind Mask
people,
an example of my wanted work is on:
www.boss.com
(check an item in the collection)
the photo exactly scrolls behind the mask, how to do this?
i want to implement this, please help?
THNX already!
Move Movieclip Vertically On Mouse Move
Hi, i wondered if anyone would be able to help me.
I want to create the same effect as what is used on the URL below
http://www.jobescalator.com/vacancie...ctive_map.html (scroll over the map)
I want a horizontal bar to move up and down the page as and when my mouse moves.
Can anyone help?
Thanks
On Mouse Move, Move Movieclip Behind Mask
people,
an example of my wanted work is on:
www.boss.com
(check an item in the collection)
the photo exactly scrolls behind the mask, how to do this?
i want to implement this, please help?
THNX already!
Drag Movieclip To Move Another Movieclip
Hi,
I'm praying someone here can help me with this problem.
Please see http://www.vrwebdesign.co.uk
Please click and drag the mouse, I would really like this to control the panorama on the monitor screen. All the project is in the same flash file.
What i need to do is drag mouse_MC and log how far along x and y it has travelled then minus or plus that from the original x and y position, to work out how much pan and tilt to give the panorama movieclip.
How can i determine which way and how far the mouse has been dragged, and based on that information, execute a function ?
panorama.pan = oldX - mouse_mc.x;
Thats what i am having trouble coding.
I would be eternally grateful to anyone who has advice on this matter.
I can upload the fla if anyone wants to get more hands on...
Best wishes and thanks,
tom
This["movieclip"+i].startDrag() + Possable To Move A Movieclip To _root?
well, the headline says it all
soory if this is a noobish question, just started with flash, but anyhow, here's the code:
ActionScript Code:
</p>
<p>onClipEvent(load) {</p>
<p> sail_mc.gotoAndStop("blafre");</p>
<p> var i:Number = 0</p>
<p>}</p>
<p>onClipEvent(mouseDown) {</p>
<p> onPress = function() {</p>
<p> //copy if "main" movieclip</p>
<p> if(_name == "yellowboat_mc") {</p>
<p> i++;</p>
<p> duplicateMovieClip(this,"yellowboat_mc"+ i,i)</p>
<p> startDrag(_root.yellowboat_mc["yellowboat_mc"+ i],true)</p>
<p> }</p>
<p> //else drag it</p>
<p> else {</p>
<p> startDrag(this,false)</p>
<p> }</p>
<p> }</p>
<p>}</p>
<p>onClipEvent(mouseUp) {</p>
<p> stopDrag()</p>
<p>}</p>
<p>
as you probably have guessed, its a main boat, under a draggable menu. When i press this boat I want it to copy itself, and then drag it. If it's not the main movieclip, simply drag it.
i allso have another problem, as all the copied boats will follow the menu as it is draggable, is it any way to move the copied boats to _root timeline?
excuse my bad english, and thanks at advance
PS:thanks for great site, evrything ive learnd so far, is from here
Using One Movieclip To Move Another MC
The challenge in MX:
I need to create a movieclip that if I slide it one way (x axis) would increase the Alpha of another MC (ie. An image) So If I slide the movie clip left it would increase the visibility of a faded movieclip and likewise Right will decrease it.
anyone?
thanks
Move A MovieClip
Is there some way to move a movieClip from one parent to another? I can view the target but there seems to be no way to actually define it.
I want to move:
/pages/page1/this_movie_clip
to here:
/pages/page2/
Move A Movieclip....
This is the scene:
I have a little circle (mc) on the stage (instace name = mc1)
what I want:
I want the mc1 to follow a line on the stage when I push a button.
But Im confused about how to structure it because I want the mc1 to follow another line if i push another button.
fx.
If I push button 1 - the circle follow path/route A - B
if I push button 2 - the circle follow path/route B - C
Can it be done without motiontween, but just a script ?
can anyone give me a hint about how it can be done ? please..
Move Movieclip
HI ,
i got script for drawing pie.... from Net ......
and i modified....some ...
here its.....
ActionScript Code:
CircleSegmentTo = function (target_mc, x, y, a1, a2, r, dir) {
trace("in seg");
dir = (dir == "CCW") ? -1 : 1;
var diff = Math.abs(a2-a1);
var divs = Math.floor(diff/(Math.PI/4))+1;
var span = dir*diff/(2*divs);
var rc = r/Math.cos(span);
target_mc.lineTo(x+Math.cos(a1)*r, y+Math.sin(a1)*r);
trace([x+Math.cos(a1)*r, y+Math.sin(a1)*r]);
for (var i = 0; i<divs; ++i) {
a2 = a1+span;
a1 = a2+span;
target_mc.curveTo(x+Math.cos(a2)*rc, y+Math.sin(a2)*rc, x+Math.cos(a1)*r, y+Math.sin(a1)*r);
}
return this;
};
var divisions:Array = new Array();
divisions.push({p:.025});
divisions.push({p:.025});
divisions.push({p:.05});
divisions.push({p:.05});
divisions.push({p:.05});
divisions.push({p:.5});
divisions.push({p:0});
divisions.push({p:.3});
_root.createEmptyMovieClip("_mc", this.getNextHighestDepth());
_root._mc._x = 200;
_root._mc._y = 200;
var a1 = 0, a2 = 1, radius = 100;
for (var i = 0; i<this.divisions.length; i++) {
a2 = a1+this.divisions[i].p*Math.PI*2;
trace([this.divisions[i].p, this.divisions.length]);
if (this.divisions[i].p) {
_root._mc.createEmptyMovieClip("sub_mc"+i, _root._mc.getNextHighestDepth());
_root._mc["sub_mc"+i].lineStyle(1, 0x00FFFF, 100);
_root._mc["sub_mc"+i].beginFill(0xFF0000, 100);
CircleSegmentTo(_root._mc["sub_mc"+i], 0, 0, a1, a2, radius, "CW");
_root._mc["sub_mc"+i].lineTo(0, 0);
_root._mc["sub_mc"+i].endFill();
}
a1 = a2;
}
for (var i = 0; i<this.divisions.length; i++) {
_root._mc["sub_mc"+i].onPress = function() {
this._x += 30;
this._y += 30;
};
}
i want to pie move away. in one click and to join on another click......
Movieclip Move
the problem is move function is only working on the last attachmovie clip.
the code is following:
attachsushigraphic = function (num) {
for (var i = 0; i<num; i++) {
temper_X = randRange(30.5*i+10, 30.5*(i+1)); //to get a random number function
this.attachMovie("sushigraphic", "sushigraphic"+i, this.getNextHighestDepth(), {_x:0, _y:0});
sushigraphicmovein(this["sushigraphic"+i], temper_X);
}
};
sushigraphicmovein = function (_mc, Next_X) {
onEnterFrame = function () {
_mc._x += (Next_X-_mc._x)/5;
};
};
attachsushigraphic(9);
please help to figure out:::::thanks in advance.
Edited: 11/19/2007 at 03:48:59 AM by bingjie2680
Need Movieclip To Move Up And Down
Hi everyone,
I have a movieclip on the main timeline and would like it to move very slowly up and down on a continuous basis. I'd like to use actionscript to do this instead of tweening on the timeline. The only actionscript I can think of that might work is using the _y property but I don't know how to construct the full actionscript to make it work. Can someone help out?
Thanks for any help offered.
Move Movieclip
I have two clips a slider called bar and circle called ball. I want ball to move as the user is using the vertical slider. The bar_mc is locked on the y axis and the ball_mc is locked on the x axis. The bar_mc is a slider (pan) control. When use it will move/control the ball_mc. I need help to achieve this.
Attach Code
ball_mc._x = 35;
ball_mc._y = 36;
bar_mc.onPress = function() {
startDrag(this, true, 475, this._y, this._x, 112);
};
bar_mc.onRelease = function() {
stopDrag();
};
Edited: 02/12/2008 at 11:08:28 AM by jamestparker
Getting A Movieclip To Move With Another?
i have a movieclip (mc1) that i am resizing with a tweening.prototype with easing effects and stuff... what i want to do is have another movieclip (mc2) to always position itself to the bottom right corner of mc1.. kinda like a mouse trailer but instead of mc2 following the mouse it follows the corner of mc1...
any help would be great...
thanks
Move A Movieclip
Hi I am just learning Flash MX 2004 and was playing around trying to move a movieclip with action script. Could somone look at the attached file and let me know what I did wrong or did inot do.
Move Movieclip
I am trying to make the movieclip move to the right then when it gets to the end of the stage go back to the left. I tried different codes but still lost. here is the code I am using:
on (release) {
this._x = this._x+5;
if (this._x>=550){
} else (this._x =this._x-5);
}
I am trying to make it go 5 pixels on(release) and the back 5 pixels on(release)
when it gets to the edge of the stage.
Move A Movieclip
I would like my movieclip to move to a certain y coordinate, and stay there. For now I have two buttons that will tell the movieclip to move to a different y axis. I've attempted to tweak the actionscript, but since I'm kind of new with actionscrpt. Could somebody please help me.
I really appreciate it!!
Move Movieclip Towards X, Y
ok, this has been doing my balls in all frikking day. im hot, im sweaty, im tired and i really need a beer.
i am trying to create a game, with a ship, the ship chases the mouse, but i am trying to make it fire bullets when i click the mouse.
I cna get the bullets up fine, and i can make them move manually but i cant for the life of me figure out a way to make them head towards the mouse pointer (but do not chase it) and beyond. I DO NOT WANT THEM TO 'EASE', i want them to move at a CONSTANT rate. i have tried using mathematical formulas to create an x/y coords which failed, i have tried playing with a circle but failed, i have tried to create a dummy movieclip then move to that but that also failed and i have spent atleast 4 hours searching google for ANYTHING of use but nothing. is it just getting to me and im not seeing the obvious??. im sorry if this sounds ranty but.. STRESSED!!!
any formulas, links to guides, hints, etc. would be highly appreciated!!
thanks,
Spatty
Getting A Movieclip To Move With Another?
i have a movieclip (mc1) that i am resizing with a tweening.prototype with easing effects and stuff... what i want to do is have another movieclip (mc2) to always position itself to the bottom right corner of mc1.. kinda like a mouse trailer but instead of mc2 following the mouse it follows the corner of mc1...
any help would be great...
thanks
Move A MovieClip Into Target
Can you move or load a movieClip that is already on the stage into an exsisting movieclip also on the stage?
Thanks
Move Position Of A Movieclip
I have a movieclip at main timeline named mc and I put some code at 1st frame like this
loadMovie("small_test1.jpg","mc");
mc._x = 20;
mc._width = 25;
but it not working correctly.
I want to load some picture in target movieclip then resize and move it to new position. can someone tell me how I do.
Thanks.
Move A MovieClip Up To The Top Layer
I have a movie clip displaying thumbnails. When the user hovers over the thumbnail, it enlarges. I want the movie clip to be on the top layer when it enlarges. Then when the user moves away...it should go back to its original position. Is this possible?
How Do I Get My Movieclip To Move To A New Position?
I've got a series of buttons, each of which (onRelease) need to tell a movieclip to move to a new xy position. I can get the movieclip to jump to its new position, but is there a way of getting it to make a smooth transition to its new position over 2/3 seconds?
I'm not very advanced so go easy! Thanks.
(using FlashMX)
Move Movieclip Diagonally
Hi,
All I want to do is move a MC diagonally from one point to another. I can do it along the x and/or y coordinates, but never in a smooth diagonal motion to a specific point.
Here's my code (obviously wrong!). Any help would be much appreciated!!
function moveLPdown(Void):Void{
laptop_mc.onEnterFrame = function() {
speed = 6;
laptop_mc._x -= speed;
laptop_mc._y += speed;
if (this._x>=190 && this._y>=220) {
this._x=221;
this._y=191;
delete this.onEnterFrame;
}
}
}
Thank you!!
Move Timeline In A Different Movieclip
I have a button with a roll over that I want to move the timeline in a different movie clip. I've tried:
on (rollOver) {
gotoAndPlay("over");
_root.intro.cross and circles.circlemovie.button2.gotoAndPlay(1);
}
But that doesn't seem to be working.
Any ideas?
Thanks.
MaxHeight
Movieclip Move Not Smoothly
Is it because too many frame inside? I tried to use 2 movie clip to load in different layer. But they load very slowly when the scene load them. Then I delete one of it. The movieclip load ok. Do anyone what happens with it?
[MX] Buttons To Move A Movieclip
Hi and seasons greetings fellow FK'ers.
Really showing my lack of know-how here but a little stuck, and I am sure what I am wanting to achieve is relatively easy to do.
First off, my .fla can be found here (it's around 3.5Mb I'm afraid due to a large panoramic jpeg)
OK, still in the very early stages of construction at the moment, and really I am just playing about on a quiet day at work...I am creating a site based around a panoramic image. I have 'navi' buttons which scroll the panoramic image back and forth to various specific points along the x axis depending on which button is pressed (which are working beautifully) but I would also like to have independent buttons that scroll the image back and forth to wherever the user wants too, which isn't working so well :P
I've had a look at the scrollPane component, but think that surely that is a little overkill for what I am trying to do, and certainly contributes massively to the .swf filesize. I would appreciate some instruction and guidance as to creating the actionscript that my arrow buttons would use to move my movieclip along the x axis (if it's not so difficult it would be nice to add some easing in there too such as is occurring on the specific postioning scrolling). The main problem I seem to be having is the scrolling codes conflicting with each other.
All help graciously received
Movieclip Move Up And Down But Not Off The Stage
I have a movieclip (MC1) moving up and down on my stage but my problem is that it resets its position
Im in need of a code in which once MC1 hits 200pixels it wont reset back to 400pixels but just bounce off the limited stage and keep moving up and down in a loop within that space?
Any ideas?
|