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




Movieclip That Follows Behind Cursor



hi all,

fantastic site, i've already learned a bucket! i cant find an answer to my very basic newbie question tho, so i wonder if anyone can help?

how do i get a movieclip to follow the cursor around the stage in mx? i want the movieclip to start in a fixed position onstage then after a second or two move slowly toward the cursor position, like its chasing it around. id like the movieclip to follow behind slowly, and to only catch up with the cursor if you hold it still.

ive found some examples of it happening here, but i can't get my head round the script in the examples! can anyone please spell it out for an out-of-his-depth newbie?

many thanks in advance for any help u can give



FlashKit > Flash Help > Flash Newbies
Posted on: 08-07-2003, 06:44 AM


View Complete Forum Thread with Replies

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

MovieClip And Cursor
How do I make a MovieClip to move after the mouse cursor, but only vertically? I want to stay on the same x position, but I want that the mouse move to change its y position? Please help me!

MovieClip Following Cursor
Hey everybody, I need a little help.

I'm trying to add a movieclip that's basically an image that says "click here" so that when I roll over a large invisible button it follows the cursor. I have it working for the most part, except I'm having one small problem.

I want the button to disappear when I roll off of the button, and then reappear when I roll back on. I have it disappearing when I roll off, but it won't come back. The actionscript that I have on the button is as follows ...

on (rollOver) {
Loader_mc.onEnterFrame = function() {
this._x=_root._xmouse+50;
this._y=_root._ymouse+10;
}
}
on (rollOut) {
unloadMovie(Loader_mc);
}

Any suggestions on how to make it come back?

Thanks

Movieclip Following Cursor. Help To STOP?
I want to make a movieclip follow the cursor usin onClipEvent(enterFrame)action.

