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




Controling A Movie Clip With Seperate Buttons



I have three buttons, I also have a fourth main movie clip. all are seperate movie clips within a web page.
I would like each of the buttons to have different aspects of control over the fourth main moovie clip.

1.STOP/PLAY the 4th main movie, or maybe just pause it.

2.STOP/PLAY the sound, which is an mp3 file in one of the buttons timelines.

3.ON/OFF switch for the main movies loop sequence.

Is this simple to do?



FlashKit > Flash Help > Flash Newbies
Posted on: 09-01-2002, 09:29 PM


View Complete Forum Thread with Replies

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

Buttons In One Movie Clip Controling Main Clip
I have a movie. In the center on the movie there are a set of four buttons. Instead of the hassle of making 5 or 6 extra layers on the main movie, I made them on their own clip. Now, if I press a button on that clip, can I make a play action work for the main clip? It seems to just make the buttons play again.

When it plays the button clip goes away and a tween moves the background around to the next step. The button sets a variable which determines which movie is loaded thereafter.

Thanks ahead of time! :^)

Buttons In A Seperate Movie Clip For Photo Gallery
Hullo, sorry for being another nub who needs help with something that will (hopefully) be simple to everyone else.

I've created a photo gallery by following the tutorial on this site but I need it to be nested in another movie. I've sucessfully gotten the images to show up, and an external button to "open" the gallery. However, I can't get the buttons to work. If I put them in the movie clip that now holds the gallery, as in a movie clip that contains the movie clip for the images, the buttons don't show up.

I've also tried putting them in an entirely seperate movie clip, as I've had to do this to get a surrounding background box to show up for the pictures, and just getting the button that opens the gallery to tell all three clips (the background movie clip, the buttons movie clip, and the picture movie clip that contains the photo movie clip) to go to the appropriate frames. This works well since everything shows up however I can't seem to get the code in the buttons to work now.

I've tried:

on (release) {
_root.pic.changePhoto(-1);
}

but that doesn't seem to do it. Can anyone tell me what the code should be for the buttons, or even give me a clue as to why none of the other layers in the movie clip labelled "pic" show up?

This is one of the last things I'm trying to get working in a large flash site and I'd rather avoid having to post the files, only because its a big mess at this point and the file size will probably be big. If necessary I will but hopefully I've described it well enough.. thanks in advance.

Adrienne

Buttons In A Seperate Movie Clip For Photo Gallery
Hullo, sorry for being another nub who needs help with something that will (hopefully) be simple to everyone else.

I've created a photo gallery by following the tutorial on this site but I need it to be nested in another movie. I've sucessfully gotten the images to show up, and an external button to "open" the gallery. However, I can't get the buttons to work. If I put them in the movie clip that now holds the gallery, as in a movie clip that contains the movie clip for the images, the buttons don't show up.

I've also tried putting them in an entirely seperate movie clip, as I've had to do this to get a surrounding background box to show up for the pictures, and just getting the button that opens the gallery to tell all three clips (the background movie clip, the buttons movie clip, and the picture movie clip that contains the photo movie clip) to go to the appropriate frames. This works well since everything shows up however I can't seem to get the code in the buttons to work now.

I've tried:

on (release) {
_root.pic.changePhoto(-1);
}

but that doesn't seem to do it. Can anyone tell me what the code should be for the buttons, or even give me a clue as to why none of the other layers in the movie clip labelled "pic" show up?

This is one of the last things I'm trying to get working in a large flash site and I'd rather avoid having to post the files, only because its a big mess at this point and the file size will probably be big. If necessary I will but hopefully I've described it well enough.. thanks in advance.

Adrienne

Menu Controling A Seperate Movie
I am using a table to lay out a site and in one cell is a popup menu done in flash. In another cell, the "content" cell is another flash movie. Is it posible to make the buttons in the menu movie to cause the other movie(the content movie) to load certain frames and or scenes. Basicly is there anyway to have two .swf files talk to each other in the same webpage

Controling Seperate Swfs
hi all,

just a quick one hope someone out there can help, or send me in the right direction!

