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




Mouse Actions



Hi thereI have a movie clip of a butterfly. I would like to create some mouse actions controlled by the user where when they "mouse over" the clip, the butterfly moves away from the mouse - almost like the mouse scared the butterfly away.Then the mouse will land in a different spot... There are about 3 or 4 spots the butterfly will land within the main movie and again, if the mouse "scares" it, it will move to another of those 3-4 spots.Any idea on a tutorial or do you have a way I can get started with this clip?Thanks!



KirupaForum > Flash > Flash 8 (and earlier)
Posted on: 02-04-2007, 07:36 PM


View Complete Forum Thread with Replies

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

Mouse Actions
Help mouse actions
I am trying to have a sword follow my mose around and act like the mouse. I already hid the mouse and set it so it looks like the mouse, but I'm trying to make it look like it stabs when it clicks on a button. I've made it stab but only when it was a button and then it wouldn't allow me to click on any other buttons. Please respond soon. Thanx. Jay

Mouse Over Actions
Does anyone know of a good tutorial on mouseover actions scripts.
I am trying to take a button and when you move your mose over it some text comes up in a different area of the screen.

Thanks

Mouse Over Actions On An MC, Within Another MC With Mouse Over Actions...
Can this be done?

I basically have a navigation menu I want to make, where when the use rolls over a MC, another MC within it (which contains the buttons) drops down. BUt when I do this, the menu drops down, but the buttons wont work...

help?

heres what I have so far:
http://www.seenew.net/onsetTesting/onsetIndex.html

heres the fla:
http://www.seenew.net/onsetTesting/onsetIndex.fla

Mouse Actions
Hi there
I have a movie clip of a butterfly. I would like to create some mouse actions controlled by the user where when they "mouse over" the clip, the butterfly moves away from the mouse - almost like the mouse scared the butterfly away.

Then the mouse will land in a different spot... There are about 3 or 4 spots the butterfly will land within the main movie and again, if the mouse "scares" it, it will move to another of those 3-4 spots.

Any idea on a tutorial or do you have a way I can get started with this clip?

Thanks!

Mouse Actions Help
I need a counter or some way to make a looping script if the mouse is pressed. I need to know how long the mouse button was depressed. like

while (mouseclick == true){
number++
}

except i cant find a code for true or false mouse status. Please Help.
I dont even know if im on the right track. HELP!!!!!!!

Thank you

Mouse Actions In CS3
how can I make it......

http://www.kirupa.com/developer/actionscript/mouse.htm

in CS3 ?

anybody ?

{f}MX- Mouse Actions
Hoy hoy
I have a scroll going that I need to stop when the mouse has left the window that the MC is playing in. can someone help out or point me in the right direction?

here is what I have:

onClipEvent (load)
{
xcenter=500;
speed=1/30;
}
onClipEvent (enterFrame)
{
var distance=_root._xmouse-xcenter;
_x-=(distance*speed);
if (_x > 0) _x=1;
if (_x < -560) _x=-560;
}

I need it to work with this function.

Thanks in advance
Kip

{f}MX- Mouse Actions
Hoy hoy
I have a scroll going that I need to stop when the mouse has left the window that the MC is playing in. can someone help out or point me in the right direction?

here is what I have:

onClipEvent (load)
{
xcenter=500;
speed=1/30;
}
onClipEvent (enterFrame)
{
var distance=_root._xmouse-xcenter;
_x-=(distance*speed);
if (_x > 0) _x=1;
if (_x < -560) _x=-560;
}

I need it to work with this function.

Thanks in advance
Kip

Mouse Actions On Mc Within Another Mc
Hello.

I've been struggling with this for a while now. I have some answers, but I'm looking for a better way.

