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




Help With Controlling A Movie Clip



The problem I have is when i select to move the movie clip, i can't get it to stop animating when i tell it to go to a certain place.

Can anyone fix this for me?

Thanks



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 04-18-2004, 08:51 AM


View Complete Forum Thread with Replies

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

Controlling A Movie Clip From A Button Inside Another Movie Clip.
I'm confusing myself just typing this.

I'm working on an interactive map. The map itself is a MC inside a container, but also contains all the buttons as well. On my main stage(scene 1 and menu) is a window(MC) that will show info and photo of building. Now if I create a button on the main stage I can control the movieclip(images) easily. But when I use a button from inside map(MC) it doesn't seem to recognize the (images.gotoAndStop(frame))command.

I'm just not sure what to put in order to be able to control the MC's timeline from within that map movieclip.

Sorry if this is confusing. Of course at the same time it might be a simple solution for most people here as well. At least that is what I'm hoping anyways.

Controlling The Playhead In A Movie Clip Via Buttons In Another Movie Clip
Alright, first off, I've tried literally everything I can think of, and all of the scripting looks perfect (from what I understand), so I can't think of what could possibly be wrong with the script.

Here's some information upfront about where these movie clips are located:

Main Timeline > tv_mc
Main Timeline > menu > menu2 (buttons controlling tv_mc are located here)

(Note: menu2 is a graphic, not a movie clip. It was only made so that I could move the menu itself without tweening several layers.)

Here's what I want to accomplish:
I want the buttons inside of menu2 to control the playhead in tv_mc, a movie clip. The first 25 frames of tv_mc are just the "stage" moving into view so that the information can be displayed.

There are five buttons in menu2 containing the following script:


Code:
on (release, releaseOutside) {
if (!mainwindow) {
_level0.tv_mc.gotoAndPlay(1);
mainwindow=1;
_level0.tv_mc.set(framenext, bio);
} else if (mainwindow==1) {
_level0.tv_mc.gotoAndStop(bio);
}
}


"bio" is the name of the frame in tv_mc. Basically, what I want this to do is check and see if the "stage" is already viewable, and if it isn't, to display the stage and then display the information as well, which is the purpose of storing the frame name in "framenext".

tv_mc also has this code:

Code:
if (!framenext) {
stop();
} else {
gotoAndStop(framenext);
}






At the moment, the menu buttons work to display tv_mc, but wont move the playhead past 25. I'm guessing that the "framenext" variable is somehow not getting any information, or not getting any information across to tv_mc from menu2.

I'm really effing lost at this point. Any help at all? I'd post the .fla, but the size is pretty big. :T

Controlling A Movie Clip Inside Another Movie Clip?
I've had my share of problems with this one...I hope someone knows what the hell I'm doing right/wrong and could help me out

Okay, I made a movieclip to put the blocks(which are movieclips too) in a breakout clone.

lets give the container movieclip the instance name "container"...the blocks are preset in that container with their own instance names...what I want to do is a hittest with those blocks but I found out that...

(this.hitTest(_root.container.block1)) doesn't work.....any ideas why?

even changing the x and y properties of the blocks doesn't work...
(_root.container.block1._x = 5)

Controlling Another Movie Clip
I can control a movie clip with next action or "tell target".
mc1.gotoAndStop(2);


I can also control the main frame in a movie clip with
next action.
root.gotoAndStop(2);


I don't know how to control a movie clip(mc2) with the action in another movie clip(mc1).

I have tried to put next action into the movie clip1(mc1)
to control the movie clip2(mc2).
However it doesn't work.

mc2.gotoAndStop(2);
root.mc2.gotoAndStop(2);

Thanks in advance

John

Help Controlling A Movie Clip
I have a movie clip in which I would like to sit static on the stage until the user mouses over it. Upon mouseover, I would like it to play just once, and continue to play if the mover mouses away from it.

Controlling A Movie Clip
can anyone tell me how to control a movie clip on the timeline with buttons on another layer? (ie.play and stop)

Controlling A Movie Clip Please Help
This isn't hard I am just having problems!

I have a series of buttons on the left side of my completely flash site.

I want to be able to roll-over a button and have text fly in from the right and then disapear when your roll-out.

What is the code for this?

How do you set up the text movie clip?

Thank you!!

Controlling A Movie Clip
Hello everyone!

Let's say I have a movie clip containing 2 pictures in 2 separate frames. I have 2 buttons on the stage and the movieclip, first button should show first picture and second button second picture. How can I pass the action to tell the movieclip clip to go the first picture when the first button is clicked??

Any help would be appreciated!

Thanks in advance.