ok so i need 2 create one movie that controls a second movie, so i have movie1.swf with a back and forward, and i need them buttons to advance movie2.swf, which is essenialy just a slide show!

the movies will run independantly of each other, i do not want to load movie2.swf in movie1.swf! get me????

so any ideas how i go about this, i have been told of listeners, so movie2.swf will listen for a true or false command before it advances on... and movie1.swf will send out the command when the next is pressed??? would this work?

cheers people
sam

Controling 2 Seperate Swfs On 1 HTML File
I was wondering if there was a way to have 2 SWF files talk to each other even though they are seperate. I don't want to load the other into the file, thats not a problem, i need the 2 seperate files to be seperate and i need one to tell the other to play a certain frame.

Any help would be greatly appreciated.

Controling Movie Clip
Hello everybody. I´m making a site and I wanted to use some movieclips for most of it. I´ve run into a problem, because I want a button that is inside a movie clip to control the main time line, I´ve tried some stuff and it´s not working. Is this possible or do I have to redesign everyting. Help most welcome.

Help Controling A Movie Clip
Hey,

Im a noivice at actionscript. Im currently using flashMX to produce game for kids to teach them the effets of light and water on plant growth. Ive done this by using buttins to increase/decrease the ammount of light, which will make a movieclip of a plant become more healthy looking, and vice versa! but it wont work!!!!

Firstly I created a 5 frame movie clip of a plant looking dead to looking healthy/growing and labeled each frame 1(dead) to 5(alive)...

Then i created buttons that will increase or decrease the value of a variable 'light' by 1.

I then used the following code within a movie clip called 'actions' to be placed off stage, which 'should' as i understand it make the movie of the flower growing move to the relevant frame as the variable light is changed