Here's the setup: there's a movieclip (let's call it "box") on the stage which contains another movieclip ("circle"). I put an onPress action on "circle". It works fine. Then I put an onRollOver action on "box" and the circle onPress doesn't work anymore...

If you want a concrete example, let's say we have a menu on the left, which hides a portion of itself to the left of the screen when the mouse is away. When the user puts his mouse on the menu, it moves to the right, etc. You understand the concept...

I want the simplest solution please. I have already used some things that work, but that aren't efficient... for example this, with a timeline based animation which moves the object so the onPress action works:


PHP Code:



onClipEvent(enterFrame) {
    if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
        this.nextFrame();
    } else {
    if (this.hitting) {
        this.prevFrame();
    }





Thanks!

2 Actions...... 1 Mouse Click
I want to UNLOAD a movie clip with a button that also LINKS to another framenumber.

So I need a button that can do 2 things at the same mouseclick.

Can someone tell me how I can do this?

Stop MC Actions When Mouse Is Out
- I have a MC (mc1) that is on my stage

- mc1 contains another MC (mc2), which has a Slide Menu Bar

- On that Slide Menu Bar are Buttons (btn1 - btn5)

When a Button on my stage (btn6 - btn 10) is pressed, mc1 slides out (with mc2 on it) and acts as a submenu with the Slide Menu Bar there to select from. My problem is that when you select btn1 - btn5, then move your mouse to another part of the stage, the Slider Menu continues to follow the mouse, and esentially Slide, and I have boundries on the slider, so it slides to the end.

I would like the slider to stop. when I leave the area of mc1. any ideas on the coding? thanks for the help.

Alex

On Mouse Over Actions For A Movie.
I want a set of actions to be triggered when the mouse is over a movie in my Flash.

I don't want to use a button, because I don't want the mouse to change.

How can I do this?

I want to use Flash 5... but will use MX is I have to.

In Flash 5, I don't 'think' you can put mouse over actions on movies?

Or should I use a button and make sure the cursor doesn't change?
(I haven't done this before... would it be worthwhile trying to do this? And if so how? Any links to sample movies or tutorials would be appreciated.)

Any help with any of the above would be areally appreciated.

Thanks.


Jam

Button Actions While The Mouse Is Down
Hi, What I'm trying to do is make a guitar which you can strum. At the moment the strings vibrate when clicked on and unvibrate on release. The cursor is a plectrum, and I want it so that when I have the mouse down it can be strummed, but when the mouse it up it only hovers above, taking no action.

Is it possible to have mouse over effects when the mouse is down? I tried messing with "while" action but found nothing. Maybe it can be done with variables?

Thanks in advance, any script would be greatly appreciated.

Is It Possible To Do Mouse Over Actions Without Buttons?
Hi,

I have created a button so that when you put your mouse over, it slides out. This reveals content on the tab button e.g thumbnail buttons and scroll buttons. However, the buttons within the buttons don't work when you play it. I was wondering whether there was a way you can use actionscript instead of buttons to make movement of an object or if there is something that I am not doing which is preventing the buttons from working. I literally just want it to move from left to right.

Any help appreciated, thanks,

Helen

Filters And Mouse Actions
I can't figure out why my filters don't get applied when by mouse action functions are running. I think it may have something to do with the way I am changing the color of the button but I'm not sure.


ActionScript Code:
package {
   
    import flash.display.Sprite;
    import flash.geom.ColorTransform;
    import fl.motion.Color;
    import flash.events.MouseEvent;
    import flash.events.Event;
    import flash.filters.DropShadowFilter;
    import flash.filters.BevelFilter;
   
    public class thumbnailButton extends Sprite {
       
        //variables
        private var dropShadow:DropShadowFilter;
        private var bevel:BevelFilter;
        private var filtersArray:Array=new Array();
        private var color1:Color = new Color();
        private var color2:Color = new Color();
       
       
        public function thumbnailButton() {
           
           
            //listeners and functions
            this.addEventListener(MouseEvent.ROLL_OVER, buttonOver);
            this.addEventListener(MouseEvent.ROLL_OUT, buttonOut);
            this.addEventListener(MouseEvent.MOUSE_DOWN, buttonOver);
            this.addEventListener(Event.ENTER_FRAME, buttonFilters);
            this.buttonMode=true;
            this.useHandCursor=true;
        }
        //button display filters
        private function buttonFilters(evt:Event):void {
            dropShadow=new DropShadowFilter();
            dropShadow.color=0x000000;
            dropShadow.strength=.5;
            dropShadow.distance=2;
            dropShadow.angle=45;
            dropShadow.alpha=.5;
            dropShadow.blurX=2;
            dropShadow.blurY=2;
            bevel=new BevelFilter();
            bevel.shadowColor=0x333333;
            bevel.highlightColor=0xffffff;
            bevel.strength=.5;
            bevel.distance=4;
            bevel.angle=45;
            bevel.blurX=4;
            bevel.blurY=4;
            filtersArray.splice(0,2,dropShadow,bevel);
            evt.target.filters=filtersArray;
        }
        private function buttonOut(evt:MouseEvent):void {
            color1.setTint(0xcccccc, 1);
            evt.target.transform.colorTransform = color1;
            evt.target.filters=filtersArray;
        }
        private function buttonOver(evt:MouseEvent):void {
            color2.setTint(0xFF6600, 1);
            evt.target.transform.colorTransform = color2;
            evt.target.filters=filtersArray;
        }
    }
}

How Do I Do Reverse Mouse Over Actions?
I've seen this done on many sites, but can't figure out how to do it.

You have a button. When the mouse is moved over it, it plays an animation. But when you move the mouse away, the button goes back to it's original state. OK, that's simple enough!

BUT, this is the bit I don't get: when the mouse is moved away, the reverse animation is played to go back to its original state. And this is the bit I REALLY don't get: if the mouse is moved away before the animation has stopped playing, then it stops at the point of animation and reverses from that point.

How do I do this!?
I've got no idea!

Em... does anyone know/understand what I'm talking about!?

Any help/pointers would be appreciated.


Thanks.


Jam

LoadClip() And Mouse Actions
Hello:

First of all, sorry me if I make some grammar errors, I am not used to write english.

Second, i have to say all of you Hello . This is my first post here. I am a newbie in the Flash World. I hope I can enjoy and learn a lot from the people who write here. I am 20 years old and i study Informatics engineering in Spain.

Well, lets go to the point. I have a flash file named contacto.fla. There, i load an existing movie clip with the following actionscript code:

Code:

var mcLoader:MovieClipLoader = new MovieClipLoader(); 
var oListener:Object = new Object(); 

oListener.onLoadComplete = function() { 
    iMapa._xscale = 103; 
    iMapa._yscale = 103; 
    gotoAndPlay(_root.vLang); 

mcLoader.addListener(oListener); 
mcLoader.loadClip("./swf/mapa.swf",iMapa); 
stop(); 


The file mapa.swf is the published version of mapa.fla. In the first frame of the mapa.fla, i have the following actionscript code:
Code:

stop();
onLoad = inicializaCoordenadas;
onMouseMove = actualizaCoordenadas;

function inicializaCoordenadas(){
   cordx = 0;
   cordy = 0;
   texto = "";
}

function actualizaCoordenadas(){
   cordx = _xmouse;
   cordy = _ymouse;
   texto = "";
}


In the map, I have three dynamic text fields (cordx,cordy and texto), where I show the value of the variables cordx,cordy and texto respectively.

I have also in the map three buttons, each of them with the following code (changes only the variable texto and the frame of gotoAndPlay)
Code:

on(rollOver) {
   texto = "MADRID";
}
on(RollOut) {
   texto = "";
}
on (release) {
   gotoAndPlay(5);
}


If i play the mapa.swf standalone, everything works fine. The cordx and cordy show the position of the mouse and if the cursor goes over the button, appears the city name in the texto textfield. The problem comes when i load "mapa.swf" from "contacto.swf" with loadClip(). The map is showed, and if i click in one of the buttons the film go to the correspondent frame, but all the dynamic textfields that show the value of cordx, cordy and texto stop working, and nothing appears.

Do you know what i am doing wrong?

I thank you in advance all your time and help.

Greetings,

Ruben.

Multiple Actions On Mouse Event?
I am trying to trigger a couple of actions with a button on mouse release.

1) I have a "if" to check a variable (called "playhead"). If the condition is true (it equals the value "images"), then the main timeline moves to another frame label (called "stories"). If it's false, the main timeline just stays where it's at.

2) I want to set a different variable (called "test") to a new value ("1").

Here is the Object Action code for the button...

on (release) {
if (playhead==images) {
gotoAndPlay ("stories");
}
test = "2";
}

My problem: it seems I get to have one or the other of these to actions. If I delete action 1), then action 2) works fine. If I delete action 2), then action 1) works fine. But they don't both work?

