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




Making Things Follow Your Mouse Then Stop



HI,

Ive been stuck on this idea for 2 weeks on and off.... this is the last piece of the website I have.... the links bit at top of page....
http://sail.joolo.com/test/

this is a swf of what I have done so far.... (its not final graphics of course but explains it (flash file attached!!))

each shade of blue is going to be a button.... when you roll over the white box will move to you mouse then open up more details of link.... when you move onto next colour the box will close and stay at the last point you rolled off it.... its a great effect if done!

the problem is ALL boxes want to move with mouse???... can someone help me? The script I think looks ok but has been cobbled together!


thanks



FlashKit > Flash Help > Flash ActionScript
Posted on: 07-25-2007, 10:36 AM


View Complete Forum Thread with Replies

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

[F8] Follow The Mouse - Stop Mc At Location Of Mouse On Click
I have an mc that follows the mouse a certain distance on the x in both directions and then eases to a stop when the mouse gets a certain distance.

What I need to do is to have the mc stop on button click at the x position it is at on click. Then, when another button is clicked the animation continues from it's stopped location to the new mouse location. All with easing of course.

Here is the code for the mouse tracking:

Code:
onClipEvent (load) {
speed = 3;
}
onClipEvent (load) {
stageWidth = 700;
imageWidth = 615;
}
onClipEvent (enterFrame) {
destx = (stageWidth-imageWidth)*(_root._xmouse/stageWidth)
_x += (destx-_x )/speed;
}

Any help would be greatly appreciated.

Making A MC Do 2 Different Things On Mouse Release?
I have a MC on the stage called MAINMENU that is composed of two other MC's: MENULEFT and MENURIGHT.

When you click on the left half of the MAINMENU MC (MENULEFT), I want it to expand the MENURIGHT out to the right. Then, when you click on it again, I want it to move MENURIGHT back to it's original position.

I know how to make it so that when you click it the first time, it expands, but I can't get it to retract when it is clicked again.

Can someone give me some ideas?

Thanks!
Lee

Making A Box Follow A Mouse?
Can anyone show me the easiest way to make a box follow a mouse?

Trying to learn actionscript is wierd lol. VB was easy, but its completly different.

Making Mc Follow Mouse But.......
Hi but I want it only to follow the mouse left and right thanks.

Making A MC Follow The MOUSE Again
----------------- (this part works!) ------------------

i have a MC that follows the mouse... (red box)...

i have a button in it that disables the "follow" code and makes it go to a certain x,y spot...

----------------- (this part doesnt work!) ------------------

i have a blue button that enables the "follow" code, but the MC doesnt follow as good as it used to...

anyone know what the hang up is?... i cant tweak it to work...

thank a MILLLLION in advance,

manny

----------------- (code used) ------------------


RED BOX THAT MOVES AND GET PUT TO x,y spot
code:
onClipEvent (enterFrame) {
if (_root.followme==true){
//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;
}
}
}

// CODE THAT MAKES IT GO TO y SPOT

onClipEvent (load) {
baseSpeedy = 1.5;
}
onClipEvent (enterFrame) {
if (_parent.seekTargety<>10) {
deltaY = _parent.levelScroll._y-_parent.seekTargety;
if (deltaY>=-1 and deltaY<1) {
_parent.levelScroll._y = _parent.seekTargety;
} else {
_parent.levelScroll._y -= ((baseSpeedy/100)+deltaY)/baseSpeedy;
}
}
}


// CODE THAT MAKES IT GO TO x SPOT

onClipEvent (load) {
baseSpeedx = 1.5;
}
onClipEvent (enterFrame) {
if (_parent.seekTargetx<>10) {
deltaX = _parent.levelScroll._x-_parent.seekTargetx;
if (deltaX>=-1 and deltaX<1) {
_parent.levelScroll._x = _parent.seekTargetx;
} else {
_parent.levelScroll._x -= ((baseSpeedx/100)+deltaX)/baseSpeedx;
}
}
}



BLUE BUTTON after the red button says

code:
_root.followme=false;

on (press) {
_root.followme=true;
}

How Does One Go About Making Something Follow Your Mouse?
I want to make a generic asteroids ship follow your mouse around and shoot at it when you click.