onClipEvent(enterFrame){
if (light == 1){
plant.gotoAndPlay(1);
}
else if (light == 2){
plant.gotoAndPlay(2);
}
else if.....ETC

I have no idea why its not working! can anyone help me or suggest a better way to do this?

Cheers

Adam
ca102680@ntu.ac.uk

Controling A Movie Clip
hey i have a problem.

i am trying to work out a way to play a movie faster the more the user clicks the mouse, and when they slop clicking it plays in reverse.

eg. i have a face and when the user clicks on the face it slowly changes from a sad face to a happy face. (over say 100frames) the faster they click the faster the face changes. but when they stop clicking the movie needs to play backwards to the sad face??

any help??

thanks.

Controling Movie Clip
That´s my problem:
I want to load a movie clip with a button into another movie. This button has to control the timeline in the main movie. Is this possible to do? How do I do this?
Thanks a lot.

Targeting A Seperate Movie Clip
*EDIT* Moving a better explaination up in hopes it gets viewed.

Let me try and explain this a little better...

I am working on a project that is using a lot of frame labels in various MC's. I am trying to target a specific frame label in a specific MC. I have done this a hundred times before but for some reason I can't get this to work. My hierarchy goes like this; scene1 > page_home > arrow Arrow is the button I want to use to target the frame label "pp2" in scene1 > pages1 > pages2 I wrote my code as follows

on (release) {
_root.pages1.pages2.gotoAndPlay("pp2");
}

and it refuses to work. I hope this is all making sense. Anyone have any ideas??

Continuing On Seperate Movie Clip....
Alright I'm reposting this cause I read the thingy about helps and things. Alright, yesterday I posted: I needed help with:

I have a scene that has a button, when it's clicked, it goes to the next scene, in this scene there's 2 movie clips, one starts to play apon entering the scene, then when that one finishes, the next one p[lays........claudio helped me with this and gavbe the basic code for it, then I went in and changed a couple of things in the movie clip to get it to work and it worked (thanks claudio). Well anywho, now I have another problem, the coding he gave me worked for 2 movie clips but I dunno how to make a 3rd movie clip play after the second one.......someone please help me, thanks ~ Jay~

here's the coding claudio gave me:

this.onEnterFrame = function() {
with (panel1) {
if (_currentframe == _totalframes) {
this.panel2.gotoAndStop(2);
}
}
};


and here's what I have so far so you guys get more of an idea of what I'm trying to achieve:

http://www.geocities.com/miscar_redrum/mri.swf

Controling The _root Movie Time Line From A Movie Clip
Flash 5: PC

I have a single scene movie. In my library I have a number of movie clips. I would like the viewer to click on a movie clip, have the action start, and then when the movie clip prompts the viewer, I would like them to be able to click the movie clip and move the main timeline ahead (to the next movie clip). How do I control the main time line from a movie clip?

Specifically this is what's going on:
1. My movie starts with a stop() action in the first frame. This allows the movie clip to play.
2. At the end of the movie clip, a button appears.
3. I would like the viewer to click the button and move to the second frame on the main timeline (labeled "beginning").
The actionscript for the button is:

Quote:





on (release) {
_root.gotoAndPlay ("Beginning");

}





4. When the button is clicked, nothing happens. When I right click and select "play" from the flash player menu options, the movie continues to play.

What am I doing wrong?

Controling A Movie Clip In A Different Scene
I have a movie clip sitting on scene 1 and I have a button on scene 2
the movieclip on scene 1 is called onoff and it has 2 frames 1 and 2 so using the button on scene 2 on release I want to tell the movie clip on scene 1 to go to frame 2

help please...

thanks in advance,

Johanna

Controling An Swf That Is Loaded Into A Movie Clip
Hello


How do I control an instance in an SWF that is loading in a movie clip. Here is my action script so far.

the button:

on (press) {
control = "home";
top.play();
}

this is inside the .top movie clip on the last frame

if (_root.control=="home") {
loadMovie("home.swf", "_root.content");
}

how do I tell the home.swf that is loaded into the content movie clip to go to play a movieclip within home.swf.

thanks in advance

Controling Level0 From Movie Clip
I'm pretty sure this is real easy, but I just can't figure it out:

I have a movie clip sitting in the main timeline and at the end of the movie clip, i want the main timeline to navigate to a different scene (called Whom). I put this code in the last frame of the movie clip

_level0.gotoAndPlay("Whom",1);

Flash ignores it, though tells me that i have no errors in my actionscript. Can anyone tell me what I'm missing?

Cheers,
Robb

[CS3]question On Controling A Movie Clip
Submited for your review and/or help

i can not figure out how to control a movie clip that is a child of the main movie clip by a button that is in a differnt child movie clip. I use the "insert target area" button and i get "this.inverter.gotoAndPlay(3)"


Code:
stop();

function clickButton(evt:Event):void {
trace("the " + evt.target.name + " button was clicked");
play();
this.inverter.gotoAndPlay(3);
}
connect_sho.addEventListener(MouseEvent.MOUSE_DOWN,clickButton);
but it does not work, i get:

Code:
TypeError: Error #1010: A term is undefined and has no properties.
at controlpanel_test_fla::shore_cable_4/clickButton()
in the output window when i test my movie.

Is there something easy i'm missing? (i'm not using any external .as file, to confussing for me at this time)

Thank you inadvance for your help

[CS3] [AS2] Controling Movie Clip From Another Problem
i am having problems using the gotoAndStop from another Movie Clip

1 and A are both on the main timeline.. 3 is within 2 wich is within 1 , C is within B wich is within A (Diagram bellow). I am trying to have a button in 3 change the frame number for the Movie Clip in C. (The letter and Numbers are just for the example, I dont accualy have them named like that).

MainTimeline: 1->2->3
MainTimeline: A->B->C

Controling A Movie Clip From Another Movieclip
I have a movie clip that contains a play and a stop button. And i want it to pause a movie clip that is inside another movie clip on the root.


on(press){
_root.initial.secondary.progressbar.stop();
}

WHY ISN'T THIS WORKING!!! What am i missing?

I am trying to make the "progressbar" movie clip pause when the play button is pressed.

Controling Volume Of Movie Clip?

i know i can can the colume of a 'Sound',

but what about a Movie Clip?

by the way, do dynamically loaded sounds work on all versions of Flash player 6?

i know that the streaming option requires the latest version (so says the popular sound tutorial that has been posted on this board...which by the way is awesome) - but i've been having trouble doing a simple dynamic sound load, even in Event mode.

any ideas?

Controling Movie Clips From Buttons Within Them
greetings - 1st time posting here so please tell me if this question belowng in a different forum.

i have a movie clip consisting of 3 objects that scrolls across the screen. I am trying to make it so that when the user mouses over one of the objects in the movie clip, that clip stops playing and when they mouse out, it starts up again.

I am using the 'tell target' action for this but the button seems to be ignoring it. Is there some rule that prohibits objects embedded in a movie clip from controling that clip?

I am able to control the movie clip using another instance of that button outside of the movie clip and I am able to execute other actions (not controlling the movie clip) from that button when it is embedded in the movie clip.

Any help would be greatly appreciated.

-d

Controling Movie Clips With Buttons
Dear Anybody
Fron the main scene of my movie I’m trying to stop a movieclip running using a button
Currently I have a stop button with the command
on (release) {
stopAllSounds ();
stop ();
}

Which stops the sound and the main timeline but the movie clip carries on running..

I have stopped the movieclip by converting the stop button into a movieclip and using an instance of it with ‘on clip event as follows’
onClipEvent (mouseUp) {
_parent.stop();
}
onClipEvent (load) {
stop ();
}
onClipEvent (mouseUp) {
gotoAndStop (2);
}
Which is fine apart from I can’t then seem to create a rollover effect on the movieclip ‘button’
As a new scripter any help is very welcome!
Thanks
Mark Waterfield

Linking Seperate Movie Clip From A Movieclip
Flash MX Pro

In the scene I am working on, I have buttons in the form of a movie clip. The interactive animation works with them, but one thing does not.

When you roll your mouse over the button with a persons initials, their name pops up (this works). Then when you click on the name button, it is supposed to load another movie clip below displaying their information (this doesnt work, but the button animation does work). I dont know if my general idea will not work, or if I am not doing something right. If I link to another frame in the scene (not the movie clip scene), will the movie clip I linked from still show up along with the other movie clip? I dont know what to do, and my website is depending on this. Someone please help me...

~Cory

Linking Seperate Movie Clip From A Movieclip
Flash MX Pro

In the scene I am working on, I have buttons in the form of a movie clip. The interactive animation works with them, but one thing does not.

When you roll your mouse over the button with a persons initials, their name pops up (this works). Then when you click on the name button, it is supposed to load another movie clip below displaying their information (this doesnt work, but the button animation does work). I dont know if my general idea will not work, or if I am not doing something right. If I link to another frame in the scene (not the movie clip scene), will the movie clip I linked from still show up along with the other movie clip? I dont know what to do, and my website is depending on this. Someone please help me...

~Cory

Opening A Movie Clip In A Seperate Window
I have made a movie clip and on the main time line i have a button. I want that button when pressed to open that movie clip in a seperate window. Is there anyway to do this. I have tried GetURL and all the rest of them but the movie clip is part of the SWF of the fla file.

Please help if you can.

Thanks

Controling Movie Clip From Main Stage
I have a button on the name stage and that button needs to make a movie clip named "rings" go to a frame label named "yellowblue"

I have tried these two things:

on (release) {
metal = "yellow"
_root.rings.gotoAndStop ("yellowblue");
}


and...

on (release) {
metal = "yellow"
rings.gotoAndStop ("yellowblue");
}

......

thanks in advance

Controling A Main Timeline From A Movie Clip
I am simply trying to tell my main timeline to go to another scene from a movie clip. I have used:

tellTarget (_parent) {
gotoAndPlay ("scene2", 1);
}

but it just won't work. I can control the current scene using this script but not change scenes.

Any idea what the problem is?

Movie Clip Controling Within Html Frames...
What action should I use and how?

I have 2 frames:

1-menu) menu.swf
2-screen) screen.swf