Controlling One Movie Clip From Another
Is it possible to use the tell target command from within movie clip 'A' to control movie clip 'B' that is in the same scene? Having trouble getting this to work... sorry if this has been asked before. Thanks!

Controlling Movie Clip
I have two buttons (ON and OFF) on two seperate layers and a movie clip animation on a third layer all on the root timeline in frame one. I want to prevent the movie clip from playing until I use _root.MCname.play(); to start the movie clip animation. How can I keep the animation from playing and invisible until I am ready for it to play? Do I need to put the MC in another frame? Any help is appreciated. Thanks in advance.

Controlling A Movie Clip
Hi,

first of all, i wanna thank all those who helped me through all my projects, i really appreciate their help

i have a new question ...

I want to design a menu that the main items open as doors revealing the links behind them when the mouse is over the door. the code is something like this:

on (rollOver) {
var varStart = 1;
while (varStart < 25) {
tellTarget (this) {
gotoAndStop(varStart);
}
varStart++;
}
} this code should run when the mouse is over the door , the door is a movie clip with a motion tween. and it moves as the "varStart" change. The motion is on a 25 frame. It's not working, the door is standing still as if the mouse did not move. HELP

Controlling Movie Clip
Hi there! I need help controlling a movie clip I am developing a website and need some more advanced action scripting to what I am used too.

I need a script that will play the remainder of the existing movie eg (outro transition) then open and replace with another external movie clip.

I hope this makes sense please see...

http://www.gingermonkeys.com/taster/masters/

Please you are my only hope!

Madina

PS. bring back normal mode in flash!

Controlling Movie Clip
Hello, please help..

Why does it work fine this way:
_root.mc_portfolio1.play();

But it doesn't work this way:
i = 1;
holder="_root.mc_portfolio"+i;
holder.play();


???????????????????????

Controlling Movie Clip
I have a movie clip called "Clip". How do i do things like, get the numbe of frames, and set the current frame? Im trying this, but it doesnt work:

Clip._currentframe = Var

(var being a number)

what am i doing wrong?

Controlling A Movie Clip?
Anyone know of a tutorial or how to do something like this?

http://www.iceni-tv.co.uk/flash/home...r.swf?homepage

Thanks.

Controlling Movie Clip With Xml
Hi everyone

I'm posting this again as i still haven't found a word on the net about controlling a movie clip from an xml when you click on a tree structure.

So far, i can have external hyperlinks on tree nodes, but i don't know how to get a clip to move in the timeline as i click on a node.

What i'm doing is basically having a listing of pharmacists opened on saturdays and sundays, and when you click on one of them (child node in a tree), it will point to a frame on movie clip instance .maps. with gotoAndPlay where each frame will load the specified pharmacy's location on the googlemap component with lat long, and zoom unit specified within the frame's actions (i haven't gotten around to placing an icon on the center as i'm trying to get this resolved.)

I'd really appreciate someone pointing me the way on this, it's been almost my second week busting myself with the docs, forums and other papers around the net. The closest i got was someone posting a similar thread but it fizzled away...

[CS3] Controlling Movie Clip With Xml
Hi everyone

I'm posting this again as i still haven't found a word on the net about controlling a movie clip from an xml when you click on a tree structure.

So far, i can have external hyperlinks on tree nodes, but i don't know how to get a clip to move in the timeline as i click on a node.

What i'm doing is basically having a listing of pharmacists opened on saturdays and sundays, and when you click on one of them (child node in a tree), it will point to a frame on movie clip instance .maps. with gotoAndPlay where each frame will load the specified pharmacy's location on the googlemap component with lat long, and zoom unit specified within the frame's actions (i haven't gotten around to placing an icon on the center as i'm trying to get this resolved.)

I'd really appreciate someone pointing me the way on this, it's been almost my second week busting myself with the docs, forums and other papers around the net. The closest i got was someone posting a similar thread but it fizzled away...

Controlling A Swf Thru A Movie Clip..
Im loading a swf thru a movie clip, now once that reaches the end, i want to automatically load a different swf, is there a way to do this?

heres my current load code :

var i =new Loader();
i.load(new URLRequest("test2.swf"));
myContainer.addChild(i)

thanks for the help

Controlling Movie Clip With FLV
Is there a way to control a movie clip, so that when an FLV file finishes playing, it goes to the next frame?

like if the FLV clip is loaded into frame 1. and on frame 2 there is an image, I want it to goto frame 2 as soon as the FLV movieclip is finished playing. is this possible? hellllllp

Controlling A Swf Thru A Movie Clip..
Im loading a swf thru a movie clip, now once that reaches the end, i want to automatically load a different swf, is there a way to do this?

