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




Help With Actionscript For Movie Clip As Button



What is the script for making a movie clip go to and play a certain frame? I have a movie clip that will act as a button.
thanx



FlashKit > Flash Help > Flash MX
Posted on: 07-25-2002, 12:50 AM


View Complete Forum Thread with Replies

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

Actionscript For Button In Movie Clip
Hi!
I am stumped with some code. I have several small movie clips house a button each. They all work linking to the main timeline and to the specified frame such as this:

on (release) {
_root.gotoAndStop(35);
}

However, on one of my movieclips, I want it to go to the next scene, first frame, which I thought would be this:

on (release) {
_root.gotoAndStop("Scene 2", 1);
}

Well, it doesn't work. I've tried some variations but am basically driving myself nuts. Does anyone have any suggestions as to what I am doing wrong?

Thanks for your help!

Kerri

Movie Clip Button Actionscript
I want to make my movie clip go to the next scene of the same movie clip when a button is clicked. How do I do that? Flash 5, thanks.

Button And Movie Clip Actionscript Problem
Hi - and help! I would REALLY appreciate some actionscript advice! I've tried everything I can think of!

The site I'm working on is at http://www.designvine.net

The problem is in Scene 2, after the intro animation, which has the buttons and site pages. Each button when selected takes you to a movie clip which is in the main timeline of Scene 2. Each movie clip is a site page.

I have used MC buttons, because when I select a button I'd like the button to change color to a different color (red) and stay that color until another button is selected, i.e. to stay in the down state until the next button selection.

The script placed on each button is:

on (release){
_root.resetButtons();
this.gotoAndStop("down");
}

on (rollOver){
if (this._currentframe <> 3)
this.gotoAndStop("over");
}

on (rollOut, releaseOutside){
if (this._currentframe <> 3)
this.gotoAndStop("up");
}

I have this script on a separate layer for the movie clips:

function resetButtons(){
homebutmc.gotoAndStop("up");
whatbutmc.gotoAndStop("up");
//etc...
}
homebutmc.onRelease=function(){
gotoAndPlay(68);
}
whatbutmc.onRelease=function(){
gotoAndPlay(100);
}

Is maybe my button script conflicting with my script for taking you to each movie clip?
When I delete the last part of the script (homebutmc.onRelease, etc........) the button states work perfectly, but I don't go to the movie clips.
And then when I add the last part of the script (homebutmc.onRelease, etc....) I can go to every movie clip and it plays, but the button states don't work.

[f8] Im Having Aproblem With Some Actionscript Working On A Button Within A Movie Clip
The actionscript in the first frame of the movieclip -

this.onRollOver = function(){
rewind = false; //set variable (or switch) that decides wether ot not to play backwards...
play(); ***// play this movie clip.. (grow the button(tween));
}

this.onRollOut = function(){
rewind = true; ***//set or rewind switch to true so it will play backwards...
}

is overiding the actionscript on the send email button. - on (release) {
***getURL("mailto:cartercradles@btconnect.com");
}

Any ideas how to get round this?

[CS3] Actionscript For Adding Sound To A Button That Is A Movie Clip
I have created a movieclip that is functioning as a button and is controlled by actionscript. I want to add a roll over sound to the button. I am using the following code and it is not working. Can somebody help please?


stop ();

this.onRollOver = function ()
{
newSound = new Sound ();
newSound.attachSound ("buttonsound");
newSound.start ();
}

this.onEnterFrame = function(){
if(rewind == true){
prevFrame();
}
}
this.onRollOver = function(){
rewind = false;
play();
}
this.onRollOut = function(){
rewind = true;
}
this.onRelease = function(){
getURL("techtips.html");
}

Actionscript 2.0, Adding An Event Handle To A Button In A Movie Clip
Hey,

One of my biggest complaints has been Flash's Actionscripting IDE and since moving from 6.0 to 8.0 I started to look for an Actionscript IDE with intellisense; and found FlashDevelop. To be frank, I've been very impressed with it and have been looking for ways of removing most, if not all, AS scripting from Flash and putting that into FlashDevelop and simply import the appropriate classes / code.