how do I make screen.swf button in "screen" frame open 5th frame of the menu.swf in "menu" frame ?

Thank you

Controling Horizontally Scrolling Movie Clip
Hi,
ive run into a bit of a problem with a flash project im working on and could really do with some help. I have a movie clip which I want to scroll horizontally when a user clicks on a button. this horizontal scrolling image is broken up into five different images each of which corresponds to a section of my site which tween and scroll sidewards. each of these photos has a stop action attached to the frame when it has scrolled into its correct position.
when a user clicks on a button i want the movie clip to scroll through the images until the image stops on the corresponding picture for that button. if it was the case that i wanted the movie clip to just go directly to the corresponding frame its no problem a simple gotoandstop action will look after that however i want it to scroll through each of the pics until it arrives at the correct one instead of jumping directly to each image.
the problems arise when i attach the necessary stop action at the point where the correct image has scrolled into position. so what happens when i attach an action to my button which initiates the scrolling in the movie clip the clip gets stuck on the next stop action it encounters.

is there any way that i can set up my movie clip to scroll in the way i want it to?
i have considered that there may be a way to direct the movie clip to scroll through its frames and direct it to stop on a particular frame without using stop actions on the frame in the movie clip but as my actionscripting is a bit ropey i don't know if thats possible.
if anyone knows a script i could use to do this or could recommend another approach i would be really greatful.