heres my current load code :

var i =new Loader();
i.load(new URLRequest("test2.swf"));
myContainer.addChild(i)

thanks for the help

Controlling A Movie Clip...
I have a movie clip, say the movie clip has 30 frames. The first 15 frames, a guy walks from the left to the middle of the stage, in frame 15 the action is "stop", when you click a button, the guy walks to the right of the stage. However, when the guy is walking TO the middle, i.e btw frames 1 and 15, if I click on the button, it jumps to frame 16 so there is a slight skip in the motion. I believe my options are either to disable the button until the guy gets to the middle of the stage then re-enable it, or control the movieclip in such a way that he just walks to the right - which I am not sure how to do. If any one can help or has better suggestions ...... please help.

Controlling A Movie Clip
Hi! Ok I think their is a simple solution to all of this but I need a bit of help :-/ If I have a movie clip called "movie1" with an instance name of "movie1" and I want to controll it with a button on the main stage, (out of the movie clip) I thought the following should work:

on (release) movie1.play( )

But no joy :-/ any idea why?

(P.S Im new to action scripting so if. pos, keep it simple!) Thanx!

Controlling A Movie Clip
I have a movie clip on the main timeline. Well, actually i have 30 of them, all on different frames. It's basically a flash version of a powerpoint file that i've designed. Each of these movieclips have been named something unique but similar (eg. movie1 on frame 1, movie2 on frame 2) and i would like to be able to put the code that essentially says:
movie1.stop(); or movie1.play();
I am trying to have a pause button that will execute that code. What i need is a way to reference this frames' movie clip. I've tried
['m' + _root._currentframe].play();
it doesn't like that. or any other method i've tried. I basically just need the syntax for dynamically specifying the name of the movie clip i'm referencing. Any ideas?

Controlling A Movie Clip?
i am new to flash and i have made an animation on multiple frames and turned it into a swf movie.

how can i make the movie start when clicked on, play through once ,then stop and not continue to loop?

also once the movie is finished it needs to continue to show the last frame of the movie and not go back to the first frame when the movie stops.

it is important for me that it can be done in only one frame.

thank you

EDIT: it is in actionscript 2





























Edited: 12/02/2008 at 11:51:34 AM by stgodd

Help With Controlling A Movie Clip
The problem I have is when i select to move the movie clip, i can't get it to stop animating when i tell it to go to a certain place.

Can anyone fix this for me?

Thanks

Controlling One Movie Clip From Another
What is the best way or controlling one movieclip from anoither. Pretty much want my menu and contentas two separate files but of course i need to contol my content from the menu. Any input would be great, Graeme

p.s. Happy Thanksgiving everyone(canada anyways)

F8 Pro Controlling Movie Clip
Hi Guys

I’m built a movie clip which I am controlling with key commands. I can control the position of the movie clip with the script I have, but I have a glitch with controlling the playback head and telling it to go to specific frames inside my movie clip. I have attached my script to my movieclip. None of my this.play(); scripts seem to work. I’ve tried gotoAndPlay also, with no luck.

I’ve posted the entire script just incase there is a conflict somewhere

Any suggestions?


Thanks!


Here my script:

onClipEvent (load) {
var myX:Number = 0;
var myY:Number = 0;
}
onClipEvent (enterFrame) {
this._x += myX;
this._y += myY;
if (Key.isDown(Key.LEFT) && myX>-10) {
myX -= 1;
this.play(test);
}else if (Key.isDown(Key.RIGHT) && myX<10) {
myX += 1;
this.play(77);
} else if (!(myX == 0)) {
if (myX>0) {
myX -= 1;
} else {
myX += 1;
}
}
if (Key.isDown(Key.UP) && myY>-10) {
myY -= 1;
this.play(1);

} else if (Key.isDown(Key.DOWN) && myY<10) {
myY += 1;
this.play(149);

} else if (myY>0) {
myY -= 1;
} else if (myY<0) {
myY += 1;
} else {
this.gotoAndStop(1);
}
if (this._x<0) {
this._x = 550;
} else if (this._x>550) {
this._x = 0;
}
if (this._y<0) {
this._y = 400;
} else if (this._y>400) {
this._y = 0;
}
}

Controlling One Movie Clip From Another
What is the best way or controlling one movieclip from anoither. Pretty much want my menu and contentas two separate files but of course i need to contol my content from the menu. Any input would be great, Graeme

p.s. Happy Thanksgiving everyone(canada anyways)

Help Controlling A Movie Clip
hello all

the movie can be viewed at http://leisurelarry.no-ip.info