So far so good - however, I've hit a bit of a brick wall with something. Basically, I've created a MovieClip in Flash, set the appropriate AS Class 2.0 identifier through the library properities and then created the class defintion in FlashDevelop - this is working fine and some trace statements in the initialiser prove its linking OK. Within the movie I've got a button at Frame 10 whose event I want to wire/capture in my class and then perform the appropriate actions, I've tried adding an event handler and it doesn't work and I feel my AS jargon hasn't been good enough to get/location a solution from Google.

So, within my AS 2.0 class that is linked to a movieclip I want to capture the 'click' event of a button through code and run some code. Can anyone point me in the right direction?

Cheers

M

Movie Clip Button Inside Movie Clip Button Is Driving Me Nuts
hellllllo everyone, this thing has been bothering me for weeks, i've been hiding from it for days but it always seems to come back and bug me..
this is the problem..
on my main timeline i have a movie clip button that plays over/out state within this clip and on the over state it also opens 8 other movie clip in this movieclip that i am hoping to make them clipable, i only made an over state for the first movieclip out of the eight, but it just wont do the rollover effect..
i think there is a better way to do this..if i need to start over..let me know..thanks!!!

i will attach the file please help me out! i am tired of hiding!
thank you again!!!!!

Placing Actionscript Movie Clip Inside A Movie Clip Symbol
I'm loading an external image into an empty actionscript movie clip (holder1) using MovieClipLoader(); on frame one of my movie and is invisible. Then when the movie plays, there is an empty movie clip symbol (image1_mc) that is placed manually on the stage within another movie clip symbol (flash_mc), and is also on a bottom layer of a mask layer which is animated. Is it possible to place "holder1" inside of "image1_mc" so that I can treat it as if it were an embedded image? In other words, have the image in "holder1" inside of the manually placed movie clip symbol "image1_mc" so that I can use it like a regular symbol on the stage?

Targeting A Frame Label In A Movie Clip From A Button In A Separate Movie Clip.
I have two separate movie clips placed on a timeline-MovieclipA and MovieclipB. I have a button in MovieclipB clip that wants to target a frame label located in the MovieclipA timeline. Can someone help me?

Code 4 MovieClip Button To Load A Movie Clip Into A Placeholder Movie Clip.
Yeah that title sounds a little confusing...so i will explain:

Is there a way to tell a "movie clip button" that once it is clicked on to load a "movie clip" into a "movie clip placeholder". So instead of loading an external swf into the placeholder, it will be a movie clip from within the same library. Putting every single custom clip on the timeline would take a while, so that is why I thought it would be easier like this, and the other movie clips are not that large that I want to load into it so there is no need for external swfs, trying to keep it clean. Here is the code along the lines I am trying to go for.

__________________________________________

this.profile_mc.onRelease = function() {
placeholder_mc.loadMovie("profileSection_mc","plac eholder_mc","_root.content");
}
__________________________________________

- "profile_mc is the button I am trying to activate to load the
"profileSection_mc" into the "placeholder_mc". but so far no good.

- the movie clips are within the same library, not on the timeline or external library.

- Is this possible?

Adding Actionscript To An Empty Movie Clip Created By Actionscript
Ok, I'm trying to figure out if I can add actionscript to an empty movie clip that I created using actionscript. Is it possible and if so, how?

Thanks,
Doug

A Button Inside A Movie Clip, Within A Movie Clip, Calling Another Scene:
Is it even possible?

I have been trying to do it for the last few days for a site I am working on.

I have done searches in many forums and it's foolish looking for an answer that way, because quite frankly every thread I opened was something to do with LoadMovie or GetURL, etc.

What I have right now is on the button in my Menu Bar Movie Clip:

on (release) {
gotoAndPlay(285);
}

Which plays a fancy little animation in the movie clip and then on the last frame of that movie clip I had:

gotoAndPlay("Contact", 1);

Which is the Scene for the "Contact Us" Scene named "Contact"

One would think that it would load up the scene and play at frame 1, however all that happens is it reloads the movie clip of the "Menu Bar" at frame 1 and starts over, not even realizing what I asked.

Anyways, I figured there's a script or something that tells it to look outside of the movie clip or to the _Root, or whatever.

If someone has a solution, it would be greatly appreciated.