thanks,
el scifo


oh yeah forgot to add im using mx

Controling Main Scenes From Within A Movie Clip
hello everyone .,.. i hope u can help me with this delema im in at the moment... lets say i have a movie clip the instance name clip... and within this movie i have a button and the reason of this button is to go to another scene lets say Scene 3 ... so how can i do that /??????

plz help thanks

ps: using flash 8 ,action script 2.0

Controling The Timeline Inside The Movie Clip
Need help!
I have a movie clip and I want to control the timeline. For instance if I push the "<LEFT>" button, then the frame should go from the first(which is stopped) to the second(stopped too)frame. Give me advice.
Thanks,
Sorry for my English.
Kris

Controling Many Movie Clip With A Single Slider
Hi
I'm looking for a script to control many movie clip with a single slider.
clicking on the clip to select it and change the parameter (like _xscale) with a single slider.

I've try to write some script using Setfocus/killfocus but I can't make it work properly.

...My goal is to build a kind of toolbox made of slider to control many movie clip on the stage.

Any clue or sample would be very welcome at this point.
I post my WIP .fla file (zipped attachment) for those who wish to take a look on what I'm talking about

thanks in advance

flash_gogo Al

Calculate Inertia For Controling Movie Clip
Hi:

I'm working with a keyboard controlled movie clip, with the following code (most of it provided by a kind person on another forum):


ActionScript Code:
xSpeed = 4;
    xCurSpeed = 0;
    xDir = 0;
   
    ySpeed = 1.5;
    yCurSpeed =0;
    yDir = 0;
   
    estaFueraMinx=false;
    estaFueraMaxx=false;
    estaFueraMiny=false;
    estaFueraMaxy=false;
   
    trap=false;
   
    slowDown = 1.1;