I've tried moving the actions into a different order, with 2) above 1) - this had no effect.

I've tried creating a separate "on (release)" just for 2) and separating the two actions that way - this had no effect either.

I would assume that multiple actions can occur with one mouse event, for some reason it won't work for me.

Does anyone have any ideas or useful advice???

Thanks for any help.

Can AS Simulate User Mouse Actions?
Is it possible to simulate mouse events programmatically in AS?
Can the code for a buttons mouse events be triggered through scripting?
And if so what is it's syntax?

If Mouse Not Present, Execute Actions Once
Hello.

What I want to do is - if the mouse is not present: execute actions once, if mouse is present - do nothing. But I dont have what it takes to figure out how to type it into AS editor. Can someone help me?

How To Avoid The Actions Of The Mouse Right Button
Im spanish so pardon for my english

I need to know the best way to avoid the actions of the mouse right button when my movie is playing. Also, I´m searching for a tutorial about a ball (or a pencil for example) following a concrete direction and writing at the same time,do you understand?

Thousand thanks

Can't Disable Mouse Actions For Movieclip
I'm not sure what is going on here. When there are child displayobjects in an DisplayObjectContainer it seems I can't disable the container's mouse actions.

Can anyone lend a hand?

also attached:

ActionScript Code:
box_mc.addEventListener(MouseEvent.ROLL_OUT, rollOut);
box_mc.click1_mc.addEventListener(MouseEvent.CLICK, click);
box_mc.click2_mc.addEventListener(MouseEvent.CLICK, click);
box_mc.click3_mc.addEventListener(MouseEvent.CLICK, click);