Sorry I have no example to show, since I have yet to upload it. (It's my company's web site, and I don't think customers would want to see some half-arsed web site that's not complete.

Thanks in advance.

Create A Movie Clip As A Button To Jump To Half Way Through Another Movie Clip?
hi guys and gals,
i am wondering if i can make a movie clip (as a link for a website) jump to half way through another movieclip...
thanks in advance

Control Movie Clip In Container From Button Inside Other Movie Clip
There are three movie clips involved in this question.

1. A main movie clip that has a target empty movie clip where an external swf loads.

2. A menu movie clip that is built from button symbols and has its own timeline.

3. The external movie.

When a user clicks on the menu, the external swf loads into the empty movie clip target.  This part works fine. Here's the code:
on (release) {    
    loadMovie ("Lesson1.swf", "_root.container");
}

I want to use one external swf for all lesson, versus 20 external swfs. The problem I'm having is controling at what frame the external swf loads.  I've tried adding --gotoAndStop (15) -- for example. I've also tried adding, gotoAndStop "_root.container" (15), but that doesn't work either. The gotoAndStop action ends up controlling the menu movie clip timeline instead of the movie loaded into the container. I figure this is because the menu mc has "embedded" buttons and it's own timeline.

Any  help you can offer will be much appreciated.

Thanks
Sheila



Creating A Button To Open A Movie Clip From Inside A Movie Clip?
I'm using a hexagon menu to display some images. One image is placed on each slide of the hexagon menu (which can then be rotated left and right to see other "slides").

What I want to do now is to be able to click on the object (image) as a button and for it to go to another scene which shows the image blown up and some description next to it (which is another movie)

I have tried the following which doesn't seem to work:
Created an invisible button (or choosing the image as a button) and having

on(release) {
gotoAndPlay("scene 5", 1);
}

this doesn't work when I use it over the hexagonal menu, but when I move the button to somewhere else on the screen (not over the movie) it works.


Please can someone help with this - Ive been working on it flat out over the weekend and desperately want to make it work. any ideas would be appreciated!! thank you

Loading External Movie Clip With A Button Inside Another Movie Clip Help
Hi,

I am working on a scrolling thumbnail movie clip, that when you click on the thumbnail button inside the movie clip it will load an external movie clip. I have an empty movie clip on the main stage, and have been trying all sorts of code, but for some reason it doesn't like that I am inside a movie clip using buttons. It can't seem to find the external swf.

I have tried:

on (release) {
loadMovie (ithink.swf, "loader");

and

on (release) }
if (firstTime == true) {
loadMovie("ithink.swf", _root.loader);
firstTime = false;
} else {
_root.clicked = "ithink.swf";
_root.loader.gotoAndPlay("goback");
}
}

and so far nothing, for some reaosn when I click on a button outside of the movie clip with the above code it loads... and than the other works too, but if I click on the buttons inside the scolling movie clip first they won't work.

Any suggests or ideas!!?

I would really appreciate it... I am beyond frusterated!!

Using A Button In A Movie Clip To Control The Movie(and Not Movie Clip) Timeline
Ok i have a button placed in a movie clip. I want this button, when released, to go in another scene, frame one, on the movie(scene) timeline and not on the movie clip timeline.

So i tried: gotoAndPlay("mission", 1); (mission is the name of my scene)

But it goes to the frame 1 of my movie clip, It would be great if someone could tell me how i can control the movie timeline while my button is in a movie clip

thaks
Vakarm

Actionscript Placing Movie Clip And Manual Placing Movie Clip OnPress Blues
Hi,

I placed a movieclip onto the stage and wrote an onPress function for it and it worked fine.

I then deleted it off the stage, and then instead tried using actionscript to attach movie clip onto the stage and set its x,y coordinated.

It showed up on the stage in the right place but didn't respond to clicks (presses) on it.

I used:
this._parent.attachMovie("up_arrow", "upArrow", 1);

The name of the mc in the library is "up_arrow", and I made sure it was exported for actionscript too.

this._parent.upArrow.onPress = function() {
trace("up button pressed");
};

This onPress function only works if I manually place the mc on the stage in the editor and not when I use actionscript.

I don't know why it's not working, anyone have any ideas? You're help is appreciated.

Many thanks.

Akira

Movie Clip Control Other Clip, Actionscript Help
How do I make a movie clip control another movie clip? In this case, when I click on the green box(Movie1), the blue box(Anim1) will move. I added "Stop()" to the first frame of Anim1. I think I got the actionscript right, any idea what's wrong?