mover=function(){
   
   
    if(Key.isDown(Key.RIGHT)&&estaFueraMaxx==false&&trap==false) {
        xWalk = 1;
        xDir = 1;
    }
    else if(Key.isDown(Key.LEFT)&&estaFueraMinx==false&&trap==false) {
        xWalk = 1;
        xDir = -1;
    }
    else if(xWalk == 1){
        xWalk++;
    }
    if(Key.isDown(Key.UP)&&estaFueraMiny==false) {
        yWalk = 1;
        yDir = -1;
    }
    else if(Key.isDown(Key.DOWN)&&estaFueraMaxy==false) {
        yWalk = 1;
        yDir = 1;
    }
    else if(yWalk == 1){
        yWalk++;
    }
   
    if(xWalk == 1){
        xCurSpeed = xSpeed;
    }
    if(xWalk == 2){
        xCurSpeed = xCurSpeed/slowDown;
        trap=true;
        if(xCurSpeed <= 0){
            xWalk = 0;
            xCurSpeed = 0;
            trap=false;
        }
    }
   
    if(yWalk == 1){
        yCurSpeed = ySpeed;
    }
    if(yWalk == 2){
        yCurSpeed = yCurSpeed/slowDown;
        if(yCurSpeed <= 0){
            yWalk = 0;
            yCurSpeed = 0;
        }
    }
    if (this._x<=50){estaFueraMinx=true; estaFueraMaxx=false;}else {estaFueraMinx=false;}
    if (this._x>=430){estaFueraMaxx=true; estaFueraMinx=false;}else {estaFueraMaxx=false;}
    if (this._y<=50) {estaFueraMiny=true; estaFueraMaxy=false;}else {estaFueraMiny=false;}
    if (this._y>=430){estaFueraMaxy=true; estaFueraMiny=false;}else {estaFueraMaxy=false;}
   
    this._x+= xCurSpeed*xDir;
    this._y+= yCurSpeed*yDir;
        if (this.hitTest(_root.popo)){
            trace ("hey");
        }


    updateAfterEvent( );

}


wheel.intervalMover = mover;

wheel.interval = setInterval(wheel, "intervalMover", 15);

i tweaked it to get the bounds of the stage and to perform on an interval instead of onEnterframe. But i still need it to have some inertia on its movements: how can it be set up so when the user presses the key of an opposite direction it still moves towards where it was heading, and slowly changes as the "force" applied by the new key pressed counters the previous one?

Hoper not to sound too complicated... is like steering in a car i guess...

Any help would be thankfully appreciated


Salut

Sir Patroclo

Controling Multiple Instances Of Same Movie Clip
Is there any way to target all instances of a library movie clip? Or do you always have to target via instamce name?

Cheers,
JV

Controling A Preloaded SWF In A Movie Clip Instance
i know i'm missing something basic here.  there are 4 elements to my problem: the main timeline, an MC(textmovie) on frame 3, an empty MC(with the instance titled "swfmovie") on frame 4, and an external (external.swf) file in the same directory. OK, On frame 3 while the "textmovie" plays, i have a frame action on the main timeline that says: loadMovie ("external.swf", "_root.swfmovie");.   i'm using the "textmovie" on frame 3 to act as a distraction while the larger external SWF file loads into "swfmovie" on frame 4 of the main timeline.  i have a frame action at the end of the "textmovie" timeline that says _root.gotoAndStop (4).  Here's my question:  at this point how do i get the "external.swf" that's loaded into the MC"swfmovie" to start playing?  i've tried a million things and just can't get it.  i know i'm missing something very basic.  please clue me in.  thanks.

Problems Controling Movie Clips With Buttons
I have 5 separate buttons in my main movie, each controlling 5 separate movie clips. When clicked each button plays its corresponding movie clip.

Here's my problem...Can somebody tell me how to script the buttons so when a different button is clicked, the movie clip that is currently visible/active will play in reverse, back to it's starting point and play the new button's corresponding movie clip normally. Hope this makes sense. Thanks.

Is It Possible To Load A Seperate .swf File Into A Movie Clip Symbol?
Is it possible to load a seperate .swf file into a movie clip symbol?

If so what is the actionscript to call it?

Thanks ahead,
-Line

Movie Clip With A Seperate Time Line, How To Script?
I'm creating a flash site for myself and have ran into a little problem.
I've created a menu which slides out from the boarder on the left. when it fully extends into view it stops until you close it. I have a background for that which fades into view when the menu is fully open.

The menu frame which slides is one movie clip
The menu background is a second movie clip which is located inside the menuframe movie.

I have got the opening of the whole menu done. What I want it to do is when I click the close button on the menu, the background movieclip will play(fadeout), when it is done fading out I want it to play the menu to close it's self. I know that action is _parent.play("backtoleft") (correct?)

Basically play the internal movie from the external movie(closeBTN), finishing internal movie tells external movie to play. What actions should I use.

I have used on (Release) gotoAndPlay.
I've tried "this." _root, and everything to try and control the other timeline..

