Movie Clip Actionscript....

For my online gallery, I'm using movie clips as buttons to navigate. I was having the movie clip play when you scrolled over it and off of it. Now i have it so when you click on it, it stops at the mid-way point. What I need help on is to get it to go back to its original state when I click on something else. So basically I'm looking for a way to go back to frame 1 when a different movie clip/button is clicked on. I want it to revert back to what it was in an inactive state when I click on a different part, but I don't know how to do that.
Is this making sense? can anyone help me??!?
Thank you in advance for any advice you may have!

Think in terms of creating a function that resets all buttons to their first frame.  You can also create it such that it ignores resetting the button that calls the function.

Similar Messages

  • In actionscript 3.0 how do i make a nested movie clip button go to a frame on the main timeline

    I am making a website based in flash actionscript 3.0 i have a button nested in its own movie clip, because I have the button expanding to be able to read it i have figured out the only way to do this is by creating it as a movie clipa nd inside the movie clip creating it as a button
    I added an event listener to the blog button by saying,
    blog.addEventListener(MouseEvent.ROLL_OVER,gotoblog);
    function gotoblog(evtobj:MouseEvent){
         gotoAndStop(2)
    this part of the code works it goes to the 2nd frame of the timeline it is in and stops wich is a blown up version of the origanal symbol
    i added on frame 2 a second command
    blog.addEventListener(MouseEvent.CLICK.gotoblogpage);
    function gotoblogpage(evtobj:MouseEvent){
    gotoAndStop("blogframe")
    trace("the blog button was clicked")
    i have named the symbol blog and have name the frame of where the blog page is going to be "blogframe" this line of code at the bottom is where i run into trouble the output window in Flash is saying "The blog button was clicked" just like i want it to. no errors are accouring why than is the playhead not going to frame "blogframe"? if the button is working when i click it the code is right i belive the problem here is it does not want the playhead to go to the frame i want it to. So i gues my question is, how can i make a button withing a movie clip interact with the main timeline?

    I have a similar problem if could please help me i'd really apreciate it!!
    So i have a looping animation of some thumbnails, the hierarchy goes like this
    Scene1(main timeline) -> imgBar(MC)->imgBarB(MC within the imgBar MC)
    My buttons symbols are in the last MC "imgBarB" where i have this code:
    ss1.addEventListener(MouseEvent.CLICK, OneButtonClicked);
      function OneButtonClicked(event:MouseEvent):void{
      MovieClip(root).gotoAndStop("ssbox1");
    I want to control the Btns in my "imgBarB" MC to play a labeled frame(named "ssbox1") on another MC on the main timeline,this other MC goes like this:
    Scene1(main timeline)->ssbox_mc(MC where my labeled frame is)

  • How do I move a movie clip in actionscript 3.0?

    Let me start off by thanking Everyone who have help me on Adobe Forums! it helps a ton i am new to actionscript and am trying my hardest to learn it so thank you i cant tell you how it means!
    I have  a movie clip of an acorn named "games" and inside this i have another movie clip named "em_games" when it is click i want to to play out an animation just changing the y coordinates from where the acorn sits in the tree and fall to the ground also when it hit the ground i want it to fire off an animation it has nested inside of it where it cracks open and a piece of paper fly upward where it rests at the top of the screen.i have not moved many objects through actionscript 3.0.
    thanks again to everyone who has helped me out!

    One way to move an object using AS3 is to use the built-in Tween class.  You should look it up in the help documentation for details, or search Google for a tutorial. 
    There are also third party tweening clsses such as TweenLite and Tweener that you could use, though if you are just beginning that might be a lesson better left to more experience since it involves downloading/installing the classes.
    You could also just use an ENTER_FRAME approach to have the y property of the movieclip continually change until it reaches its final value.

  • Newbie Q: What do movie clips need to allow Actionscript?

    Hello. Thanks for taking time out for this question.
    Basically, I started an exercise in a book and it asked me to
    add code to a movieclip. I created a basic circle, converted it to
    a movie clip and tried to press F9 for actionscript, but Flash told
    me "Current selection cannot have actions added to it".
    When I looked at the example file that came with the book, I
    couldn't see anything special about the movieclip that was used.
    What am I missing?

    However, the techniques of adding code directly to movie
    clips is an old and outdated way of coding. And I would advise that
    if you are serious about learning Actionscript that you don't go
    down that road.
    AS 2 is perfectly useful and good so learn that or learn AS3
    (or both!), but here is a link to an article about the issue:
    http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent
    David Stiller (that is his blog) posts here often and is a
    great source of information. You might want to check out more of
    his articles.
    It could be that your book is just showing one way before
    moving on to a more sensible approach, but check the examples
    toward the end. If they are full of on() and onClipEvent() I woudl
    recommend getting a different book.

  • Call actionscript file function from actions panel of a movie clip

    i have a movie clip with an actions layer
    can i call a function from an actionscript file from the actions panel?

    does that actionscript file specify a class or not?
    if not, then use:
    include "yourpath/yourfilename.as"
    on any timeline.
    any function in that as file will be added to the timeline that has the include statement and you reference that function with normal dot syntax from your calling timeline.

  • Randomize a Movie Clip Animation Using Actionscript

    I'm new to actionscript.
    I've been working on this sort of sunset-like sequence in
    Flash. I've created a movie clip of a star that has a sort of
    twinkle animation. It consists of 3 layers. What I want to do is
    randomize this animation so I can use the symbol spray tool to fill
    my sky with twinkling stars. If I just to a "gotoAndPlay" repeat,
    they all twinkle at the same time, and this looks pretty stupid.
    My limited knowledge and experience with Actionscript tells
    me that I need to define the animation as a function and use some
    sort of math randomizer to control when it plays?
    I have some books on actionscript I'm yet to work through, as
    this is sort of a hobby of mine that I'm teaching myself, but I
    haven't had the time nor energy to wrap my brain around it yet.
    Thanks for any help!

    Well, I've now decided to only have a few stars twinkling, so
    it's no longer going to be that much of an effort to do a couple of
    different movie clips that twinkle at different periods of time. I
    just had the brilliant idea to do constellations that highlight and
    serve as the button navigation for my portfolio website, and I plan
    to have it seem like your panning up above the horizon and looking
    up into the sky, and having about a hundred twinkling stars moving
    and twinkling at the same time would probably prove super taxing on
    most computers lol...
    I'd still like to hear from anyone who may know how to do
    this as it would still come in handy to me.

  • Moving movie clips with ActionScript

    I am trying to move four movie clips with actionscript in a
    circler motion with two buttons, one to rotate the mc’s to
    the left and one button to rotate the mc’s to the right. Here
    is a link to what I am trying to do;
    http://www.us.playstation.com/Lair/
    and it is undrer game features.

    Yes, that's what the code I gave you is intended to do....
    you replace that code with whatever action you need to take to turn
    your movie around.
    I have no idea what your movieclip is doing, but I'm guessing
    by your response that if it was an arrow pointing left to right
    (just an example), you want it to be pointing right to left when
    the left arrow is pressed. If you want an immediate turn around,
    then the simplest way to do that is to have another frame
    containing the movieclip that it moves to where it faces the other
    direction--and to have it appear turned around, from the toolbar
    you select Modify -> Transform -> Flip Horizontal.
    So the movieclip would live inside another movieclip that has
    two frames with stop()'s for each frame. In the first frame you
    would have the subclip facing left to right, and in the second you
    would have it facing right to left. If we call that 2-framed
    movieclip "walker", the code I provided before would
    become...

  • Casting a 3d movie clip in actionscript

    Hello All,
    I'm new to flash and actionscripting (i come from the land of ansi c but have traveled extensively). I've created a great animated animated 3d movie clip and want to have them generated on the stage in relation to an xml file. I've gotten this to work with a 2d movie clip but am running into problems casting a 3d object.
    my object (a movie clip - boxContainer with an instance name of boxContainer_mc) is built out of all movie clips in the following way (shown in tree form):
    boxContainer
    -bottomBox
    ---boxFront
    ---boxLeft
    ---boxRight
    ---boxTop
    ---shadowFront
    ---shadowLeft
    ---shadowRight
    ---gradientLeft
    ---gradientRight
    ---gradientFront
    -topBox (this movie clip contains an animation that is controlled through a MouseEvent:Click)
    ---left
    ---right
    ---top
    ---back
    This animates smoothly through flash, but doesn't work when I try to cast the movie clip in actionscript 3 using the following code:
    var boxContainer_mc:boxContainer = new boxContainer();
    addChild(boxContainer_mc);
    When I try to test the swf file I recieve the following errors:
    1046: Type was not found or was not a compile-time constant:boxContainer
    1180: Call to a possibly undefined method boxContainer
    any ideas?

    If this is a library item that you named boxContainer in the library, you need to designate that name as the linkage ID for the movie.  Right click on it in the library, select Linkage from the menu that appears, and in the interface that appears select the Export for Actionscript option (another will be slected automatically).  Be sure your Class name appears as you have it coded and click ok.

  • MAKE A MOVIE CLIP UNDETECTABLE TO CURSOR IN ACTIONSCRIPT.

    Simple problem.
    On layer1 we have a button.
    On layer2 we have a symbol_MC (which is a movie clip with animation embedded inside) overlapping the button.
    Result.
    The button cannot be rolled-over or clicked due to symbol_MC overlapping it.
    Solution.
    Obviously I need to make the symbol_MC on layer2 which is overlapping the button undetectable to the cursor,
    so that when the cursor rolled over symbol_MC, it detects the button instead.
    I don't have any code to make symbol_MC undetectable to the cursor!

    Excellent the code works as expected, this thread is solved.

  • How to flip a movie clip using actionscript

    I have a movie clip on the stage facing one way (--->) how
    can I make it face the other way (<---) by flipping it over (not
    rotating it) using action script 3?

    var flipTween:Tween = new Tween(mc, "scaleX", Regular.easeIn,
    mc.scaleX, mc.scaleX*(-1), 1, true);
    should do it I think.

  • Creating instances of a movie clip using Actionscript

    I have a script that pulls a specified amount of Movie clips
    from the library to the stage, and that part of my script works. I
    want to add a button that will stop the movie clips but the Movie
    clips do not have instance names since they were pulled onto the
    stage from my script. I was wondering if anyone had an idea on how
    I can do this.

    stop();
    var _sixSidedDie:Dice;
    chooseDice_btn.addEventListener(MouseEvent.CLICK, onClick1);
    random_mc.addEventListener(MouseEvent.CLICK, onClick2);
    random_mc.buttonMode = true;
    function onClick1(event:MouseEvent):void
    var diceTotal:Number = parseInt(totalDice_cb.text);
    gotoAndStop(2);
    for(var i:Number = 0; i < diceTotal; i++)
    _sixSidedDie = new Dice();
    _sixSidedDie.label = "SixDie" + i;
    _sixSidedDie.name = "sixDie" + i;
    addChild(_sixSidedDie);
    if(i == 0)
    _sixSidedDie.frame = 2;
    _sixSidedDie.x = 96;
    _sixSidedDie.y = 115.7;
    else if(0 < i && i < 5)
    _sixSidedDie.frame = 2;
    _sixSidedDie.x = i * 168 + 96;
    _sixSidedDie.y = 115.7;
    else if(4 < i && i < 10)
    _sixSidedDie.frame = 2;
    _sixSidedDie.x = (i - 5) * 168 + 96;
    _sixSidedDie.y = 276;
    else if(9 < i && i < 15)
    _sixSidedDie.frame = 2;
    _sixSidedDie.x = (i - 10) * 168 + 96;
    _sixSidedDie.y = 438;
    else if(14 < i && i < 20)
    _sixSidedDie.frame = 2;
    _sixSidedDie.x = (i - 15) * 168 + 96;
    _sixSidedDie.y = 598;
    function onClick2(event:MouseEvent):void
    event.target.sixDie0.gotoAndStop(Math.ceil(Math.random() *
    6));

  • Buttons, movie clips and actionScripts

    I've created myself conundrum. In my test movie I have
    created two named frames on the screens timeline (home, box); each
    content frame consists of a movie clip with a button in it
    (home_btn, box_btn). What I'm attempting to do is have the home_btn
    button call the movie in "box" and have the box_btn button call the
    movie in "home".
    If I don't use movie clips the is a simple task,
    home_btn.onRelease = function() {
    gotoAndPlay("box"); }
    but as soon as I place the buttons inside a movie clip the
    navigation ceases to work. I'm assuming I'm getting beaten as
    something very basic, but unfortunately I can't find it.
    Anything thoughts would be greatly appreciated. Thanks
    locoLindy

    Perfect! That fixed the problem. Many thanks for your help,
    I'd have toiled with that for days!
    Again, that's for your help!
    locoLindy

  • Nested movie clips and actionscript

    I have this code set up:
    /* This is to get the rollover menu movie clip */
    this.profile_button.onRollOver = function(){
    profile_button.gotoAndStop("on");
    /* This is to get rid of the rollover menu */
    this.profile_button.onRollOut = function(){
    profile_button.gotoAndStop("off");
    /* This tells where to go when someone clicks on menu 1 */
    this.profile_button.profile_menu_1.onRelease = function() {
    gotoAndStop("5");
    /* This tells where to go when someone clicks on menu 2 */
    this.profile_button.profile_menu_2.onRelease = function() {
    gotoAndStop("10");
    This is on the main timeline and menu_1 and _2 are in the
    Profile_button movie clip. When I export I get the drop down menu
    but when I click on the menu items it won't do anything. Any help
    would be much appreciated. Thanks.

    i'm not sure what direction you were going with loading a
    Movie Clip, but there are many ways you could go here, depending on
    what sort of effect you would like as well. One simple way is that
    you could have an invisible button underneath profile_button that
    covers the screen which acts to remove the menu buttons(and itself)
    on rollover. So in other words, rather than
    profile_button.onRollOut, you're doing more like anything other
    than profile_button.onRollOver... make sense? if that doesn't work
    for you, you could check mouse coordinates every x milliseconds by
    setting an interval...

  • Controlling Movie Clip with actionscript Question

    Dear All,
    I have a movie clip named A which inside this movie clip
    there is another Movie clip named B and inside B there is a listbox
    component.
    Inside Movie clip A there are 20 frames which at frame 10
    there is a stop() script.
    My question is how to control Movieclip A to run
    gotoAndPlay(11) from MovieClip B when there is a click action to
    the listbox?
    Please Advise,
    Ozhee

    if A is on the _root timeline from anywhere in your _level0
    swf you can use:

  • Actionscript 2.0 clear all movie clips

    I need to figure out how, when you roll over a movie clip, it clears all previous clips showing and then plays its clip

    eh that may not be possible, but what the set up is each tooltip is its own layer with the clips pasted in.
    In each clip theres about 5 layers that are involved with the animate. My code to activate it is
    on(rollover){
              gotoAndPlay(2);}
    that triggers the animation. then theres a simple "close" button that just plays everything in reverse.

Maybe you are looking for

  • All-day events

    When I import a calendar from palm desktop, my all day events (banners in Palm) spread out to two day events in iCal. Is there any way to fix this without going day by day and correcting it?

  • Remote works for a while, then fails to connect

    I upgraded my first-gen iPhone to software v2.0, and installed the Remote app. It connects to iTunes on my Mac and it works fine, for a while. Then an hour or so later, when I launch the Remote app again, it gives me the "Could not find library" erro

  • IPod classic calendar

    Now that my Sony HD5 seems to be on its last legs I'm thinking of biting the bullet and getting an iPod. I have a (probably very noobish) question about the PIM functions though: how do I get my data into them? Is it a question of syncing with MS Out

  • Help with converting pdf to excel

    I have a pdf of an excel file which I need to convert back to excel.  The problem is that when I convert it only half the pages convert correctly to excel but the first three pages are unreadable.  Any suggestions as I am stuck on why it only convert

  • Oracle 11g , Administrator OCM certification

    Hi, I have completed OCP certification in the developers track by clearing in the following exams : 1Z0-007 , 1Z0-147 and 1Z0-146. I wish to become an OCM in DBA track for Oracle 11g. Going by the steps mentioned in the Oracle certification website,