Is There A Way To Stop Follow Mouse?
(using Flash MX) I've got a movie clip that follows the mouse using this script assigned to it:
onClipEvent (enterFrame) {
this._y = _root._ymouse;
}

Is there a way to end the following the mouse when the user clicks on a button, or clicks anywhere at all, with maybe this -
onClipEvent (mouseDown) {
???? something would go here?
}

And then, how would you bring the following-mouse effect back again when the user moves the mouse back to the movie clip (wherever it was when it stopped following the mouse)?

Appreciate any help - it's driving me nuts....

STOP FOLLOW MOUSE MC
okay.
this is sort of a re-sub,
since i never got the answer i was looking for
the first time.
and i dont wanna beat that dead horse.
so here's a new dead horse.

YELDARB tried valiantly to help me,
but to no avail.

i KNOW someone out there knows how to do this,
WHERE ARE YOU !?

haha.

all im trying to do,
is get my mouse following MC
to just stop at certain coordinates.


help.
please..

[MX] Follow Mouse And Stop
hi
i tried to make the ball follow my mouse, i am trying to stop the ball following my mouse when i drag it out side the border

fla is there

thanks for your help

STOP FOLLOW MOUSE MC
okay.
this is sort of a re-sub,
since i never got the answer i was looking for
the first time.
and i dont wanna beat that dead horse.
so here's a new dead horse.

YELDARB tried valiantly to help me,
but to no avail.

i KNOW someone out there knows how to do this,
WHERE ARE YOU !?

haha.

all im trying to do,
is get my mouse following MC
to just stop at certain coordinates.


help.
please..

Making An Object Follow Your Mouse
How do I make a object follow my mouse but on a set path. Like I have this graphic I want to follow my mouse only going left and right. Also I made some text effects with swish and I want to have them appear only when you have the mouse over a button. Swish files come in swf files. I can make the file play only in the button up frame. When I put it in the button roll over nothing happens. Hope I explained that right and thanx to whoever can help.

Making Mask Follow Mouse
i was wondering how u can make a mask follow mouse effect...

any help appreaciated as i cant get it to work..

-Johan

Stop Mouse Follow When Needed
I have my code as follws:

code:

//Code:
onClipEvent (load) {
_x = 0;
_y = 0;
speed = 5;
}
onClipEvent (enterFrame) {
endX = _root._xmouse;
endY = _root._ymouse;
_x += (endX-_x)/speed;
_y += (endY-_y)/speed;
}



now all i want to do is stop the movie clip from following the mouse when clicked on without diabling the movie clip.

I have tried : "delete onEnterFrame" and it works but the only problem is that it makes the movie clip totaly inactive. Is there any way of getting around this?

Thank You

Onrollout Follow The Mouse, Else Stop Following :D
hi there,

i'm busy with something in flash.. but i want to do the following thing.

i got a MC .. this must follow the mouse so onrollout follow the mouse

and onrollover stop following the mouse. i tried this code:




Code:
onClipEvent (enterFrame) {

this.onRollOut = function () {

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;

}

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;

}

}

}




i hope someone can help me..

well cya later

Onrollout Follow The Mouse, Else Stop Following :D
hi there,
i'm busy with something in flash.. but i want to do the following thing.
i got a MC .. this must follow the mouse so onrollout follow the mouse
and onrollover stop following the mouse. i tried this code:


Code:
onClipEvent (enterFrame) {
this.onRollOut = function () {
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;
}
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;
}
}
}

i hope someone can help me..
well cya later

Making A Movie Clip Follow The Mouse
how do you make a movie clip follow the mouse horizontally only when the mouse goes over a certain area of the stage instead of the whole movie?
I have buttons that I would like a line to follow the mouse when it goes over them.

Thanks!

stacey

Making A Movie Clip Follow The Mouse
I have a movie clip following the mouse. I just need to know the name of the function that makes flash redraw instantly instead of at the end of the function.

in director this function is called updateStage()

Example:

function gameLoop(){

clip1._x = _xmouse;
clip1._y = _ymouse;
updateStage(); //redraw

// other statements
// other statements
// other statements
// other statements
// other statements

}