If you can understand what I'm getting at and can help it wil be greatly appreciated!

Controling A Movie Clip From Another And Not In Time Sync...thoughts On How To?
I'd like to know what I need to look at Actionscript wise for the following scenario...:
opening MC stops, waiting for user input (onclick event)1 of 4 buttons, once a button is clicked, mc continues, loads another MC that is the Navigation portion. The Navigation MC has other MC's with click events that launch movies into _level(n). I need to know how to 1. know what button was clicked when the MC first stoped (waiting for input, onclick), 2. use that somehow later in the Navigation MC to know what portion of the Navigation MC needs to run so I can automatically run the correct MC into _level(n).

I hope this makes sence. I was thinking about Variables, with conditionals within the MC's within the Navigation MC, but unsure where to begin or if this is the correct approach. Any advice would be very much appreciated.

Thanks
Norm

Loading A Movie Clip Seperate Of The Main Timeline With A Status Bar
I should save something for down here, egh... ..

Would it be easy to load a whole new movie inside of
my main movie to have when you click on a button it
loads that section with a load bar and then buttons
pop inside of my firist movie. . ?
Thanks anyone

Using A Button To Display Images On Frames Within A Seperate Movie Clip
So how do i do this? I'm finding it frustrating.

The way i have set it up is as such. Look at this image for reference.



Okay in the lower left hand corner i have a movie clip with a group of buttons in it. On the right hand side i have another movie clip with the instance name of img_mc, with multiple images in it which i wish to display when i press the buttons in the first movie clip.

Inside img_mc I have set up each frame with an image on it, and a stop action above so that i can specify a button to go to that frame once released and stay there.

Problem is i don't know how to code the buttons in the first movie clip. I assume you click on them and put something like this as the action -

on (release) {
gotoAndPlay(this._parent.img_mc);

}

Which is where i have tried to access the individual frames within the clip [b]img_mc[/i] by pressing on the Insert a Target Path key and locating a frame for it to rest on. No prompt comes up to select a frame though. How would i get it to play a frame within that movie clip and go to the image i want?

Help would be much appreciated

Loading/controling Movie In Movie Clip
Help!

Let's see if I can describe this problem...
I've got a movie with 2 movie clips, one contains my menu buttons, the other, whose instance i've named content, is essentially empty. I am able to load swf movies into the "content" clip based on the button the click in the menu clip, using the following script:

on (release) {
stop ();
loadMovie ("home.swf", _root.content);
}

Controling A Movie From Inside A Movie Clip?
Is it possible to control a movie from inside a movie clip? Is there a script I need to put in before I put in what I want to happen? Eg. Make the movie gotoAndPlay (3) from inside a movie clip.

Controling Main Movie With Movie Clip
hi,

how do i control the main movie by pressing a button iside a movie clip - I have tried:

on (release) {
gotoAndPlay("Scene 1", 2);
}

but nothing happena, all i need is to advance the playhead one frame using a button inside a movie clip that lives in scene 1 frame 1

Controling The Root Movie From A Movie Clip
How would I do that using AS in a movie clip. See i'm making a game which after 30 secs (thats how long the movie clip runs) i want the main movie to play the next scene.

How To Make Dynamic Text Appear And Disappear When MouseOver On A Seperate Movie Clip
Hi i hope someone can shed some light on by novice AS writers block.

I am creating a photogallery with thumbnails that reads all the data from XML, this is based on the excellent Kirupa tutorial.

What i want to happen is that the text only appears when you mouseOver the image.

I thought it would be a simple using an if statement but can not get it to work.

you can view the page at http://www.bru-ha.com/roza-flash/art_7.swf