How Do You Make A Button Able To Jump From Movie Clip To Movie Clip
how do you make a button able to jump from movie clip to movie clip

I have 5 movies i the same scene , I need the buttons to jump from movie to movie ... how do I code this in the acrions ?

A Button Inside A Movie Clip To Move Another Movie Clip
I'm building a web page and I have a button that I need to make two movie clips play. The button is inside one movie clip and in addition to it playing I want it to make another movie clip play. It doesn't seem to recognize the movie clip target names. Any help as to how this can be done would be much appriciated.

Thanx

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.

[CS3.AS2] Button In A Movie Clip Link To Another Movie Clip And Play
what im doing is that making a button in a movie clip link to another movie and play/stop certain parts of that clip

lets say that there are 4 buttons are in movieA, and the other clip is called movieB

when the user clicks button1 in movieA, movieB will play from frame 1 to 5 and stop.
when user clicks button2 in movieA, movieB will play from frame 5 to 10.
and so on

so far my code for button1 is:

on (release){
this._parent.movieB.gotoAndStop(5);
}

on (release){
_root.movieB.gotoAndStop(5);
}

button2:

on (release){
this._parent.movieB.gotoAndStop(10);
}

on (release){
_root.movieB.gotoAndStop(10);
}

with this code, it just jumps to the designated frame.
what i want is to have it play from current frame to a designated frame

can anyone shed some light on this?

Place Movie Clip Button Inside Movie Clip
Hi, I have searched the forum but cannot find exactly what I am looking for.
I have a movie clip of a map that I can zoom and drag and what I would like to do if possible is to have several other movie clips inside the first movie clip which when clicked go to and play at a given frame number on the timeline where a photo is displayed.

The 'several' movie clips will be small flashing red circles. Each one represents a place of interest and when clicked will display a photo of the place of interest.

Button Nested In Movie Clip Just Repeats Movie Clip
I have a button that is inside of a movie clip. (the button falls down from the top). BUT, when i click on the button, it just plays the movie clip over again? Am I missing something?
Thank you

Help Pls Making A Button In A Movie Clip Goto Another Movie Clip (pic)
Hi guys and girls,

i need ya help. What action script would i need to make a button in one movie clip goto and play a frame in another movie clip. I've added a pic to help. Im not very good at flash but i've been trying my usual codes but it dont work..

Cheers

Help Pls Making A Button In A Movie Clip Goto Another Movie Clip (pic)
Hi guys and girls,

i need ya help. What action script would i need to make a button in one movie clip goto and play a frame in another movie clip? I've added a pic to help. Im not very good at flash but i've been trying my usual codes but it dont work..

Cheers

Problem With Movie Clip Moving When The Mouse Passes Over A Button On The Clip
The swf in question calls up a series of ads. To change the ads the user clicks on the forward and back button. However, when you mouseover the forward and back buttons the controlBar goes a bit haywire (as a result of the mouseOut on it).

All the files are attached in a zip file. Thanks in advance for your help guys.

Stop And Play Button For Movie Clip Within Moive Clip
hi i have problems with my buttons. i have got 2 fla files. 1) shell.fla 2) content.fla.

The shell.fla has a movie clip(name:holder) to load the content.swf. And within the content.swf i have got movie clip within movie clip.

Thru a search from the forum i came across this script

first frame:


Quote:




function stopAllClips(clip) {
clip.stop();
for (var i in clip) {
if(typeof clip[i]=="movieclip") {
if(clip[i]!=clip) {
stopAllClips(clip[i]);
}
}
}
};

function startAllClips(clip) {
clip.play();
for (var i in clip) {
if(typeof clip[i]=="movieclip") {
if(clip[i]!=clip) {
startAllClips(clip[i]);
}
}
}
};




for the button:


Quote:




on (release) {
if(!_root.stopped){
_root.stopAllClips(_root.holder_mc);
_root.stopped = true;
} else {
_root.startAllClips(_root.holder_mc);
_root.stopped = false;
}
}




everything works fine except after i pause and play, i doesn't play from where it has stopped. Anyone has got any ideas as to how i can solve this problem. Thanks very much.

Movie Clip Button Inside A Movie Clip Button
Ok so I'm going crazy with creating a movie clip button inside a movie clip.

I have it working well for onRollover, but onRollout the Header_mc looks like it is not looking at the code. It is driving me crazy. Here is my Action Script code to control the two movieclip buttons.