Flash Menu With Follow Mouse (and Stop)
i need help to do this
menu
I already did something similar but i can't make the "pointer" stop whe it's get to the end.
someone please hepl me!.
i raelly apreciate it.
i'm looking for a master XD

anybody there?

PD: Excuse my poor english

Mc Follow Mouse, Stop At Container_mc Edge
I'll try really hard to explain what I am doing.

I have a movieClip with an image. I want the image to move left or right base d on the mouse movement, but I also want the image to stop moving before either the left or right edge is visible.

Here's what I have so far... any ideas on how to contain the image?


PHP Code:



_global.followMouse = function (target_mc,mc_direction,mouseSpeed){
    
    
    eval(target_mc).onEnterFrame = function() {
        
    
    var targetDirection = mc_direction;
    var mspeed = mouseSpeed;
    var xMouse = _root._xmouse;
    var yMouse = _root._ymouse;
    
    var containerTop = this._parent.container_mc._y;
    var containerBottom = this._parent.container_mc._height + containerTop;
    
    var targetTop = this._y;
    var targetBottom = this._height + targetTop;
    
    
    
        

    // this is where I need help limiting the image_mc
        if(targetTop >  containerTop && targetBottom > containerBottom){
    
        
            if(targetDirection == "horizontal"){
                if(Math.abs(xMouse - this._x) < 1) {
                    this._x = xMouse;
                } else {
                    this._x -= (this._x-xMouse) / mspeed;
                }
            } else if(targetDirection == "vertical"){
    
                if(Math.abs(xMouse - this._x) < 1) {
                    this._y = yMouse;
                } else {
                    this._y -= (this._y-yMouse) / mspeed;
                }
            } else if(targetDirection == "both"){
                if(Math.abs(xMouse - this._x) < 1) {
                    this._x = xMouse;
                    this._y = yMouse;
                } else {
                    this._x -= (this._x-xMouse) / mspeed;
                    this._y -= (this._y-yMouse) / mspeed;
                }
            }
        }
    }
}



_global.followMouse(ball_mc,"vertical",25); 




I'm just not thinking well today. Any help would be greatly appreciated.

Also, FYI I am masking the image_mc so that it only shows in a defined area of the stage.

MG

Follow Mouse Scroll > Stop At Edge
Follow Mouse ScrollCan anyone lead me to a horizontal scrolling image that follows the mouse, and stops at the outermost edge of a designated frame? Thank you for all the help.

MikeZ

[F8] Making A Stationary Object Follow The Mouse Cursor
So ive been lookin for a way to make an stationary object follow the mouse from a certain anchor point and ive come close... but havent quite made it there, any suggestions?

Making Countdown When Mouse Stop Move
Hello i would like to make an action when the mouse stop moving
could someone help me thank

[F8] How Do I Get Things To Follow Things?
I'm trying to get the enemy follow what you control in an overhead game and my current actionscirpt is...

onClipEvent(enterFrame){
function locate(uuuxe) { //function name is locate()
xd=this._x-_root.uuuxe._x //the difference in-between this symbol's x and the other symbol's
yd=this._y-_root.uuuxe._y
npx=(xd+yd)/Math.pow(2,1/2)
npy=(yd-xd)/Math.pow(2,1/2)
if(npx>=0 && npy>=0) {
this._rotation=0
this._y-=2.5
return 1
} else if(npx>=0 && npy<=0) {
this._rotation=270
this._x-=2.5
return 2
} else if(npx<=0 && npy>=0) {
this._rotation=90
this._x+=2.5
return 4
} else {
this._y+=2.5
this._rotation=180
return 3
}
}
}

What am I doing wrong? Thanks!!

FlashNoobXanthus

Actionscript For Making A Rollover Sound Stop Straight Away When You Move Your Mouse
yo dudes

just wondering what the actionscript was to stop a sound that plays when you rollover a flash button.

I want to make it stop as soon as the mouse moves away from the button rather than have it play the whole sound clip every time, even when the mouse is no longer hovering over it

any ideas?

cheers

Having Shadow Follow Quick Moving Things
I'm trying to figure out how to make a certain effect. If you've ever seen Xiao Xiao, it's when something that's moving is followed by copies of itself, only with diminished alpha settings, so it looks kinda like the subway fight in the Matrix. Can I do this without doing it manually?

