Movie Clip Button - Action Script issues

This is a two part question:
1. I have my movie clip button, "mcAboutus" then inside my
movie clip I have 5 layers: actions, labels, text, animated
rollover("mcAboutusover"), animated rolloff("mcAboutusoff"). On the
labels layer I have _up, _over, _off. On the _up is the text layer,
on the _over is a movie clip of the animated
rollover("mcAboutusover") which is 90 frames, and I want to loop as
long as the mouse is over the text. And the _off has the
"mcAboutusoff" movie clip.
So I was able to have the rollover work, but when I roll off
the rollover animation continues on until the end of the animation.
I understand it has to do with the fact that it's a movie clip, but
how do I point it to go into the movie clip and read the animation
and that on the last frame of the animation I have a
"gotoAndPlay(1);" to have the animation continue looping as long as
it's in a rollover state?
here is the code I have for the _root:
this.mcAboutus.onRollOver = function() {
mcAboutus.gotoAndPlay(_over);
this.mcAboutus.onRollOut = function() {
mcAboutus.gotoAndPlay(_off);
The other problem I am having is that once the I have rolled
over the animation once, the button dies and won't let me rollover
it again?
Aside from the "stop();" action in the mcAboutus movie clip
symbol, I don't have any other actions, should I put items in the
different movie clips I have set up?
ALSO.... The reason that I have the main movie clip button,
and two movie clips residing in the mcBtn is I wanted light rays to
be glowing from the text, and I was having a hard time getting what
I wanted from Flash, so I created in After Effects and exported two
.SWF files. So those .SWF files are the _over and _off states in
the mcBtn. I am having a very hard time controlling those Movie
Clips within the main MC Button. Please, any help would be greatly
appreciated.

quote:
Originally posted by:
kglad
mcAboutusover should be a movieclip that has your over
animation and it should have a stop() on its last frame. it should
be placed on your _over frame in mcAbousus' timeline. you should
then use:
Ok, so I have my main timeline, in it has my
mcAboutus>> then inside that I have three labels. _up which
has the static text then on frame 5 I have the _over which has the
keyframe for the mcAboutusover, this animation is 90 frames, then I
have on frame 10, the _off for the RollOut state, and I have a 10
frame animation on that one. I still can't get it to continue on
after the initial rollover, the button still dies down.
I am going to redo everything in a presentation timeline,
based on Total Training and see if that helps my problem out any,
and will get back to you tomorrow with more info. Thanks

Similar Messages

  • Newbie here, with button action script issue

    I have just started to scrach the surface with actionscript
    and I have attempted to assign it to buttons. Much to my supprise,
    it worked, sort of... All my buttons require a double click the
    first time you click on them. I was able to put
    this together, by
    using the following action script for all my buttons:
    on (release) {
    ybutton.onRelease = function() {
    gotoAndStop(28);
    So I have 2 questions. What actionscript will give me the
    single click that I am looking for? Also, is there any shortcut to
    making a broad change? In other words, will have to switch out the
    code for every button on 37 frames?
    Thank you

    1: // You needed two clicks because you have 2 onRelease.
    on (release) {
    gotoAndStop(28);
    2: Yes, it'll go fast I would copy the above and paste where
    needed then just change the frame #.

  • How do i mute the sound in a movie clip using action script?

    assuming my movie clip is named "movie"

    You should use SoundTranfrom object and soundTransform property of your movieClip.
    At first you have to instantiate soundTransform object and assign value of 1 to it's volume property:
    var soundTr:SoundTransform = new SoundTransform();
    soundTr.volume = 1;
    Than a simple toggle function, which changes volume property of soundTr and assigns the object soundTr to your movie's soundTransform property.
    function toggleMute():void
        if(soundTr.volume == 1)
            soundTr.volume = 0;
        }else{
            soundTr.volume = 1;
        movie.soundTransform = soundTr;
    Regards,
    gc

  • Basic invisible button movie clip frame actions not working, pls. help!

    Hi,
    I've got a basic little slide show player which is timeline-based, rolling through 5 images with alpha transitions, and on the topmost layer, I have 5 invisible movie clips which have actions applied to them as follows:
    on (press) {
        gotoAndPlay(21);
    This action should allow for the on click button to navigate to that specific frame, or image, but for some reason it is not working.
    Did I do something wrong? I feel like I've done this before but I'm rusty with Flash since I don't use it all the time.
    Any help is greatly appreciated!
    Thanks,
    Sean

    The invisible movie clip is something I know I've done over the years on many occasions - I'm not sure I'm understanding your alternate technique, can you explain it better? The way my movie clips are invisible is just by setting the alpha to zero in the properties for the movie clip instance (clicking on the object on stage, then setting it in properties)..
    Also, the actions are on the invisible movie clips (buttons) and not the timeline.
    Cheers,Sean

  • Just learning...help on movie clip buttons

    I've tried tons of tutorials and i cant seem to get my movie
    clip button to work when i put the mouse over the button.
    i have included a screen shot of my time line and code.
    Layer 10 frame 1 is where all the script is.
    "actions" layer has my "stop" codes in frames 1 and 20
    time
    line and code
    Thanks for your help.

    ok if i change "home" to "this" in my code, do i also have to
    change my instance name for my button layer from "home" to "this"
    as well?
    and how do I cast e.currentTarget as a movie clip?
    sorry this is only my 3rd day playing around with Flash.
    Thanks!

  • Hi, i am a bit of a newbie at AS & need some help applying it to a movie clip button

    I have created a movie clip button but am stuck with the actionscript. I have created the rollover and rollout for this movie clip button but i want it to do 2 things after this i want it to go and stop on the first frame of a movieclip which has my content on it called portfoliogallery_mc (which is also the same instance name for it) when you then click the button i want it to go and play frame 11 of that movie clip portfolio gallery_mc.
    Here is my current actionscript i HAVE Flash 8 on my comp that i am currently using.
    Please note my actions are on a layer called actions and not on the movieclip button itself.
    nxtimagetwo_mc (is the movie clip button/instance of mc)
    THE CODE I HAVE USED
    this.nxtimagetwo_mc.onRollOver = function() {
    nxtimagetwo_mc.gotoAndPlay("_over");
    this.nxtimagetwo_mc.onRollOut = function() {
    nxtimagetwo_mc.gotoAndPlay("_out");
    portfoliogallery_mc.gotoAndStop(1);
    portfoliogallery_mc.gotoAndPlay(11);
    currently it is playing to frame 11 not stopping at frame 1 and stops on frame 20 where i have a stop action. I also have a stop action on frame 1 of that movie clip.
    What I want it to do is first stop at frame 1 of that movie clip and when the button is clicked again to go and play frame 11 of that same movie clip.
    Basically what i want the mc button to do is 2 things automatically stop the mc for the first content and when button is clicked let the content fad out and play to where the next stop action is set to in the Movie Clip.
    Nothing to with the above www.rsquareme.co.uk is my current portfolio website if you would like to check it out it is not fully complete yet.

    it doens't make sense to execute:
    portfoliogallery_mc.gotoAndStop(1);
    portfoliogallery_mc.gotoAndPlay(11);
    only the 2nd line of code will be effected.
    i know you want to control 2 movieclips.  what are the instance names of the two movieclips and what do you want to occur in each of those movieclips.
    or, do you want to control 1 movieclip and have it play a certain sequence of frames followed by another sequence of frames?

  • Cursor stops movie clip buttons

    I have animated movie clips as buttons. When the animation
    reaches the point where the cursor sits on the button it vanishes.
    Here is the script I have on the main time line:
    //news_mc is the instance name of my movie clip button
    news_mc.addEventListener(MouseEvent.CLICK, newsPage);
    news_mc.addEventListener(MouseEvent.MOUSE_OVER, newsRollOn);
    news_mc.addEventListener(MouseEvent.MOUSE_OUT, newsRollOff);
    news_mc.buttonMode = true;
    function newsRollOn(event:MouseEvent):void {
    news_mc.gotoAndPlay("in");
    function newsRollOff(event:MouseEvent):void {
    news_mc.gotoAndPlay("out");
    function newsPage(event:MouseEvent):void {
    gotoAndStop("news");
    I know there is something about
    news_mc.mask = ??? I'm not sure if I sure what part of the
    mask I use. I have a layer that has the button background (instance
    name - background) and then the 2 layers that form the animated
    mask - the mask layer contains a copy of the button background
    (instance name - background2) and then the animated later of the
    mask contains a gradient that slides over the button (instance name
    - masker).
    What is happening?

    ROLL_OVER and ROLL_OUT rather than mouse_over and _out did
    the trick!

  • Movie clip button navigation

    hey, i'm pretty new to flash and i'm attempting to create a
    site with different scenes representing different pages.
    i have four movie clip buttons. One of these buttons should
    link to the "about me" page, which so far only has another movie
    clip with pictures. from the main page i'd like a user to be able
    to click on the about me button/movieclip and the pictures should
    appear.
    i've been using the code:
    on(release){
    _root.gotoAndPlay("about_pictures")
    however whenever i run the preview, nothing happens when i
    click the button.
    main timeline includes :
    about me > pictures with a motion tween(pictures_about_mc)
    > the movie clip of pictures(pictures_mc).
    background
    buttons
    actions
    any help would be appreciated. thank you in advance.

    If you are genuinely using scenes, then your gotoAndPlay()
    call needs to include the scene name and the frame...
    gotoAndPlay("about_pictures", 1)
    and "about_pictures" needs to be the name you assigned to
    that scene in the scenes panel.
    Using scenes and the way you coded the button are both not
    clean ways to code--things end up being hidden from plain site.
    Instead of scenes, just use the one maintimeline. Instead of
    on(release, etc) use myBtn.onRelease = function (){...} in the
    actions layer.
    Makes life so much easier in the long run, especially a year
    from now when you're trying to change some code and can't find
    where you hid it.

  • Movie Clip Button not working within an Movie Clip

    Hi,
    I'm trying to create a movie clip on my my main timeline that has a movie clip button within it that pops up a box in the middle of the site that contains text and links. On Frame 1 I have the Up state, frame 2 the roll over state, and frame 3 my Down State (where Box appears).
    on (rollOut) {
        this.gotoAndStop("1");
    on (rollOver) {
        this.gotoAndStop("2");
    on (release) {
        this.gotoAndStop("3");
    I have stop(); on each of the 3 keyframes
    The problem is that on the main time line, the button is clickable but doesnt do anything
    Any suggestions, what am i missing?
    Cheers

    Ok, i have this assigned to a movieclip, is this wrong? Especially for MovieClip Buttons. Anyway, just tried this and it works!
    on (rollOut) {
        this._parent.gotoAndPlay(1);
    on (rollOver) {
        this._parent.gotoAndPlay(2);
    on (release) {
        this._parent.gotoAndPlay(3);

  • Movie clip button help

    Hello im trying to develop a small swf file that the user can
    control a video that gives the impression of rotation and
    transparency using arrow buttons. I have a 2 small movie clip files
    that are currently spread across the timeline exactly 200 frames.
    the videos are controlled by means of fast forward and rewind this
    gives the impression of rotation (backwards and forwrds) i have
    already got the fast forward and rewind function working i would
    like another set of arrows that control the transparency or alpha
    of the second movie clip so that when the user presses either an up
    or down arrow button the transparency goes up or down. Im very new
    to action script so any basic explanation help would be great. The
    code for the forward and rewind buttons is as follows (ignore the
    play function as this button is hidden off stage):
    stop();
    play_btn.onRelease = function (){
    play();
    pause_btn.onRelease=function(){
    stop();
    forward_btn.onPress=function (){
    _root.createEmptyMovieClip("controller_mc",1);
    controller_mc.onEnterFrame=function(){
    _root.gotoAndStop(_root._currentframe+3);
    if (_root._currentframe+3 > _root._totalframes){
    _root.gotoAndStop(_root._totalframes);
    forward_btn.onRelease=function (){
    controller_mc.removeMovieClip();
    forward_btn.onReleaseOutside=function (){
    controller_mc.removeMovieClip();
    rewind_btn.onPress=function (){
    _root.createEmptyMovieClip("controller_mc",1);
    controller_mc.onEnterFrame=function(){
    _root.gotoAndStop(_root._currentframe-3);
    if (_root._currentframe-3 < 1){
    _root.gotoAndStop(1);
    rewind_btn.onRelease=function (){
    controller_mc.removeMovieClip();
    rewind_btn.onReleaseOutside=function (){
    controller_mc.removeMovieClip();
    }

    //button is released and increases the Movie Clip's current
    alpha value by 10%
    increase_alpha_btn.onRelease=function(){
    if(MovieClip._alpha<100){
    MovieClip._alpha+=10;
    //button is released and decreases the Movie Clip's current
    alpha value by 10%
    decrease_alpha_btn.onRelease=function(){
    if(MovieClip._alpha>0){
    MovieClip._alpha-=10;

  • How do I stop a Movie Clip (Button) from working once clicked?

    Ok,
    I'm using a movie clip as a button to show content on a page, effectively its like a new page of the website. Problem is, with the script im using for it, once the content is show, the button is still active and if clicked again, will re-load the content. I want a way to effectively disable the button whist the content is shown.
    Thanks.
    this.services_inner.buttonMode = true;
    this.services_inner.addEventListener(MouseEvent.MOUSE_OVER, rollOver_services);
    this.services_inner.addEventListener(MouseEvent.CLICK, onClick_services);
    function rollOver_services(evt:MouseEvent):void {
    this.services_inner.play();
    function onClick_services(event:MouseEvent):void {
    MovieClip(root).mov.backgrounds.colour.gotoAndPlay(2);

    Thanks, that does stop it, however, i now need it to work again if a different button is clicked... there are 4 buttons (movie clips) in total, so I assume I'd just need to add the event listener back again on click of the others?
    This is the "Services" Button, with the event listener removal.....
    this.services_inner.buttonMode = true;
    this.services_inner.addEventListener(MouseEvent.MOUSE_OVER, rollOver_services);
    this.services_inner.addEventListener(MouseEvent.CLICK, onClick_services);
    function rollOver_services(evt:MouseEvent):void {
    this.services_inner.play();
    function onClick_services(event:MouseEvent):void {
    MovieClip(root).mov.backgrounds.colour.gotoAndPlay(2);
    this.services_inner.removeEventListener(MouseEvent.CLICK, onClick_services);
    This is the "Contact" Button, which when clicked would need to "re-activate" the Services button.
    this.contact_inner.buttonMode = true;
    this.contact_inner.addEventListener(MouseEvent.MOUSE_OVER, rollOver_contact);
    this.contact_inner.addEventListener(MouseEvent.CLICK, onClick_contact);
    function rollOver_contact(evt:MouseEvent):void {
    this.contact_inner.play();
    function onClick_contact(event:MouseEvent):void {
    MovieClip(root).mov.backgrounds.art.gotoAndPlay(2);
    this.services_inner.removeEventListener(MouseEvent.CLICK, onClick_contact);

  • Drag variety of movie clips with one script

    Hello,
    I am sure that this has been asked or answered before, but
    could not locate the correct response.
    Problem:
    There are 20 movie clips loaded onto the stage through
    actionscript. I have 20 different onPress scripts to start the drag
    for each (which also contain custom variable).
    Problem, I have one single onRelease script which is to be
    used for each, but do now wish to give 20 custom handled scripts.
    Can I somehow use certain scripting for using one single
    generic script for the onRelease? So no matter what was released it
    will go through this one script.
    Thanks
    D

    something like
    upListener = new Object();
    uplistener.onMouseUp = function (){
    doSomething();
    Mouse.removeListener(this);
    and the line
    Mouse.addListener(upListener);
    in every onPress action could do.
    [Code not tested, likley full of typos - but hopefully useful
    as a general example;]

  • Loading a movie clip loses my script function

    I have an art gallery that is in three parts. The Flash movie
    used to load everything before opening, but the gallery has grown
    too large. So now I've divided it up into three sections. The first
    section loads the first set of pics with the movie. The second and
    third sections load when you click on the relevant buttons. The
    interface (root movie) has 2 movie clips per section - the
    thumbnails (all three of which load with the movie) and the large
    pics of the thumbnails. So when you click on a thumbnail the proper
    large work shows in the other movie clip. This all worked fine
    using this code in my thumbnails for the largeWorks sections:
    stop();
    large1_btn.onPress = function (){
    _root.largeWorks_mc.gotoAndStop(1);
    large2_btn.onPress = function (){
    _root.largeWorks_mc.gotoAndStop(2);
    etc...
    This code is in the thumbnail movie script. Notice it calls
    _root.largeWorks_mc
    Now when you click on See Large Works button a place holder
    movie clip (target) called largeWorksE_mc is replaced with
    largeWorks_mc.
    The button uses the code:
    loadMovie("largeWorks_mc.swf",_root.largeWorksE_mc);
    But now when I click on the thumbnails nothing happens. My
    thumbnail movie clip is no longer communicating with the loaded
    movie clip. What have I done wrong?

    I had trouble following your explanation.
    If code is disappearing, it is probably code in a MovieClip
    that a loadMovie replaces with another external movie. When using
    loadMovie, the MovieClip in it is destroyed and the timing is not
    something you can predict.

  • How to make a movie clip button into a url link?

    Hello,
    I'm kinda new to using Flash and am trying to edit a template for a friend of mine, the problem is I'm trying to add a url link to the buttons. I tried adding this action to the button
    on(release){
    getURL(http://www.yoururl.com.);
    I saved as swf & got this error msg in the compiler errors: Symbol=but1,layer 4, frame=1 Mouse events are only for button instances
    In the library I checked the properties of the button and its a movies clip, I'm not sure if it will make any difference if I change to button or graphic?
    I would like to upload the fla and swf files but this forum doesn't seem to allow me to attach files to messages.
    Does anyone know how to do this? Any help is greatly appreciated.
    http://jaedenyoo.com

    Unfortunately that doesn't seem to be the problem, I checked and
    in my flash file its typed correctly.

  • Movie Clip / Buttons

    I know this is probably something really easy to do I just
    for whatever reason cannot make this work. I am new to flash and am
    building an entire website. I used a template that I purchased and
    have been messing around with it and changing it. Problem is the
    buttons that are made are movie clips not actually buttons. I want
    to create a duplicate button, so I created a duplicate of the movie
    clip in the library. Problem is when I drag the movie clip into the
    movie and run the flash preview the new movie clips do not work
    like the other ones – meaning the other ones behave like they
    should – as a button (when I move my mouse over it the action
    works) but the new ones just appear as images. I know this must be
    a very easy fix and I must be doing something wrong. Any help would
    be greatly appreciated – (I might not have explained the
    problem accurately, so if more clarification is needed or an
    example needs to be uploaded let me know)
    Thanks a lot!!!

    Thanks that worked great, hope that wasn't too noob : (
    Well another problem as come up, I made another flash movie
    containing content in an xml file. When the swf is hosted and in
    the browser it works fine. However when i put that same swf in an
    html document and host it the xml never loads. Am i doing something
    wrong?
    Thanks in advance,
    ~Rob

Maybe you are looking for

  • How to cancel service entry sheet

    Dear all , Pl explain the process for how to cancel the service entry sheet ? Regards

  • I lost my iphone yesterday, how can i find it?

    Hi, I lost my iPhone yesterday and I don't think I had the "findmyphone" app, can you help?

  • Regarding Archiving customer

    Hi i want to archive  customers which are not in use and which don't have any transactions iam trying to do the same through SARA .When i have gone through this process and scheduled the job the spool job doesn't contain any data .any guess for the r

  • The Problem is about Standard Back Button Function in Report Program

    The Problem is about Standard Back Button Function in the Report Program.        In the Report,First call screen Then Using "write" output some information,That is ok. but In the GUI When I press back button that is standard button,it exit screen to

  • ActionScript URL hangs on loading

    Hi, I am working with a DRM installation on a dev server. When I try to access http://xxxxx/drm-web-client/Forms/ActionScripts/FileActionScript.aspx the web page seems to hang with a loading message displayed. We've tried a service restart without an