I basicly want the Header_mc to stop when over the B_photo and on Rollout of the B_photo. I don't know why it is not working. I have attached screenshots of my Header_mc and the SWF so you can see what frame I'm calling.



/*--------------Photographers Button------------*/

this.B_photo.onRollOver = function() {
Header_mc.gotoAndPlay("_stop");
B_photo.gotoAndPlay("_over");

}

this.B_photo.onRollOut = function() {
Header_mc.stop("_stop");
B_photo.gotoAndPlay("_out");

}

this.B_photo.onRelease = function() {
B_photo.getURL("http://www.macromedia.com", "_parent");
}

/*--------------Main Header---------------------*/

this.Header_mc.onRollOver = function() {
Header_mc.gotoAndPlay("_over");

}

this.Header_mc.onRollOut = function() {
Header_mc.gotoAndPlay("_out");

}

this.Header_mc.onRelease = function() {
Header_mc.gotoAndStop("_out");

}

Button(movie Clip) In A Button(movie Clip) Help - Attached Fla
Hey guys,

I had 3 buttons in the main movie which was working fine.

an external actionscript file was responsible for the buttons' functions

playPause is the instance name of the button(made as a movie clip)


ActionScript Code:
playPause.onRollOver = function(){    if(this._currentframe == 1) this.gotoAndStop("pauseOver");    else this.gotoAndStop("playOver")}


What I wanted to do is create another button(instance name speaker) on the main movie that when a user rolls over with a mouse, it'll show the 3 buttons. Basically, a button(movie clip) in a button(movie clip).

I have this movie clip working fine but none of the action script on the original buttons are working (of course because target changed).

I have tried the following and it will not work (in external .as file)-


ActionScript Code:
speaker.playPause.onRollOver = function(){    if(this._currentframe == 1) this.gotoAndStop("pauseOver");    else this.gotoAndStop("playOver")}


here is the fla (for the test file, i simply put the as code in the frame and not external as file)
www.yooniq.net/dante/testmp.fla

and here is what i'm talking about
www.yooniq.net/dante/testmp.swf

any suggestions? it'll be greatly appreciated.
thanks in advance

Button In Movie Clip To Link To Other Movie Clip
I am trying to have a button isde my movie clip on frame 1 to jumpt to the start of my movie clip on frame 2. They are both in the same scene. I have tried all the basic action scripts including calling the root target and movie name and nothing will work. I am using Flash5 in XP.

Some of the scripts I used:

on (release) {
loadMovie ("", "_root.about");
}


and

on (release) {
gotoAndPlay ("_root.about");
}


why doesn't this work?

ps my 2nd movie clip is called "about"

Button In Movie Clip To Link To Other Movie Clip
I am trying to have a button isde my movie clip on frame 1 to jumpt to the start of my movie clip on frame 2. They are both in the same scene. I have tried all the basic action scripts including calling the root target and movie name and nothing will work. I am using Flash5 in XP.

Some of the scripts I used:

on (release) {
loadMovie ("", "_root.about");
}


and

on (release) {
gotoAndPlay ("_root.about");
}


why doesn't this work?

ps my 2nd movie clip is called "about"

Movie Clip To Movie Clip Button Action
I am trying to have one movie clip jump to another movie clip. I made the mistake of having them on seperate frames and corrected that. None of the code I have used works still. I am wondering if anyone has a solution. I am sure its something small I am forgetting.

Some of the scripts I used:

on (release) {
loadMovie ("", "_root.about");
}


and

on (release) {
gotoAndPlay ("_root.about");
}


why doesn't this work?

ps my 2nd movie clip is called "about"

Can A Button In A Movie Clip Control A Different Movie Clip?
I'm working on a web page with a draggable menu which is in its own movie clip. Can the buttons in this menu affect different movie clips or the main page?

Button(movie Clip) Inside A Movie Clip
Hey guys,

I had 3 buttons in the main movie which was working fine.

an external actionscript file was responsible for the buttons' functions

playPause is the instance name of the button(made as a movie clip)


ActionScript Code:
playPause.onRollOver = function()
{
    if(this._currentframe == 1) this.gotoAndStop("pauseOver");
    else this.gotoAndStop("playOver")
}