something strange is happening, the buttons to control the movie work fine when I view the swf files in a local browser, however as soon as I put them on a server and view them, the buttons no longer work, other buttons continue to work however, not sure what I am doing wrong

I am loading the movie with this script:

_root.createEmptyMovieClip("container", 1);
loadMovie("scénario_10.swf", "container");
container._x = 42;
container._y = 150;

once the movie is loaded, I am controlling with this script, for example on the play button:

on (release) {
container.play();
}

like I said, all works fine locally...

please, any help would be most appreciated
toddot

Controlling A Movie Clip
Hi guys!
I have a situation here. I have a normal animation playing with audio in the background synchronised with the animation. My client wants me to add controllers like play, pause, forward etc. I tried achieving it through behaviour option present in Flash MX 2004. When i run the movie the controls dont work. Can anyone help me out of this situation ?

Thanks.

Controlling Movie Clip
Hello,

I have a movie clip menu that scrolls from left to right according to the mouse location. I now would like it to stop scrolling when a button is pressed. How might I code that?

Thank you-

[AS3] Controlling The Fps Os A Movie Clip
I have a movie clip that runs a swf which I need to control the speed of.
I have used play() stop() etc for doing the obvious but can I control the fps using a slider?

I know that you set the fps when creating the output but I need the user to be able to speed up and slow down the swf.

I have had a good look online but cant find much about it.

Any hints or directional advice would be great

Controlling A Movie Clip
Hello,

Me again! I am having problems with controlling another movie clip. When a movie clip named "ball" crosses a certain x cordinate I need another movie clip "playerscore" to go to the next frame and stop. I have tried the following code on the ball movie clip but it didn't function properly:

if (_x+_width/2>rightgoal) {

_root.gotoAndStop("playerscore");

an instance of the movie clip "playerscore" is on the main stage.
I have the movie clip "playerscore" set up so that there is a stop action on each frame. Shouldn't the above line of code work?

Thanks,
Jon

A Button In A Movie Clip Controlling The Main Movie
I have a button in a MC, i want it to tell the main movie to go to (& stop at) a frame labelled "hr". why doesn't this work?: -

on (release) {
_level0.gotoAndStop("hr");
}

TY in advance

Controlling Main Movie Timeline Via A Movie Clip
hi all,

i need some help figuring this out. i created a bunch of frame labels for my main movie timeline to layout the sections of my website (i.e., "home", "news","gallery", etc.). now, i am able to "jump" to the different sections of the site when i clicked on the buttons that i have on the main movie. for example, i assigned the the following codes to the "news" button to go to that section:

on (release) {
gotoAndStop("news");
}

here's the problem: i have also created a short animated movie clip at the beginning of the main movie timeline that, once the animation is done playing, a button appears that allows user to click and enter the site. with the same line of code above assigned to the button (with the "news" word changed to "home" for home page), when clicked, it only goes back to the beginning of the animation instead of the home page section?!

please help! thank you!

michael

Controlling Movie Clip From Another Clip
Hi,

I'm trying to make a movie clip in one movie control a different movie clip in the same scene in my animation. I have a button (homeButton) within the first movie clip (menu) and here is the actionscript I have within it, to try to get the 2nd movie (homemain) to play. I also renamed the name of the 2nd movie to homemain1 in the instance control window. The frame I want it to start playing is labeled start.

on (release) {
gotoAndPlay ("_root.homemain1.start");
}

Any help would be appreciated.

Chas

Controlling Sound In A Movie Clip
I have a sound loop in a movie clip, which works fine. However, I wish to control the volume of this using a volume slider. I've followed the instructions in the ActionScript Reference Guide and got it to work with a sound in the sound library, but cannot control the sound in the mc.

PLEEEEEEEEEEEEEEEEEEEEAAAAAAAAAAASSSSSSSSSSSSSEEEE EEEEEEEEEE HELP!

Flashdunce

Scroller Controlling Movie Clip
Hey everyone,

I want to control a movie clip using a slider.
Basically as I drag my scroller to the left I want
the movie clip to go from frame 1-2-3. When I drag
the scroller to the right I want my movie clip to
go from frame 3-2-1.

I created a fla at http://www.pointnorthds.com/scrolling_movie_clip.fla
Can someone take a look at this script and tell me
what I'm doing wrong.

Also is this possible in Flash 4?

Thanks
Cracker

Keys Controlling A Movie Clip
i want to control a movie clip on the stage by keys on the keyboard...

arrow up = forward
arrow down = back
arrow left = spins left (anti clockwise)
arrow right = spins right (clockwise)

also if the object is facing in a diagnal direction then when pressing arrow up, it should head in that diagonal direction..

please help

Button Controlling A Movie Clip...
For a flash site I'm working on right now, I've had some problems with conflicting actions. I've realised that the only way I can achieve what I want is to control a movie clip's frames with a button from outside of the movie clip.

how do I do that?

Controlling The Z-Index Of A Movie Clip
Hey folks,

I have two clips on the same layer in my Flash movie. Is there a way to control the z-index of these movies through ActionScript? I'd like one of the scripts to move infront of the other on it's first pass and then behind on it's second, etc., etc., etc.

Thanks,
Chris Bloom

Controlling Movie Clip W/ Actionscript
Greeting.

Im starting my course in actionscript and have a little problem controlling my movieclips.

Here's the plan :

Four movieclips total.

MovieclipA got two movieclip in it, movieclipB and movieclipC. MovieclipA is my interface, movieclipB is a window that pop up and show it content and movieclipC is made of movieclipD and a symbol (the word "PLAY"). And finaly movieclipD is a behavior with an invisible button.... Simple!?

So when movieclipD is in movieclipC and the mouse is OVER , then all the content of movieclipC grow cause of the behavior of movieclipD. But i also want to control movieclipB from movieclipD. How can i do this? I learned dot notation , but can't open my movieclipB from my invisible button in movieclipD.

If my instance of movieclipB on the stage is named "secret", how can i tell my button in movieclipD to send "secret" (movieclipB) to the label "enter" ?

How can i..?

Thanks in advance,

Evelyne.

P.S.: If you don't understand, please say so, i know i'm not too good in english.

Controlling The Y Position Of A Movie Clip
Hi, I'm very new to actionScript and haven't a clue where to start here. Any help will be much appreciated. Here is where I have got to so far.

The client wants a vertical text scroller, however he doesn't want it anti-aliased and he wants it behind a mask. As far as I am aware this rules out using static and dynamic text and so I have imported a gif. If you think I have gone wrong already then please let me know.

I don't need a scroller just the up and down buttons. I thought this would be quite easy but all the tutorials I have found either use dynamic text or include a scroller all making it more complicated than I need.

I am using Flash 5 and the final movie should look something like this :

http://www.kookimedia.com/textscroll.htm

Any ideas?

Thanks

Controlling The Scene From A Movie Clip
This is probably pretty simple, but..........does anyone know how to control a scene from a movie clip. For example: having a button inside a movie clip say:
On (release) gotoandPlay (Scene 2 Frame 1).

Thanks.

Controlling An External Movie Clip
I have a button that opens an external movie clip.

Here is the code for that button.

on (press){
loadMovie("preview.swf","_root.previewplaceholder" );
}

That works just perfect.

Here is what else I want in that button but not sure how to do it.

on (release) {
if (count == 0) {
preview.gotoAndPlay(1);
count++;
} else {
preview.gotoAndPlay(31);
count--;
}
}

What this code is trying to do is in the preview.swf gotoAndPlay frame 1 or gotoAndPlay frame 31.

What does the:
preview.gotoAndPlay(1);
line have to look like when that is an imported .swf


Hope this is understandable!!
Thanks!

Controlling A Movie Clip Via Variables
Please Help

I am trying to control a MC in flash with variables.

I have five different products that I want to animate in and out of the page when you click on the corresponding button.

I have created all the animating in one movie and they are seperated by frame names and stop commands (i.e. product 1 in, product 1 out, product 2 in, product 2 out and so on). And I have created five buttons inside another movie because they too have their own animations.

Both movies have been placed on the main timeline and given appropriate instances.

Now what I want to do is click on the first button and in comes the animation for the first product, then if I click on the fourth button, I want the movie to carry on the the end of the product 1 out then check where I want it to go, and go there.

As an amateur web designer I would have created five different outros for each product, but I know there must be a better way.

I think I understand the idea of using variables and have looked on the hugely helpful FX Tut's, but I still dont know how to create a variable or how to make the file check the variable then decide where to go.

Cheers in avance

aaron.bennett





Kill Flanders

Controlling Speed Of A Movie Clip
I am preparing a game with 3 levels. The speed of the character increases as the levels increase. How can this be controlled without making a new movie clip and reducing the number of frames of animation.

This is urgent.

Thanx.

Controlling Scene From Movie Clip
I have a movie clip that has a button in it. how can i controll the main timeline from within the movie clip. i tried:

on (release) {
gotoAndStop("Scene 1", "test");
}

but that does not work.

any help?

thanks!

Controlling A Movie Clip Using Keys
ive got a movieclip with an animation inside it which is a loop of a box moving left to right

now.... on the main timeline i have placed this movieclip and i want to control it playing by pressin M and J keys repeativley

how is this done

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