Here's a link to Xiao Xiao to see what I'm talking about:

http://www.newgrounds.com/portal/view.php?id=15849

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;
}}

TRIG - MC Follow Mouse Rotate Around Mouse Point
I have read and i think i 'fully' understand (unless it gets more complicated or what not) the trig tutorial, on this site.
no offence i cant remeber who's tut.

i can make a movieclip circle another movie clip,static or moving.

but now, i have a movie clip that follows the mouse pointer when the up key is toggled.

and i want this movieclip to rotate around the mouse point,when the left key is either pressed or toggled, and reverse this movement for the right key.

i have tried a few things for this i can not get it to rotate, it just seems to jitter randomly.

i have tried rotating a completely static MC around mose point which also failed..

any help thanks?

this is the code that makes the clip face the mouse, and move to its position.
its a function called from another function.

its followed from a tut but i do understand it. This is not what im having troublewith,this works.


Code:
myRadians = Math.atan2(_root._ymouse-MYCLIP._y, _root._xmouse-MYCLIP._x);
myDegrees = Math.round((myRadians*180/Math.PI))+90;
MYCLIP._rotation = myDegrees;
_root.yMove = Math.round(_root.yChange/20);
_root.xMove = Math.round(_root.xChange/20);
MYCLIP._y += _root.yMove;
MYCLIP._x += _root.xMove;
_root.yChange = Math.round(_root._ymouse-MYCLIP._y);
_root.xChange = Math.round(_root._xmouse-MYCLIP._x);
}
to make it clear what i want, a MC that will circle the mouse point, when key is down or toggled, this movieclip also needs to be capable of moving towards mouse point on key down or toggle.

Cheers.

Changing AS So Mouse Follow Is Switched To Mouse Repel?
So I'm using the .fla attached as a basis for an image scroller (thanks TheCanadian!) and I was just wondering what the process would be to invert it so the "follow" MC is being repelled by the mouse, rather than attracted.

Here's the code for quick reference...

"follow" is the MC following the mouse and "bounds" is the area in which "follow" can move freely.


Code:
follow.onEnterFrame = function() {
this._x += (Math.max(bounds._x + this._width / 2, Math.min(_xmouse, bounds._x + bounds._width - this._width / 2)) - this._x) / 5;
this._y += (Math.max(bounds._y + this._height / 2, Math.min(_ymouse, bounds._y + bounds._height - this._height / 2)) - this._y) / 5;
};
Thanks!

Making Things Appear
How can I set a button up so that when pressed a square appears, and then when it is pressed again the square disappears?

Also, if the above is possible, is is also possible to have the button cycle through a series of shapes. For example, when the button is pressed a second time the square disappears and a circle appears. Pressed a third time and the circle disappears and a triangle appears. Pressed a fourth time and all shapes disappear?

Thanks everyone in advance!

Mouse Follow With Delay When Mouse Over In Certain Area - HELP
Hi actionscript-gods!!!