In that mc there is a menu. (as seen on: http://www.nasa20.com)

I don't know how to stop movieclip to enable the menu button.

Could Anybody help me with this question??

thanks!

Slow Movieclip Following Cursor?
I've been trying to figure this code out and I cant, I'm fairly new to actionscript. It's starting to stick in my head though, I took c/c++/pascal classes in hs and its coming back to me. But, how would I code a movie so it would follow the cursor slowly and with approrpriate acceleration/decceleration values? So it'll go very slowly when it's clost to the cursor, and only slowly when it's far away from the cursor?

Movieclip Following Cursor - Needs To Stop
Hope someone can help.

Ive got an mc that follows the cursor and rotates to follow it thanks to some code off a tutorial that i dont really understand.

The MC is also animated. I need the rotation to stop when the MC reaches the cursor. I also need it to stop when it gets a certain distance from the cursor.

Any thoughts.....fla attached

Also, how easy is it to add some acceleration to the the MC as it follows?

Ta

Attaching Movieclip To Cursor...
i have attached a symbol (loaded from library) to the mouse... it works fine... except that now buttons on the stage don't work when you click on them??? Does anyone know why?

Here's the code I use to load and attach the movieclip to the mouse


PHP Code:



Mouse.hide();

var mouse:DisplayObject = new MouseCursor();
stage.addChild(mouse);

stage.addEventListener(MouseEvent.MOUSE_MOVE, MouseCursorMove);

function MouseCursorMove(e:MouseEvent):void
{
    this.mouse.x = this.mouseX;
    this.mouse.y = this.mouseY;
}




Is there a problem with the code?

I also tried saying...

PHP Code:



 mouse.startDrag();




which also worked fine except for the buttons not capturing events...

What is going on?

Changing Cursor To MovieClip
Please Help!!!!

I'm embedding a swf into a html document and I want my cursor to change to a movieclip every time I go over the swf. I have that working fine but my problem is when I place the mouse off the swf, the movieclip is still on the swf.

How do I make that movieclip disappear when I roll off the swf.

Thanking you in advance....

Custom Cursor On Certain Movieclip
K, I'm sure it's gotta be easy but my attempts are failing.. could be since it's monday end of day and i'm fried. Anyway, I have some movieclips (face1,face2, etc) acting as buttons. I also have a custom cursor with an up state, and a down state. I'd like to have the default cursor remain in use for the entire movie except for when a user interacts with the "face" movieclips.
Anyone got an example? Or an idea? I'd post what I had but I've been chopping it up so much it wouldn't even be relevant.
Thanks

eh, here's my code anywho...all it's doing at this point is replacing the default cursor for everything:

ActionScript Code:
cursor_mc.swapDepths(1000);startDrag ("cursor_mc", true);Mouse.hide();_root.onMouseDown = function(){    _root.cursor_mc.gotoAndPlay("down");}_root.onMouseUp = function(){    _root.cursor_mc.gotoAndPlay("up");}

Changing Cursor To MovieClip
Please Help!!!!

I'm embedding a swf into a html document and I want my cursor to change to a movieclip every time I go over the swf. I have that working fine but my problem is when I place the mouse off the swf, the movieclip is still on the swf.

How do I make that movieclip disappear when I roll off the swf.

Thanking you in advance....

Movieclip Following Mouse Cursor ?
how can i make a movieclip follow my mouse cursor with some delay ?? can any one help me out with this... ?? this is real urgent...

if u have any example that i can use i would be really greatfull...
mail me at sumeet_basak@yahoo.com

thanks a ton !

Movieclip That Avoids Mouse Cursor
I need actionscript for a movieclip (of a little birdie) that floats randomly around the screen, detecting the edge of the movie and changing direction, or wrapping, if necessary. This birdie must move away from the mouse when you try mouse-over it, ie: the bird flys away from the mouse cursor when it comes close, and then continues the random movement.

My brain has left me today, usually I would at least be able to figure out the random movement....any ideas?

Sliding Movieclip To Replace Cursor
Hi I will try to explain my problem coherently in the hopes of a reply

I have a menu of say four buttons. I have a movie clip that I want to indicate with a bit of elasticity which button you are hovering over (replacing the default cursor).

This is the code on the 'indicator' movieclip:

Code:
onClipEvent (load){
k= .7;
damp=.9;
}
onClipEvent(enterFrame){
ay=(_parent._ymouse -_y)*k;
vy+=ay;
vy*=damp;
_y+=vy;
}
How can I make this action stop when the cursor moves away from the button area?
And also, how can I make this indicator replace the cursor, but only while you are pointing at the buttons?
I tried:


Code:
onClipEvent (enterFrame) {
Mouse.hide;
}
but nothing happened...

Any suggestions or willingness to help is greatly appreciated,
Thanks.

P.s. In general, I was wondering does the use of onClipEvent (enterFrame) slow down the processor, or is it safe to use freely?

[F8] Movieclip Pointing To Mouse Cursor
How would you create the effect in this game: http://www.newgrounds.com/portal/view/375622
where the hero's gun/arms align up with the mouse cursor?

I'm guessing there is trigonometry involved and tracking _xmouse/_ymouse, but I'm not to sure. Any help is appreciated.

Here's what I have so far. I think the problem is in my math.
Any ideas.


Code:
onEnterFrame = function ():Void {
addScope();
var armY = _ymouse-this.hero_mc.arm_mc._y;
var armX = _xmouse-this.hero_mc.arm_mc._x;
var radians = Math.atan2(armY, armX);
this.hero_mc.arm_mc._rotation = radians*90/Math.PI;
};

function addScope():Void {
Mouse.hide();
scope_mc.onMouseMove = function() {
this._x = _root._xmouse;
this._y = _root._ymouse;
// updateAfterEvent used to refresh stage creating smooth cursor movement
updateAfterEvent();
};
}

Make Movieclip Stop When Cursor Stops
first let me say i am very new to actionscripts...
ok i have been researching for a couple of days and can't find an answer, so i have decided to ask. i have a mc that follows the cursor. i want it(the mc) to stop playing when the cursor stops moving.

Keeping Mouse Cursor Inside MovieClip - How Is It Done?
Hello Folks,

Been working on an ongoing project and i'm now required to keep the mouse cursor from going outofclip when the mouse button is being pressed. Anyone know how this can be achieved?

Thanks in advance.

Loader And Using Hand Cursor (Get Sprite Or MovieClip Our Of It)
Good morning everyone, I am having an issue over here. I have a loader that ... loads an image, but I can't get it to show the hand cursor (since the image is a link so to speak). With a label I can do a label.buttonMode = true; label.useHandCursor = true; since Label class is a son of Sprite or grandson or whatever, but loader isnt :S So I wonder, is there any way to get a Sprite or MovieClip out of a Loader object? Thanks for your time!

AS3 - Movieclip Doesn't Show Hand Cursor
I have a class that allow you to rollover and rollout the movieclip. I just can't get the arrow to change to the hand cursor when it rolls over the movieclip. I have tried mouseChildren and useHandCursor which doesn't change anything.


Code:
package
{
import flash.display.MovieClip;
import flash.events.MouseEvent;

public class NavButton extends MovieClip
{
public function NavButton()
{
this.addEventListener(MouseEvent.ROLL_OVER, dim);
this.addEventListener(MouseEvent.ROLL_OUT, bright);
}

private function dim(event:MouseEvent):void
{
this.alpha = .75;
}

private function bright(event:MouseEvent):void
{
this.alpha = 1;
}
}
}

Getting An Arrow (movieclip) To Rotate And Point At The Mouse Cursor?
Hi all, my first post. Hopefully some helpful folks will help me out

I'm not sure how to script this, and am struggling to find something that demonstrates it to me.
I simply want a movieclip (which will be an arrow) to constantly point at the mouse cursor. So it will be rotating around, as if looking at the cursor as you move it around the screen.

it doesnt actually have to point at the mouse cursor though, it could just point at another movieclip, which the user will drag about.

does anyone have a script lying around that could do this? Or know of a fla somewhere that i can use?

thanks!
Phil

Assign Cursor Action To MovieClip Using OnRollOver Action?
Hi all

I have a cool component from FlashLoaded which lets me create brilliant 3d layouts with out much hassle. The componet uses the cursors to zoom in zoom out and pan left and right.

I dont want to have to put an explanation on the site, I would like to put some invisible mc's or buttons on the stage that when the user rolls over them with the mouse it triggers that action.

Is there a simple piece of code i can place on the buttons to make this happen?

Many thanks in advance

Greg

Flash Script - Cursor Trick 1: Cross Hair Cursor
This is a dedicated thread for discussing the SitePoint article 'Flash Script - Cursor Trick 1: Cross Hair Cursor'

Flash Script - Cursor Trick 3: Cursor Tracking Effect
This is an article discussion thread for discussing the SitePoint article, "Flash Script - Cursor Trick 3: Cursor Tracking Effect"

Cursor Speed And Direction Math To Jump Cursor
Looking for a little help.

I have a project that implements a jump type of desktop mouse interaction. Basically what this does is ...when the user moves the mouse, if moved fast enough (beyond a set speed threshold) the mouse jumps a predetermined amount in the direction the mouse was originally traveling. So I've tried to break it down this way.

First I need to calculate the speed. Based on the below code I can calculate speed on x and y axis but not sure how to evaluate overall speed as a function of both together.


Code:
attachMovie("mouseMC","mouse_mc",1000);
mouse_mc.onLoad = function() {
Mouse.hide();
};

var vxMouse:Number = 0;
var vyMouse:Number = 0;
var xi:Number = _xmouse;
var yi:Number = _ymouse;
mouse_mc.onEnterFrame = function() {
vxMouse = _xmouse - xi;
vyMouse = _ymouse - yi;
xi = _xmouse;
yi = _ymouse;
_root.speedX =vxMouse;
_root.speedY =vyMouse;
_root.cordX =xi;
_root.cordY =yi;
setProperty(this, _x, _root._xmouse);
setProperty(this, _y, _root._ymouse);
updateAfterEvent();
};
I have also added some code to provide a cursor trail.

Code:
onClipEvent (mouseMove) {
if (i >= 100) {
i = 0
}
i++;
this.duplicateMovieClip("flare"+i, i+10);
_root["flare"+i]._x = _root._xmouse;
_root["flare"+i]._y = _root._ymouse;
}
onClipEvent (enterFrame) {
if (this._name == "flareMC") {
_visible = 0;
} else {
this._alpha -= 5;
this._rotation += 2;
this._xscale -= 5;
this._yscale -= 5;
if (this._alpha<=5) {
removeMovieClip(this);
}
}
}
The next part is to evaluate the direction. Now I have done this in reference to a set spot MC using the following code accept that it doesnt update as the mouse moves therefor its only provides the direction from the starting point. Is there a way to update this on the fly as the mouse moves.

Code:
onClipEvent (mouseMove) {
//mouse angle code
x = this._xmouse;
y = this._ymouse*-1;
angle = Math.atan(y/x)/(Math.PI/180);
if (x<0) {
angle += 180;
}
if (x>=0 && y<0) {
angle += 360;
}
_root.angletext = angle;
updateAfterEvent();
}
Thirdly once I have the the speed and the direction how to I go about jumping the mouse distance x in the direction the mouse was moving?

I hope I explained this well enough...if not please shooot me some questions. Any help would be greatly appreciated.

Hand Cursor Turns To Text Cursor Over Button
if you goto the action section and then click the 13th from the left. ( kris foley) the hand turns to a text thing.

I'm not sure whats going on.

Thanks

http://www.ryanhamiltonphotography.com

Custom Cursor To Return To The Regular Mouse Cursor
How can I get my custom cursor to return to the regular mouse cursor when in the bottom 3rd of my flash movie. I need to do this for nav functions and I want the regular cursor actions in this area. So to recap: within the top 2/3 of the movie I will have my custom cursor, upon entering the bottom 3rd of my movie I need the cursor to switch back and vice verse...

my code below, please any suggestions are very helpful as I have tried several things:

stop();

import flash.events.Event;
import flash.events.MouseEvent;
import flash.ui.Mouse;

Mouse.hide();

stage.addEventListener(MouseEvent.MOUSE_MOVE, moving);
function moving(evt:MouseEvent):void {
if (cursor.currentFrame != 0) {
cursor.gotoAndStop(1);
}
cursor.x = stage.mouseX;
cursor.y = stage.mouseY;
cursor.mouseEnabled = false;
evt.updateAfterEvent();
}





//These three eventlisteners are telling flash to "listen" for specific events
//in our case if the mouse moves and if the mouse button is down or up.
//then if one of these events happens, it calls a function (mouse_down, mouse_up or moving).
stage.addEventListener(MouseEvent.MOUSE_DOWN, mouse_down);
stage.addEventListener(MouseEvent.MOUSE_UP, mouse_up);


// This is how to construct a simple function,
// this function will write in our text field "mouse is moving"
// when the even is raised by the eventlistener

// function just like above, just for the mouse down event.





function mouse_down(e:MouseEvent) {
if (mouseX < 800 && mouseY < 450) {
timer.start();
timer2.start();
}
}

// function just like above, just for the mouse up event.
function mouse_up(e:MouseEvent) {
timer.stop();
timer2.stop();
}

Thanks again and help!

How Do You Get The Hand Cursor? Not The Finger Cursor
how do you get the hand cursor with all 5 fingers spread out, and when u click down the hand looks like it grabs the object.

thanks

MC Follows The Cursor. How To Restrict The MC Movement And Not The Cursor?
I am trying to make something similar to this idea but my MC has a couple of buttons that follow the standard cursor - which is not hidden.
The movieclip movement is working by using:

Code:
onClipEvent (enterFrame) {
this._x += (_root._xmouse-this._x)/25;
this._y += (_root._ymouse-this._y)/25;
}
At the moment with this code, the button mc follows the mouse over the entire stage. I am trying to figure out how I can limit the movement to a smaller proportion of the stage, by either a hit area or some other method
Obviously I wont want this to effect the normal cursor movement, just the MC that follows it. Anyone give me a clue of how I should go about trying to do this?
Thanks

Set Cursor To I-cursor Usually Seen Over Textfields
I want to us AS to set the cursor so that it's the I-cursor that's over a textfield. In this case, it would be over a text field, but one that's in a movieclip that has an event handler for it. Because of that _parent event handler, the cursor is a hand when the mouse cursor if over that field. Is there some way I can change the cursor to the I-cursor? Do I need to make a bitmap of the cursor and use it as a custom cursor? I'd prefer not to do it that way if I can avoid it.

On HitTest To A Movieclip(a) By Movieclip(b)i Want To Attach Another Movieclip(c) To
on hitTest to a movieclip(a) by movieclip(b)i want to attach another movieclip(c) to movieclip(b)which is in the stage,so how to do it??
can anybody help on this???

? Resize Stage To Dynamically Match External Movieclip Loaded Into Empty Movieclip
Hi all,
Does anyone know how I can resize the stage to match the size of an external graphic/movieclip which is loaded into an empty movieclip,
thanks

? Resize Stage To Dynamically Match External Movieclip Loaded Into Empty Movieclip
Hi all,
Does anyone know how I can resize the stage to match the size of an external graphic/movieclip which is loaded into an empty movieclip,
thanks

? Resize Stage To Dynamically Match External Movieclip Loaded Into Empty Movieclip
Hi all,
Does anyone know how I can resize the stage to match the size of an external graphic/movieclip which is loaded into an empty movieclip,
thanks

#1009 Error Movieclip Inside Movieclip Changing The Alpha Property
Problem:
I'm getting this "TypeError: Error #1009: Cannot access a property or method of a null object reference."
What's happening in the flash file is that I've got a movieclip inside a movieclip and when you roll over one of the movieclips the alpha setting for the movieclip inside the initial movieclip is set to 1, then it transitions out back to 0 over a period of time.

var myTween:Tween = new Tween(event.target.parent.ripple_mc, "alpha", Strong.easeOut, 0, 100, 24, false);

It seems to be random but eventually after rolling over the several movieclips on the stage the error comes up. Sometimes the alpha setting stops working and will continue to be visible even though it should have stopped and be invisible after 24 frames.

Would love some help on this.

Cheers

#1009 Error Movieclip Inside Movieclip Changing The Alpha Property
Problem:
I'm getting this "TypeError: Error #1009: Cannot access a property or method of a null object reference."
What's happening in the flash file is that I've got a movieclip inside a movieclip and when you roll over one of the movieclips the alpha setting for the movieclip inside the initial movieclip is set to 1, then it transitions out back to 0 over a period of time.

var myTween:Tween = new Tween(event.target.parent.ripple_mc, "alpha", Strong.easeOut, 0, 100, 24, false);

It seems to be random but eventually after rolling over the several movieclips on the stage the error comes up. Sometimes the alpha setting stops working and will continue to be visible even though it should have stopped and be invisible after 24 frames.

Would love some help on this.

Cheers,

Sarge

Control A Nested MovieClip From A Button Component Inside A Seperate MovieClip.
I am a beginner in using Flash and Action Scripting.

This is the Scenerio:

I want to control a movieclip that is inside of another movie clip.
I control it from a button component that is inside of a seperate movie clip.

test = button component instance name
test1 = function
test2 = Movieclip instance name
test3 = Movieclip instance name
testbutton = movieclip name where button component is located

I am able to control a movieclip on the main timeline with the following AS 3.0:

test.addEventListener (MouseEvent.CLICK, test1);
function test1(event:MouseEvent):void
{
event.target.root.test2.gotoAndPlay(2);
}

I want to control a movieclip inside MovieClip1.

I tried this:

test.addEventListener (MouseEvent.CLICK, test1);
function test1(event:MouseEvent):void
{
event.target.root.test2.test3.gotoAndPlay(2);
}

The movie loaded fine when I tested but got this error when I pressed the button:

TypeError: Error #1010: A term is undefined and has no properties.
at Untitled_fla::testbutton_26/test1().

Please help!!!!!!!!!

MovieClip.onRelease = MovieCLip.Protoype Function Fails To Execute Properly
Dear all,

I created a simpe function:

MovieClip.prototype.hiMe = function(me, theRest)
{
//declare the format colors white and grey
formatMe = new TextFormat();
formatMe.color = Colors[0];
formatMe.font = "Adventure Subtitles";

formatTheRest = new TextFormat();
formatTheRest.color = Colors[1];
formatTheRest.font = "Adventure Subtitles";

// assign grey to theRest
for (i =0 ; i < theRest.length; i++)
{
theRest[i].tfield.setTextFormat(formatTheRest);
}
// make the me white
me.tfield.setTextFormat(formatMe);

}

when I call it (bar[0] is an array of objects)
bar[0].invar.onRelease = hiMe(bar[0],bar);

it executes on load regardless of the onRelease eventHandler and the ownards it does not execute when exciting the event.

does somebody know why this may be?

Cheers

DDT

MovieClip.onRelease = MovieCLip.Protoype Function Fails To Execute Properly
Dear all,

I created a simpe function:

MovieClip.prototype.hiMe = function(me, theRest)
{
//declare the format colors white and grey
formatMe = new TextFormat();
formatMe.color = Colors[0];
formatMe.font = "Adventure Subtitles";

formatTheRest = new TextFormat();
formatTheRest.color = Colors[1];
formatTheRest.font = "Adventure Subtitles";

// assign grey to theRest
for (i =0 ; i < theRest.length; i++)
{
theRest[i].tfield.setTextFormat(formatTheRest);
}
// make the me white
me.tfield.setTextFormat(formatMe);

}

when I call it (bar[0] is an array of objects)
bar[0].invar.onRelease = hiMe(bar[0],bar);

it executes on load regardless of the onRelease eventHandler and the ownards it does not execute when exciting the event.

does somebody know why this may be?

Cheers

DDT

#1009 Error Movieclip Inside Movieclip Changing The Alpha Property
Problem:
I'm getting this "TypeError: Error #1009: Cannot access a property or method of a null object reference."
What's happening in the flash file is that I've got a movieclip inside a movieclip and when you roll over one of the movieclips the alpha setting for the movieclip inside the initial movieclip is set to 1, then it transitions out back to 0 over a period of time.

var myTween:Tween = new Tween(event.target.parent.ripple_mc, "alpha", Strong.easeOut, 0, 100, 24, false);

It seems to be random but eventually after rolling over the several movieclips on the stage the error comes up. Sometimes the alpha setting stops working and will continue to be visible even though it should have stopped and be invisible after 24 frames.

Would love some help on this.

Cheers,

User Input Creates MovieClip Made Of MovieClip Symbols
Hello. I need some help either with my situation or with the search terms I'm using to try to find an answer.

I am using Flash MX Pro 2004.
I have drawn letters A-Z in Flash in two different styles (for example one that is furry and another that looks like metal). I would like users to select a text style (furry or metal) and enter text via text input field. When they have pressed an Enter button I would like the word to appear made up of the drawn symbols that I created.

I don't want to make an actual font. Any ideas on search terms to find the sort of thing I am looking for? Here's some that I've tried already:

convert text to symbols -- I get tons of results talking about putting textfields in symbols.

user input to symbols -- almost same results as above

custom fonts using symbols -- I get results talking about how to embed fonts and making text bold, italic, etc. Also not what I'm after.

All help is appreciated. Thanks in advance.

Scott

Receive Full Path To A MovieClip, Return A MovieClip Reference.
Hi, I got this function...

Code:
Function getMCPath(path:String)
{
var MC:MovieClip;
MC = eval(path)
return MC;
}

If I send "_level0" this will return _level0, but if I send "_level0.myMC" this will return undefined.

what should I do in order to get full path to _level0.myMC

Thanks in Advance,
DMZ

How To Hide My Current Movieclip And Display 2nd Dynamically Created Movieclip?
I have a movieclip in which there is an image create this movieclip dynamically by reading the oath of the image from file and play an effect. its working fine, now i want to hide this MC after its effect is ended and then dynamically want to create the other MC and similarly so on. how to do that. my code is as below:

var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(this);

lv.load("data.txt");
var my_lv:LoadVars = new LoadVars();
my_lv.load("data.txt");
my_lv.onLoad = function(success)
{
if (success)
{
if(this.pic1!=undefined)
{
var ImgMc:MovieClip = createEmptyMovieClip("ImgMc", getNextHighestDepth());
_root.mcLoader.loadClip(this.pic1,_root.ImgMc);
//Some effect on ImgMc

//how to hide the ImgMc whe nits effect is played and then load another image in a movieclip and so on
}
}
}

Load Movieclip From Libary Into Another Blank Movieclip On Stage (URGENT PLEASE)
hi all i just need to know how to load a movieclip into a blank movie clip all in the same movie?! please help many regards peter thanks in advance!

Movieclip Rollover Effect Disables Internal Movieclip Buttons
Is it possible to have a movieclip rollover effect with another movieclip inside of it that is able to be clicked and do what it's scripted to do?

Let me try to get specific...


Movieclip 1 -- Has www.kirupa.com/developer/mx2004/button_effect.htm applied

Inside of Movieclip 1 --> Buttons that appear visible when you rollover the menu (it comes out of eases into view)

These buttons inside are not being allowed to be pushed because from what I can gather, the complex rollover is not allowing anything to be activated except the rollover effect.

So here's a diagram:

Rollover Movieclip 1 --> Eases it's bottom part up revealing 4 buttons --> These buttons when clicked are supposed to do an action --> Buttons cannot be activated for some unknown reason.

Can anyone help me out? I'm out of ideas after working on this for the past hour or so. If you need any extra info or materials, let me know; I'm sitting right here working on this problem haha.

-Indecisive

Problem With OnRelease For MovieClip Inside Draggable MovieClip [Flash Pro 8]
I have a movie clip, circle_mc, and in it is embed another movie clip, point_mc. I made the circle draggable with this:


Code:
circle_mc.onPress = function() {
startDrag(this);
};
circle_mc.onRelease = function() {
stopDrag();
};
and that part works fine.

I also want to be able to click on point_mc which is within the circle_mc movie clip. So, I added this:


Code:
circle_mc.point_mc.onRelease = function() {
trace("click was successful");
}
This does not work, and I'm pretty sure it is BECAUSE its parent clip is draggable and therefore has its own onRelease function. (If I comment-out the drag code, then the other code works as intended.)

Is there any way to do this or am I out of luck?

How To Load Image Into Movieclip Inside Movieclip That Is Dynamically Created?
Hello Kirupa Cats!

I am building a menu from an XML file, and I'm cool with cyclying thru the xml data to create menu items.

For every menu item in my XML file, I'm using attachMovie to insert a movie clip called menuitem from my library into a movieclip called menuholder. This works no problem, my menuholder movieclip is poplulated with as many menuitem movieclips from the library as designated by the xml data.

However, inside the library movieclip called menuitem, I have another movieclip on its stage, called mc_menuImage. I want to load an image into that movieclip, and I'm taking the URL for the image from the XML data.

My problem is I can't seem to figure out how to fully identify the movieclip mc_menuImage to load the image. It may have something to do with the fact that the library movieclip is being loaded dynamically, but the movieclip inside the library movieclip exisits pysically on the stage. I don't know...here's the code I'm working with:

THE CODE:

var xmlMenu:String = "menu.xml";
menuholder = createEmptyMovieClip("menuholder", -1);

var xmlMenuData:XML = new XML();
xmlMenuData.ignoreWhite = true;
xmlMenuData.load( xmlMenu );
xmlMenuData.onLoad = function(loaded) {
if (loaded) {
var mImage:Array = new Array();
var mRootNode = this.firstChild.childNodes;
totalMenuItems = mRootNode.length;

// fill array
for (var i = 0; i<totalMenuItems; i++) {
mImage.push(mRootNode[i].attributes.menuImage);
}
}

//make the menu
for (var i = 0; i<totalMenuItems; i++) {
var menuitem = menuholder.attachMovie("menuitem", "menu"+i, i);
menuitem.id = i;

/* now here I thought I could just do this: */
menuitem.mc_menuImage.loadMovie(mImage[i]);
/* but that doesn't work... */

};


When I trace menuitem I get this: _level0.menuholder.menu0, _level0.menuholder.menu1, etc, so I figured the syntax menuitem.mc_menuImage would identify the movieclip inside menuitem, but to no avail. Maybe it has something to do with levels, I'm not sure...

So I don't know, any suggestions? Thanks so much!!!

How To Scale The Movieclip Without Transform The Text Inside That Movieclip Uisng As
hi
how to scale the movieclip without transform the text inside that movieclip uisng actionscript


thanks in Advance

Wait Till Movieclip Gets To Particular Frame Then Play Another Section Of Movieclip
Hi,

I'm trying to reconstruct http://www.kswissfreerunning.com/AU/ with movies of my own.

Basically I have an array that contains the letters the user enters and I have the movie in a separate moviecilps with labels representing the letters.

I have a (what I think) logical set of code here to run through each letter in the user enters:

Code:
for(var k=0; k < letterArray.length; k++){
movie_mc.gotoAndPlay(letterArray[k]);
}
The problem is that it will only play the last letter the user enters. How am I able to make my flash wait till it gets to the end of a section of the movieclip, then play the next one, without it rushing to go straight to the last letter.

My pseudocode looks like this:

For the length of the array
play the next letter
when that letter movie gets to the end
play the next letter

Thanks in advance.

Loading A Movieclip On The Main Stage From A Button Within A Movieclip - Big Headache
Hi there,

i am trying to put together a portfolio site, which uses a 'floating' panel with buttons on it. In order for it to move around it has to be a movieclip. So all the buttons are stored within a single movieclip, which is giving me a headache because i want those buttons to load other movieclips from my library onto the main stage (as like a popup window within the flash)

Its all slightly confusing. i have tried using this code based within the movieclip where my button is based:

button_play.buttonMode = true;
button_play.addEventListener(MouseEvent.CLICK, OpenBox);
function OpenBox (e:MouseEvent):void{
this.addChild(new mc_box());
}


button play is within a movieclip called mcTweenMe2 (which is on the main timeline) and i want the movieclip to be loaded on the main timeline (not within in the movieclip where the button 'button_play' is based) mc_box is the movieclip i wish to load on the main timeline (in the centre) with the ability to close it also!

Bit of a headache, please help me someone i have run out of sites to look for answers!

PS: does anyone know why stop (); wont stop my timeline playing like it used to in AS2? beacause another option for making my site work is making this button target labeled frames in the main timeline, however stop (); don't seem to work now!

Thanks!

[HELP] DuplicateMovie / AttachMovie Movieclip Located Inside A MovieClip To Root
As title.

Example:
I have a movieclip(innerClip) inside a movieclip(mainclip).
Is there anyway if I duplicate / attach my innerclip to my root stage? So I can access it like _root.innerclip2, instead of normal duplication that make to _root.mainclip.innerclip2

Thanks in advance.

Control/sinc Video Movieclip And Text Movieclip
Here´s a tricky one:

I need to sincronize/control a movieclip with texts and a swf (a video) that I loaded, both on the main timeline.

I have a swf (a video) that I loaded in a movieclip into my flash file and a movieclip with texts in it. Both are on the main timeline. Trouble is if the movie is playing and I want to pause it, for example, the swf video pauses but the texts movieclip keeps on playing. If I rewind it, the swf video goes back, the text movieclip still keeps on going. You get the picture.

For control I´m using a camtasia component - camtasia is the software I made the video with. I´m not putting the movie straight into the flash file because the swf made with camtasia turns to be way smaller that if I just loaded into flash.

I´ve attached a txt file with the controller script. Also i´ve put for download the flash file i´m talking about (flashsinc.zip) so you can better understand what I mean. Here´s the adress:

http://www.altoqi.com.br/temp/flashsinc.zip

Thanks a lot.

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