function rollOut(e:MouseEvent):void
{
    trace("roll out");
}

function click(e:MouseEvent):void
{
    trace("click");
}

box_mc.mouseEnabled = false; // should not dispatch ROLL_OUT now, yet it does.
box_mc.click1_mc.mouseEnabled = false;

Simple Question - Mouse Actions
This is probably so simple - I'll be kicking myself tomorrow but here goes:

Am I right in thinking you can only run one mouse action at a time? What I mean is if I click on one object: on (press) and I then drag the mouse outside of that object (without releasing it) and over another (different) object/button - I cant trigger something on (rollover) on that second button until the first press has been released.

Does that make sense?
Cheers in advance

Timeline Scripting For Mouse Actions
hi everyone!
i've just got help from someone here with a script to tell the timeline animation to play after 5 secs:


--------------------------

stop();

setTimeout(function () {
gotoAndPlay(5);
},5000);

--------------------------
it works super great, only thing is, after i mouse over the image and the animation starts playing, the above script will kick in, and the animation will start all over again on from frame 5.

what i'm trying to do is this:
the image actually needs someone to mouse over to initiate a timeline animation, but if no one interacts with image for 5 secs, then the timeline animation will play automatically.

is there anyway i can stop the above code if someone DOES interact with the image within 5 secs?