What I wanted to do is create another button(instance name speaker) on the main movie that when a user rolls over with a mouse, it'll show the 3 buttons. Basically, a button(movie clip) in a button(movie clip).

I have this movie clip working fine but none of the action script on the original buttons are working (of course because target changed).

I have tried the following and it will not work (in external .as file)-


ActionScript Code:
speaker.playPause.onRollOver = function()
{
    if(this._currentframe == 1) this.gotoAndStop("pauseOver");
    else this.gotoAndStop("playOver")
}

any suggestions? thanks in advance

Button(movie Clip) Inside A Movie Clip
hey everyone, using flash 8 here,

here is my problem.

on frame 1 line 2 i have a button ( bt1_btn ) and added this code on frame 1, line 1
Code:
stop();

bt1_btn.onRollOver = function() {
_root.gotoAndPlay("animation"); // frame 2
};
which works fine,

on frame 2 line 2 i have this movie clip ( bt2_btn ) that contains animation and 2 movie clips ( buttons - capsules_btn, and cahier_btn)
i added this code which works also...

Code:
bt2_btn.onRollOut= function() {
_root.gotoAndPlay("home"); // frame 1
};
but, i can't seem to make capsules_btn, and cahier_btn to work.

i tried the obvious
Code:
on (press) {
trace("on press");
}
which resulted to nothing.

i tried using this code at the main level on line 1
Code:
bt2_btn.cahier_btn.onRelease = function() {
trace("button clicked");
};
and got nothing

i then tried this code on frame 1 line 1 of the movieclip bt2_btn
Code:
_root.bt2_btn.cahier_btn.onPress= function() {
trace("button clicked");
};
nothing also

wondered what am i missing, or what i aint doing right, either way, can anyone help me out here?

attached file included

thanks

Movie Clip Button Inside Movie Clip.
hey ive got a slider menu which opens when clicked. however the buttons (also mc instanced) inside the slider mc wont work... here is the code:

//Menu Slider Background
_root.menuSlider_MC.onRollOver = function() {
new Tween(_root.menuSlider_MC, "_x", Bounce.easeOut, _root.menuSlider_MC._x,-250, 20);s
}

_root.menuSlider_MC.onRollOut = function() {
new Tween(_root.menuSlider_MC, "_x", Bounce.easeOut, _root.menuSlider_MC._x,-305, 20);s
}

_root.menuSlider_MC.onPress = function() {
new Tween(_root.menuSlider_MC, "_x", Bounce.easeOut, _root.menuSlider_MC._x,50, 20);s
}

//Menu Buttons
_root.menuSlider_MC.web_MC.onRollOver = function() {
trace("yes");
}

the slider mc works however i cant seem to get the 'web_MC' to respond..

how can i fix this? cheers.

Movie Clip To Movie Clip Button Script?
I am trying to have one movie clip jump to another movie clip. I made the mistake of having them on seperate frames and corrected that. None of the code I have used works still. I am wondering if anyone has a solution. I am sure its something small I am forgetting.

Some of the scripts I used:

on (release) {
loadMovie ("", "_root.about");
}


and

on (release) {
gotoAndPlay ("_root.about");
}


why doesn't this work?

ps my 2nd movie clip is called "about"

Move Movie Clip On Button Clip
This is a script that causes a movie clip to move down to a new location when a button nested inside the movie clip is released. can anyone tell me how to write the code so that when a different button is pressed the movie clip will move back to its original position. I am trying to learn actionscript 2.0 by taking the posted files apart and so on, I have a ton o books none of which are too helpful so I could really use some help. What the heck is "ty". I decided to join the forum because books were not cutting it! LOL

here is the code thanks.

ActionScript Code:
// this is the main button to start the slide show
collButtHolder.slide1.onRelease = function() {
    //move the to menu down to reveal the slide show components
    slide(collButtHolder,324);
    // call the function to set up slide show or reset it you had other buttons
    // this is where you set your path to the photos and how many photos are in that folder.
    resetSlideShow("images/slide1/", 15);
    collectionMenu.bName.text = "slide1";
};

function slide(mc, ty) {
    mc.onEnterFrame = function() {
        mc._y += (ty-mc._y)/5;
        if (Math.abs(ty-mc._y)<0.4) {
            this._y = ty;
            delete mc.onEnterFrame;
        }
    };
}