below is the actionscript for the file & the FLA.


Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
media = [];
credit = [];
thumbnails = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
media[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
credit[i] = xmlNode.childNodes[i].childNodes[3].firstChild.nodeValue;
thumbnails[i] = xmlNode.childNodes[i].childNodes[4].firstChild.nodeValue;
thumbnails_fn(i);
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load('xml/art_7.xml');
///////////////////////////////////// preloader
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};
///////////////////////////////////////next and previous image function
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
text_mc.desc_txt.text = description[p];
text_mc.media_txt.text = media[p];
text_mc.credit_txt.text = credit[p];
picture_num();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
text_mc.desc_txt.text = description[p];
text_mc.media_txt.text = media[p];
text_mc.credit_txt.text = credit[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
text_mc.desc_txt.text = description[0];
text_mc.media_txt.text = media[0];
text_mc.credit_txt.text = credit[0];
picture_num();
}
}
/////////////////////////////////////////////////////////load thumbnails
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = hit_left._x+(eval("thumbnail_mc.t"+k)._width+10)*k;
target_mc.pictureValue = k;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};
target_mc._alpha = 30;
target_mc.onRollOver = function() {
target_mc.onEnterFrame = function() {
if (this._alpha<100) {
this._alpha += 15;
//or any other number you like, if it's too fast or too slow
} else {
this._alpha = 100;
this.onEnterFrame = null;
}
};
};
target_mc._alpha = 30;
target_mc.onRollOut = function() {
target_mc.onEnterFrame = function() {
if (this._alpha>30) {
this._alpha -= 15;
//or whatever number you used above
} else {
this._alpha = 30;
this.onEnterFrame = null;
}
};
};
};

//////////////////////////////////////////////////////////text fade
//text_mc._alpha = 0;
//picture.onRollOver = function() {
//picture.onEnterFrame = function() {
//if (text_mc._alpha<100) {
//text_mc._alpha += 15;
//} else {
//text_mc._alpha = 100;
//picture.onEnterFrame = null;
//}
//};
//};

//picture.onRollOut = function() {
//picture.onEnterFrame = function() {
//if (text_mc._alpha>100) {
//text_mc._alpha -= 15;
//} else {
//text_mc._alpha = 100;
//picture.onEnterFrame = null;
//}
//};
//};


image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
}
stop();
any pointers are gratefully recieved.
Cheers
Bo-doodle

Movie Clip Controling Movie
I'm making a game were your a red ball and you roll around collecting items and i finished the first level and to go to the next you go to the right and off the screen. Your supposed to hit a white movie clip that has a collision function that goes to the next frame (level). The movie clip actions only control themselves so what should I do to get to the next frame?

Movie Clip Buttons Nested Inside Movie Clip Dont Work
Hi people!
im having a problem here.

in my first frame i have a movie clip named "menu_mc".
i have this AS for this movie:

Code:
this.menu_mc.onRollOver = function() {
menu_mc.gotoAndPlay(8);
}
this.menu_mc.onRollOut = function() {
menu_mc.gotoAndStop(7);
}

thats working ok, the menu_mc plays on rollover from frame 8 till frame 12 where stops.
On frame 12 (this is inside the menu_mc movie clip) i have another movie clip, named button1_mc.
and also i have AS controling that MC:

Code:
this.button1_mc.onRelease = function() {
getURL("index.htm", "_self");
}


The problem is that when i rollOver on menu_mc it work fine and the button1 appears, the problem is when i try to click button1...
doesnt work.

the swf you can see it on www.wt.com.mx/menu.swf
can anybody help me please?
what im doing wrong?
or what other ideas can you give me so i can make that work.

thanks!

Controling An Instance In A Parent Clip From A Child Clip? ANY Help Appreciated.
I'm sure this is simple, but I'm stuck.

I have an swf file called "base.swf", in which is an instance called "nav" which I need to move around _x and _y. "base.swf" loads a child called "navbuttons.swf". I need to use a button in "navbuttons.swf" to reach back to the parent "base.swf" and interact with the "nav" instance.

I tried the following on the button in "navbuttons.swf";


Code:
on(release){
_parent.nav.xpos=670;
_parent.nav.ypos=375;
}
I was thinking that since base.swf loads navbuttons.swf that the _parent part on the button would get me back to the parent, and the .nav part into the instance I want to control... but it's not working. I tried _root instead of parent with no luck.

I'm sure this is simple, can anyone point me in the right direction?

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