I got a navigation bar and want a followmouse-object slide along on top of it with a little delay (delay not built in yet) as i move around my mouse in the navigation area. (in adition the object fades out when you don't move the mouse - but that part works and is not important here) My problem is that the object simply won't follow the mouse!!! I hope someone can help me...

Code explanations:

followmouse object = fader
container movie for fader = fadercontainer

Code for first image in _root:

var timeOut;
var maxTime = 2000;
function fadeUp () {
with (fadercontainer.fader) {
if (true == mouseMoved) {
if (_alpha<101) {
_alpha += 10;
} else {
mouseMoved = false;
timeOut = getTimer()+maxTime;
}
}
}
}

Code for fader:

onClipEvent (load) {
_alpha = 0;
function fadeDown () {
if (_alpha>0) {
_alpha -= 10;
}
}
}
onClipEvent (enterFrame) {
if (true == mouseMoved) {
_root.fadeUp(this);
setProperty ("_root.fadercontainer", _x, "_root._xmouse");
} else {
if (getTimer()>_root.timeOut) {
fadeDown();
}
}
}
onClipEvent (mouseMove) {
if (_root._ymouse>66 && _root._ymouse<110 && _root._xmouse>172 && _root._xmouse<689) {
mouseMoved = true;
}
}


Thanx in advance,
Ralf

Mouse Trailer To Follow Path Instead Of Mouse
I need help taking any old mouse trailer and having it follow a predetermined path (like a simple rectangle) instead of following the mouse cursor. I'm very new to flash and would love to be shown how to do this. I'm not even very clear on how you get a mouse trailer to work let alone disecting it and having it follow a path. I really just want to start with a black background, animate the process of drawing a rectangle, then follow the rectangle with an animation of sparks (I've seen some mouse trailers like this) of some sort (kind of like you're cutting a piece out with a blow tourch), then have the center of the rectangle fall away revealing a mask where I can show a scrolling slideshow. Easy right?! Well I don't think so and I could sure use the help!

Thanks in advance,
Tim

Cant Get Hide Mouse Follow Mouse To Work
I used a tortorial on making mouse cursors and mine will follow the mouse until I click one button and then it sticks and does not move, but my invisible mouse is active you just cant see where your draging it...!!!

any tips??

Making Things Disapear
Hi, i was wondering how you make things disaper, like if a black square goes over a pic you cant see that part of the pic in the final version that part of the pic... thanks for you help, and if you dont understand what im trying to get at here, ill be happy to try to explain more, or give some examples

Making THINGS LIGHTER
hi i'm trying to finalize my website:
http://lint.free.fr/THISISIT.html
the document you view there is three megs of weight, i'm on mac so i didn't find an optimizar to get it lighter. so i tried to get it lighter the right way i guess by slicing my single document into different movies i made three movies used the select unused items to delete the unwanted images and saved these files to my disk. Unlucky me i realised these filez supposed to be smaller are actually the same !!!!!
so how come they dont loose the k's they should ???

HEEEELPPPP !!
i just can't understand that !!

any help would be great
thanx....

Making Things Swing
I have some washing that needs to swing from a line and i am wondering how I can stretch and warp an image i have imported. For some reason I can't do it at the moment.

How do I free transform using the CTRL button? When i do it, nothing happens!

Making Things Zoom
hello everyone

how on earth do you make things zoom across the screen a la 2advanced.com etc. here is a good example of what im on about

http://www.webbasis.com/

after the world appears some text zooms across the screen but it is blurred a bit. awesome effect how do you do it??

thanks very very much

Making Things INVISIBLE
I want to have a keyframe that when I get's hit that it goes invisble.

I've tried

Code:
_root.tab1._visible= false;
_root.tab2._visible= false;
but that doesn't seem to work.

The MC tab1 and tab2 are on the _level0 and the keyframe that I want to trigger it is in a MC called backGroundFrame

Thanks for the help

Making Things 'grow'.
Hello.

I'm trying to recreate that classic 'growing' lines look, seen so many times. You know the one where a line draws itself out, done easily in After Effects etc but I have no idea how to do it in AS3.

Any pointers would be great.

A.

Making Things Move
Hey,
this is a stupid question i haven't used flash in a while. I know how to move objects from one side to the other. But, i remember you can use like the pencil draw like lines showing where you want to object to move and stuff like that but every time i try it doesn't work. Can someone tell me how to make my objects move using the pencil or whatever tool you need.

Making Fat Things Look Slim
Hi there,

Friend of mine has asked me to do a site for a sort of slimming world thing and I wanted to do a Flash intro where the letters drop in and look fat and then look like they lose weight, sort of slim down on screen and what have ya.

Have had a little play but nothing seems to look quite right.

Anyone got any suggestions????

Thanks a lot.

Molenski

Making Things Rotate
Hi gang,

Just wondering how some developers out there make shapes spin around. I am pretty new to the world of Flash and can't seem to get this working.

Here is an example of what I mean:
http://www.templatemonster.com/flash-te ... 12569.html

When the preloader hits 100% the graphic spins around a couple of times.

Any help with this would be great cause I don't seem to be getting anywhere.

:?

Thanks in advance if anyone can reply.

Making Things Visible/invisible
I'm working on a Graph Theory project, and I need the nodes of the graph to appear on the stage one at a time every 1/4 second.

In the first frame of my movie I placed this code:

vectorNodos = new Array();
for (i=0; i < 20; i++) { //There are 20 nodes
name = "nodo"+i;
vectorNodos.push(name); //saves name in an array for later use
this[name].label = i; //sets a textbox in the node to "i"
this[name]._visible = false; // makes it invisible
this[name].swapDepths(100 + i); //I need the nodes to be on top of everything else
}

A few frames (frame label: "nodos") later I placed this:

name = vectorNodos[i]; //gets the name from the array
startTime = getTimer();
currentTime = getTimer();
while (currentTime < (startTime+250)){
currentTime = getTimer();
}
this[name]._visible = true; //makes the node visible again
pop.start(0,0); //plays a popping sound
i++;

On the previous frame I set i to 0, and on the next frame I placed:

if (i<20) {
gotoAndPlay("nodos");
} else {
nextFrame();
}

Now this is the part that's driving me insane: The movie starts with the nodes invisible, and when it gets to the part where the nodes should start popping up, the sound plays properly (a "pop" sound every 1/4 second), but after the first node pops up, all the others pop up at the same time, and their labels are gone, and they're below everything else. I also tried changing their alpha setting instead of the visible setting, and nothing has worked so far. There's no other code or functions that involve the nodes, and I don't know what I'm doing wrong. Any suggestions?

Making Things Slowly Disappear
I'm sorry if this has been asked. I searched but couldn't find anything explaining this.

I want to have trees full of leaves, and then when the user mouses over them bit by bit, they slowly fall away to the ground and then fade to nothing. I'm talking about a fair amount of little tiny leaves here. What's the best way for me to go about this?

Problem With Making Things Invisible
I made a site. Its in as2. Then i made a 3d logo using papervision3d in as3. I made a loader swf that loads the as2 file and the as3 file. It works. The only problem is when you click on a button in the as2 file i want to make the as3 file disappear, then reapper when you re-enter the main screen.

Thanks

Making Things Black And White
So I got a picture lets say off the internet. And i would like to make it black and white using flash? How do I go about this? Thanks

Please Help With Making Things Visible When On A Rollover
I have one mc called mcTotalamber and another mc called mcText all i want is to hide the mcText on the start and then when you rollover the mcTotalamber it makes the mcText visible

I have started by hiding the mcText on a top action layer:

mcText._visible = false;

I am then stuck on how to make it visible by rollover, do i put the code on the actions layer or on the mcTotalamber itself, i think it is somthing like this:

on (rollOver)
{
mcText._visible = true;
}

Please help,

Neil

I'm Having A Problem Making A Few Things Work Right Together...
ok so there are two movies, 1 is the parent movie the other is a background image that is dynamically loaded into the parent.

in the first frame of the parent movie:


PHP Code:



choice = Math.round(Math.random()*0);
    switch (choice) {
    case 0 :
        blank.loadMovie("flash/image1.swf");
        break;
    } 




and


PHP Code:



Stage.scaleMode = "noScale";
Stage.align = "LT"; 




and in the first frame on the background MC:

PHP Code:



this.resizable_mc._width = Stage.width;
this.resizable_mc._height = Stage.height;
this.resizable_mc._x = this.resizable_mc._y = 0;
this.resizable_mc.onResize = function() {
        this._width = this.width;
        this._height = this.height;
};
Stage.addListener(this.resizable_mc); 




as you can see im trying to dynamically load a background image that will be 100% of the browser window size, it isnt working however!

thanks for anyones help!

I'm Having A Problem Making A Few Things Work Right Together...
ok so there are two movies, 1 is the parent movie the other is a background image that is dynamically loaded into the parent.

in the first frame of the parent movie:


PHP Code:



choice = Math.round(Math.random()*0);
    switch (choice) {
    case 0 :
        blank.loadMovie("flash/image1.swf");
        break;
    } 




and


PHP Code:



Stage.scaleMode = "noScale";
Stage.align = "LT"; 




and in the first frame on the background MC:

PHP Code:



this.resizable_mc._width = Stage.width;
this.resizable_mc._height = Stage.height;
this.resizable_mc._x = this.resizable_mc._y = 0;
this.resizable_mc.onResize = function() {
        this._width = this.width;
        this._height = this.height;
};
Stage.addListener(this.resizable_mc); 




as you can see im trying to dynamically load a background image that will be 100% of the browser window size, it isnt working however!

thanks for anyones help!

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