Loaded Movie Does Not React To Mouse Actions
I have loaded a SWF into a movie clip but I does not function (the objects inside the loaded movie does not react to mouse actions or buttons do not respond to mouse actions...anybody with comments or solutions..will be higly appreciated..THX to ALL for reading

Flash Actions On RIGHT Mouse Button Press?
How can I run some script upon pressing the right mouse button? (Also, for possible future ideas, how about mouse wheel, centre mouse button... umm, thumb mouse button...?)

Mouse Actions, (on Release, On Roll Over Etc) Only Work Now This Way?
So the only way now in actionscript 3.0 to trigger a mouse action is to write a listener and then an event handler ?

no longer can we write actionscript directly to the movie clip like this:

on(release){

this.gotoAndStop(2);

}

and no longer can we just write this in the main timeline to get to a movieclip:

button.onRelease = function() {
button.y =+ 20;
}


So I just wanted to confirm this, as always any help is appreciated.

Assigning Mouse Actions To Dynamically-created MovieClips
Here's what I'm starting with:

Code:
_root.createEmptyMovieClip("jpegbutton",0);
jpegbutton.loadMovie("http://www.test.com/jpeg.jpg");
I want to be able to use that movie clip as a button, with MouseDown, MouseUp, etc. actions. How do I do it?

Thanks in advance!

Actions Are Overriding Other Actions Or Being Caught In A Loop Only On Double Click
I have a movie which I use actionscript to move things on/off stage to create different pages. Everything works great unless you double click a button.
When double clicking it makes objects "stick" in place and they will not move even though another command should make them move off stage (movie gets stuck). On a single click, the objects do what they are commanded to do. I even tried setting a variable to disable the button click if it has already been clicked. What causes this?

In the code below, the objects in the function home() will not leave the stage once the services button is double clicked (they are commaned to ease off the stage once other mc's are pressed) . BUT it works if only the services mc is only single clicked...please help. I'm pulling my hair on this one and about to start pulling my teeth.


if (_global.whichMovieLoaded != "services" && _global.isMovieLoaded != "stop") {
_global.whichMovieLoaded = "services";
services.onPress = function() {
remove();
function Pause() {
// bring home
home();

clearInterval(PauseInterval);
};

PauseInterval = setInterval(Pause,1000);

valet.easeY(400, 1.09);
itinerary.easeY(425, 1.09);
dining.easeY(400, 1.09);
ground.easeY(425, 1.09);
};
};



function remove(){
valettxt.fadeOut(9);
diningtxt.fadeOut(9);
itinerarytxt.fadeOut(9);
groundtxt.fadeOut(9);

mindtxt.fadeOut(9);
nauticaltxt.fadeOut(9);
scenictxt.fadeOut(9);
terrtxt.fadeOut(9);

mind.easeY(650, 1.09);
nautical.easeY(650, 1.09);
terr.easeY(650, 1.09);
scenic.easeY(650, 1.09);

valet.easeY(650, 1.09);
itinerary.easeY(650, 1.09);
dining.easeY(650, 1.09);
ground.easeY(650, 1.09);

logo.easeX(950);

imageLoader.unloadMovie();

};
//takes objects back to the home page
function home(){
maui.easeX(200, 1.09);
con.easeX(200, 1.09);
bar.easeX(625, 1.09);
patio.easeX(400, 1.00);
patio.fadeIn(2);
discover.easeX(625, 1.09);
discover.fadeIn(1);
imageLoader._alpha = 0;
VIP.fadeIn(.9);
};

Actions On The Main Page..do They Affect Actions On Movie Buttons?
ON the home page I've created, the buttons I used with the code in my previous thread ("two questions about HTML publishing and buttons"), I added an on rollover action to the actions layer of the main timeline (not the movie button timeline) so that on rollover, a picture would change according to the button that was rolled over. I did this for all three buttons. The rollover action works great, but now the links don't work in either the html OR the swf version. Would the added action disable the movie-clip button actions? Here's the added main timeline code, edited for space: photobtn_mc.onRollOver = function() {
gotoAndStop(2);
photobtn_mc.onRollOut = function() {
gotoAndStop(1); ( Again, help is greatly appreciated!)

Actions On Clip Kill Parent Actions? Workaround?
Hello, i have a nav clip, with rollover actions. When the nav clip is rolled over, i want the nav to zoom in. Which isn't a problem,
there are 6 buttons inside the nav clip which have onRelease actions. However, since the nav clip (the parent to the buttons clip) has the rollover state, it kills the actions of the buttons. Is there a workaround for this?

here is my code, the clip structure is nav.buttons.but1 etc.

code:
Stage.scaleMode = 'noScale';
import flash.filters.*;
//------------------------------------------------------------------------------------------------------------------
this.nav.onRollOver = function() {
};
this.nav.onRollOut = function() {
};
//------------------------------------------------------------------------------------------------------------------
for (i=1; i<=6; i++) {
nav.buttons["but"+i].onRelease = function() {
trace(this._name);
};
}

[mx2004] Actions Window Won't Show Actions
Well the problem is rather annoying and stops me from doing any work...

If I open my actions window, it opens up, but I just have a gray area inside the window, I can't put any scripting in, and even funnier, if I try to put my actions window locked into place it will actually crash flash entirely without any error message.

Any help would be much appreciated, thanks in advance!

[F8] Rewriting Button Actions To This.on Actions
Evening! I could do with a little help if possible - basically I need to combine a number of different button commands into script for a movieclip button.

I want these actions

PHP Code:




on (rollOver) {    // slider - Movie Clip's Instance Name. button_1 - Button's Instance Name.    slider.xMove = button_1._x;}on (rollOver) {    tellTarget ("_root.PC_Cursor") {        gotoAndStop("Finger");    }}on (rollOut) {    tellTarget ("_root.PC_Cursor") {        gotoAndPlay(1);    }}on (release) {    if (_root.CENTERpages.clip._currentframe == 10) {        _root.CENTERpages.clip.gotoAndPlay(11);    }}on (release) {    if (_root.world._currentframe == 2) {        _root.world.gotoAndPlay(1);    }}on (release) {    tellTarget ("_root.CENTERpages") {        gotoAndStop("name");    }}on (release) {    unloadMovieNum(1);}on (release) {    if (_root.CENTERpages.A1._currentframe == 1) {        _root.CENTERpages.A1.gotoAndPlay(2);    }}on (release) {    if (_root.CENTERpages.A2._currentframe == 1) {        _root.CENTERpages.A2.gotoAndPlay(2);    }}on (release) {    if (_root.CENTERpages.A3._currentframe == 1) {        _root.CENTERpages.A3.gotoAndPlay(2);    }}on (release) {    if (_root.CENTERpages.A4._currentframe == 1) {        _root.CENTERpages.A4.gotoAndPlay(2);    }}







to work like this in a movieclip:

PHP Code:




this.onRollover = function() {    // slider - Movie Clip's Instance Name. button_1 - Button's Instance Name.    slider.xMove = button_1._x;}this.onRollover = function() {    tellTarget ("_root.PC_Cursor") {        gotoAndStop("Finger");    }this.onRollout = function() {    tellTarget ("_root.PC_Cursor") {        gotoAndPlay(1);    }this.onRelease = function() {    if (_root.CENTERpages.clip._currentframe == 10) {        _root.CENTERpages.clip.gotoAndPlay(11);    }this.onRelease = function() {    if (_root.world._currentframe == 2) {        _root.world.gotoAndPlay(1);    }this.onRelease = function() {    tellTarget ("_root.CENTERpages") {        gotoAndStop("name");    }this.onRelease = function() {    unloadMovieNum(1);}this.onRelease = function() {    if (_root.CENTERpages.A1._currentframe == 1) {        _root.CENTERpages.A1.gotoAndPlay(2);    }this.onRelease = function() {    if (_root.CENTERpages.A2._currentframe == 1) {        _root.CENTERpages.A2.gotoAndPlay(2);    }this.onRelease = function() {    if (_root.CENTERpages.A3._currentframe == 1) {        _root.CENTERpages.A3.gotoAndPlay(2);    }this.onRelease = function() {    if (_root.CENTERpages.A4._currentframe == 1) {        _root.CENTERpages.A4.gotoAndPlay(2);    }







but it doesn't work!!! period! am I supposed to be keeping all of the functions together after I call the action? ie; all of the onrelease functions run on after a single this.onrelease call?
or have I took the wrong approach altogether on this?

Any pointers welcome!

Frame Actions Vs Object Actions
In preparation for AS3 which no longer supports object actions, I am on the process of converting flash movies created with Object actions in AS2 to Frame actions. While I understand some valid reasons for switching to Frame actions, I am discovering that converting button and clip actions to Frame actions is a very tedious process and so far, more than half the files I have tried to convert do not work. Having worked with Flash since version 3, I know about timelines, targeting and variable scope but this whole conversion process is driving me nuts! Is there a place that I can go to or tutorials available that teach how to attack this conversion? What are the main guidelines in converting from Object to Frame Actions? I have looked in the CS3 Help (from the program or Adobe online) and I have not found anything to guide me. Am I the only one experiencing this? Thanks for your help.
Yvan

Actions Of One .swf Controlling Actions Of Another .swf
Hi,

I have a  musical jukebox on a project i am making and the way I did it was on the main timeline I have a script

stop();
unloadMovieNum(66);
loadMovieNum("song1swf",66);

Then at the end of each swf (which is each song in the jukebox) I load the next song so the swf's loop from 1,2,3 and back to 1.

But I give the option to choose each individual song by loading up each seperate swf. I have song info that is displayed on the main timeline, so the button for each song leads you to a different frame on the main timeline.

But, for example,  a person chooses song 2 and it plays and then proceeds to song 3 but the info still displays song 2. Because it has stopped on that frame. Is there a way to move to a different frame on the main timeline when one song.swf passes to the next?

Thank you for your help,
GD


Movie Clip Mouse Speed Control Depending On Mouse Press
Hi,
Please help me !
As iam developing a small ball game in flash, where i need to control the speed of the ball (i.e, to increase or decrease the speed of ball)when clicked on a button depending on mouse press .

I have done similar on key press but iam not able to do the same for mouse pressed.


Please help me out

Your help will be appreciated.

Thanks & Regards
Zabi

OnPress Doesn't Work If The Mouse Button Is Pressed Again But The Mouse Is Not Moved.
I have a very simple piece of code but it has one very annoying bug. When I press the button a second time, the code doesn't work. The only way to get the code to work is by moving the mouse a tiny bit, or moving the mouse off the button and back on.

Does anyone know a way to make a button that can be clicked many times without moving the mouse?


Code:
randommultiquiz.onPress = randommultiquizOnPress;
function randommultiquizOnPress() {
_root.attachMovie("connect", "newconnect", 200);
newconnect._x = 0;
newconnect._y = 0;
newconnect._xscale = 100;
newconnect._yscale = 100;
}

How Do I Create A Movieclip To Play If Mouse Is Unactive, And Stops When Mouse Moves?
I am in the process of creting a world map navigation for a global ite portal.

In the map a user can hover over different continents to zoom in on specific countries then click on that country's to goto its specific website.

However I think the world map looks a little un-user friendly so was looking at playing a quick tutorial movie (a mouse cursor, moving over a continent and highlighting it) when the mouse is not being moved, then stops when the user moves the mouse.

This feature a little reminisant of when sonic the hedgehog used to tap his foot if you didnt use your joypad for a while.

I would also like to start the movie (after he preloader ive used) with the tutorial playing, so the user can understand the way it works straight away.

I am a novice at action scripting, so all help would be appreciated!

Thanks

M

How Do I Create A Movieclip To Play If Mouse Is Unactive, And Stops When Mouse Moves?
I am in the process of creting a world map navigation for a global ite portal.

In the map a user can hover over different continents to zoom in on specific countries then click on that country's to goto its specific website.

However I think the world map looks a little un-user friendly so was looking at playing a quick tutorial movie (a mouse cursor, moving over a continent and highlighting it) when the mouse is not being moved, then stops when the user moves the mouse.

This feature a little reminisant of when sonic the hedgehog used to tap his foot if you didnt use your joypad for a while.

I would also like to start the movie (after he preloader ive used) with the tutorial playing, so the user can understand the way it works straight away.

I am a novice at action scripting, so all help would be appreciated!

Thanks

M

How Do I Create?: Scrolling Image Stops On Mouse Over-starts On Mouse Off
I’m trying to create this animation:

I have an long rectangular image (with more images going across it) scrolling FROM the right side of the screen to the left (very slowly). similar to a ticker.

I want the scrolling to stop when the viewer mouses over the menu strip. If they press on the image that they have just moused over, I have a movie clip I want to play for that image (a few images pop up, one bigger than the other). When the viewer mouses off, the movie clip disappears, and the menu continues scrolling to the left, from the right.

Greatly appreciated!!

Playing A Movie Clip On Mouse Over And Continue To Last Frame On Mouse Out
Hi All,

I have a movie clip on the timeline which is an animated mouseover button

Basically what I need to do is for the movie to be stopped at frame one when there is no mouse over and loop continuosly when I do have mouse over then on mouse out i want it to finish it's frames playing from where ever it was at when the mouse was moved out to the last frame and then display frame one so it is stopped again ready for a new mouse over.

Something I have found difficult to work out is that whilst it is doing the "out" play to to last frame, if you put the mouse back over again, it starts from frame 1 so looks like it jumps so i need the mouse over to also read what frame it is currently playing so that it can continue its endless loop from that frame to avoid it jumping about.

I hope that makes sense, it's really difficult to describe in words.

Here's the movie clip's action as it is now.

on (rollOver)
{
this.gotoAndPlay("over");
}
on (releaseOutside, rollOut)
{
this.gotoAndPlay("out");
}

ok so in the movie's timeline itself, the label "over" is a frame containing another movieclip which is basically a continous 30 frame loop and my movie timeline is stop();

so, on (rollOut) it plays at label "out"

I have placed a copy of the movie loop at the "out" frame which plays the movie slower at the end to make it a nice wind down stop

what I thought to do in action script is to read the current frame that the movie loop is at and make so the "out" position movie starts its playing frame from that frame number until it reaches the end frame where it jumps back to frame one of the timeline with the first stopped frame.

I've seen a command something like this below used to get the current frame number and take it away from the total to continue playing from that point, that's not totally right for what I am doing but it shows me the sort of thing i need to write but i don't know how to write an actionscript to read the current frame from the movie1 whcih is playing and start playing movie2 at "out" from that frame number?

on (rollOut) {gotoandPlay(_totalframes - _currentframe); }

maybe there is an easier way to get this to work, i've seen lots of similar examples on the web but nothing that specifically plays a lopp and then continues to the end on mouse out. it sounds simple but I've tried all weekend to do it without success?

Can anyone help me please?

Thanks,
Terrence.

Mouse Follow/stopfollow After Mouse Leaves Object (with Ease)
well, i think the title covers me entirely, i would like some help with a script.
The problem is, i have a scene with objects that at first they are static, when the mouse comes in and makes a move-over the scene and some objects,i have assigned multiple collision to the objects, i want when the mouse moves over a object, the object to follow the mouse,while colliding to all other objects and after a while i would like as the mouse moves away, the following to stop and the objects to return to its original spot with ease.

I know that this is a big one, but i would like some help if i could get

Detect Mouse _x & _y Attach Specific Clip And Have It Follow Mouse
I'm trying to make a clip that will have another clip attached (eventually it'll be a mask) when you roll over it. I want the mouse positon to be determined on rollover and a different clip (with different registration point) to be attached depending on which quadrant you rollover first. IE- you rollover the lower left quadrant of the mc first so an mc with an upper right registration point is attached and follows the mouse.

basically I want it to look like you're pulling a mask from out of nowhere onto the main mc from whatever corner you start on... (make sense?)

i'm trying to reconstruct what you see here (http://www.mullerphoto.com/)
this is the first baby step!

anyhow, here's my AS and i'll attach the .fla any help is great! I have the actionscript dictionary and am not afraid to use it, I just need help with the mechanics of how to actually do this (i.e.- which methods, properties, etc. to utilize) thanks!


Code:
leftfunction = function(){
if (patch._ymouse <= 100){
llowerfunction;
}else{
//this function starts the maskclip coming in from the upper left with a lower right reg point
_root.patch.attachMovie("lowerright", "lrclip", 1);
lrclip._x = _root.patch._xmouse;
lrclip._y = _root.patch._ymouse;
}
}

llowerfunction = function(){
//this function starts the maskclip coming in from the lower left with an upper right reg point
patch.attachMovie("upperright", "urclip", 1);
urclip._x = patch._xmouse;
urclip._y = patch._ymouse;
}

rightfunction = function(){
if (patch._ymouse <= 100){
rlowerfunction;
}else{
//this function starts the maskclip coming in from the upper right with a lower left reg point
patch.attachMovie("lowerleft", "llclip", 1);
llclip._x = patch._xmouse;
llclip._y = patch._ymouse;
}
}

rlowerfunction = function(){
//this function starts the maskclip coming in from the lower right with an upper left reg point
patch.attachMovie("upperleft", "ulclip", 1);
ulclip._x = patch._xmouse;
ulclip._y = patch._ymouse;
}

_root.patch.onRollOver = function() {
if (patch._xmouse <= 150){
leftfunction;
}else{
rightfunction;
}}

Custom Mouse Cursor Conflict With Mouse Trail
When I put mouse trails and custom mouse cursor script in the same scene the mouse trails work but the cursor does not change to the custom cursor. If I use the custom mouse cursor script in a seperate scene, on its own, it works fine. I think that the two scripts are conflicting.
Mouse trail script:

onClipEvent (enterFrame) {
//x movement
mx=_root._xmouse;
if (mx<_x) {
dx=_x-mx;
}
else {
dx=mx-_x;
}
moveSpeedx=dx/10;
if (mx<_x) {
_x=_x-moveSpeedx;
}
else {
_x=_x+moveSpeedx;
}
//y movement
my=_root._ymouse;
if (my<_y) {
dy=_y-my;
}
else {
dy=my-_y;
}
moveSpeedy=dy/10;
if (my<_y) {
_y=_y-moveSpeedy;
}
else {
_y=_y+moveSpeedy;
}
}

Custom mouse cursor script:
Layer 1(functions):

stop();
/* update the cursor coords */
function updateCursor() {
_root.cursor._x = _xmouse;
_root.cursor._y = _ymouse;
updateAfterEvent();
}

Layer 2(on event handlers):

onClipEvent(load) {
Mouse.hide();
this.swapDepths(100);
}
onClipEvent(mouseMove) {
_root.updateCursor();
}

Please help!

Mouse Direction Scroll With Mouse Over Image Enlargement...
Hi all..

Haven't had much luck finding a tutorial to help me do this one so any help locating it would be good.. I'm trying to design an image gallery where the images scroll left to right depending on mouse movement. Once a mouse is over an image it enlarges then returns to normal shape with mouse off.

any help appreciated..

cheers!

Mouse Over, MC Scales Up, Mouse Out, MC Returns To Original Size...
I have looked around and I cannot find a simple script to apply to a clip that does this...

On Mouse over - MC scales up, on Mouse out, MC returns to original size... with some easing.

Please help!!

Scroller That Moves According To Mouse Movement Not Mouse Location.
I am trying to recreate the effect seen here:

Express Top Ten

alright here's the request:

I have found many scroller tutes most of which use buttons to control them. What I need or think I need is a tute or file to refer to, that uses a mouseover effect to move the movieclip with respect to how much the mouse has moved and still uses easing.

I have found files that make the movieclip move according to the mouse position on the stage, but i need it to move in according to how far it just moved.

feel free to email me with any questions.

thanks in advance,
chris
email me

Changing Mouse Cursor On Mouse Over/out Without Drag Movie?
Hello,
I have a movie clip/button that activates some actions but I don't want the mouse pointer show the link icon (hand) and instead show the normal arrow icon. Is this possible with a fast mouse.smth actionscript or is a complex startdrag/stopdrag of movieclips the only way out? Thanks in advance.

Mouse Hittest Too Slow? Mouse Passes Over Wall
Hi everyone,

I'm having a problem with a new game i'm working on.

I have the following code to attach a movieclip to the mouse:


Code:
startDrag(_root.dot, true)
Mouse.hide();


Ok, and i have a wall movieclip with the following:


Code:
if (_root.dot.hitTest(_root.wall)){
trace("hit!")
}



This works fine, as long as you move the mouse slowly -- if you zip it over the wall, it seems that the hittest doesnt have time to register the hit? Or that the "_root.ball" doesnt actually go over the wall, it just is transported to the new mouse location? (im not sure )

Any infomation on how to make the hittest 100% detect the mouse over the wall would be great.

Many thanks.

Regards.

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