Actionscript To Go To Another Movie Clip
What is the actionscript to wait till all movie clips finish playing, then play another one?
Thanks in advance

Movie Clip With Actionscript
Allrighty - i think this is simple enough.

I want to have a movie clip on the stage that is inactive until the user mouses over; then it deactivates on the mouseout back to it's original state.

I believe I use a permutation of onClipEvent .... yes?

This is Flash MX, by the by.

Movie Clip Actionscript
Please help. I can't remember the code for making the end of a movie clip go to the next scene in the root movie.

Thank you!

Movie Clip Actionscript...help
I have a strange problem. I have a button that I'm using the following
code on:

on (press) {
tellTarget ("/A1") {
gotoAndPlay(2);
}
}

The A1 movie clip has a series of pictures in 10 frames with stop
actions on each of them. Now when I click the button the first time it works
perfect (showing the pic on frame 2 from A1) but if I reclick it again
it then goes to the next frame in A1 (Frame 3). Therefore showing the
next picture in the clip. I can't seem to figure out why it's doing
this. Seems like a Flash issue but I can't seem to figure out what I
have to do through the code to make it work. What I want it to do is
on reclick reshow that frame again. Seems easy...Any ideas ???

Thanks in advance !!!

Chr3

Movie Clip Actionscript Help Plz
hi,
i have a flash file with 2 scenes.i have a simple animation embeded in a movie clip, which is on the 2nd scene.
on the movie clip i have the following code -

on(rollOver) {
this.gotoAndPlay(2);
}

on(rollOut) {
this.gotoAndPlay(16);
}

on (release) {
gotoAndPlay(9);

}

for sum reason unknown to my, the button doesnt work, and the playhead just stays in the same place.
i have tried everything i know :-( i tried using an invisable button, but by placing this on another layer above the MC, the animation no longer played.

any ideas guys?

cheers, dean

Actionscript To Use A Movie Clip
i'm a bit fried - but i'll try to explain this as best i can:

I created a timeline animation. the only actionscript included is a stop on one of the layers that makes it work well when i test the movie - but when i select all the layers, convert to a symbol, and them load an instance into another document the movie loads but only the final frame - no animation.

any help would be much appreciated.


thanks
zach

Actionscript In A Movie Clip
I am fairly stupid with flash, so this could be an easy question- I have searched alot of places & can't find any answers though.
PLEASE HELP ME IF YOU CAN.

I have a button on the timeline that on rollover plays an image. I want to be able to rollover this button and have it play the image, and also play my movie clip (which is a drop down menu)
THIS IS WHERE I AM STUCK. I just can't get it to do this.

So basically I want to put my movie clip on the time line, have it work as a drop down menu, but also add actionscript to it that will play an image on rollover. I have tried, but to no avail.
I am using Flash MX 2004.

Actionscript On A Movie Clip
here is something I am trying to do for it

on(rollOver){
this.gotoAndPlay(2)
btn1._alpha = 100

}
on(rollOut){
this.gotoAndStop(1)
btn1._alpha = 0
}
on(press){
gotoAndPlay("content")

}

But I am not sure why on (press) function cannot not work. I try to trace and it works but the gotoAndPlay doesnt work.
Do anyone know why?

Movie Clip I Actionscript 3
Hi

I am trying to port a Actionscript 2 projekt to AS3. I want to scale a form on stage, when the user is draging whit the mouse a rectangel is supose to grow. In AS2 i did this whit this function (lage1 is the mouse position on mousedown and lage2 is the current mouseposition and changes all the time):

markera = function (lage1, lage2) {
trace("Markerar");
clippexistens = true;
this.createEmptyMovieClip("mclipp", 20);
mclipp.lineStyle(1, 0x993333, 100);
mclipp.beginFill(0xff9999);
mclipp.moveTo(hojdenNy, lage1);
mclipp.lineTo(hojdenNy+_root.bredd, lage1);
mclipp.lineTo(hojdenNy+_root.bredd, lage2);
mclipp.lineTo(hojdenNy, lage2);
mclipp.lineTo(hojdenNy, lage1);
mclipp.endFill();
updateAfterEvent;
}

I call this function on mouseMove so a new clip is drawn and replace the old. The user ses this as the form grows on stage. But this is not possible in AS3, a new clip will not replace an old. Has anybody a selution for this?

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