Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 550541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:17:57+00:00 2026-05-13T11:17:57+00:00

I’m trying to make some flash buttons with a mouse_over animation that plays in

  • 0

I’m trying to make some flash buttons with a mouse_over animation that plays in reverse on mouse_out. Now I have it working for one of my three movie clip instances.

I am using e.currentTarget.play() instead of having a function for each movie clip, but how do I do the same for my playReverse function? I tried putting e.currentTarget.prevFrame() instead of mc1.prevFrame() but it did not work. My code is as follows:

mc1.addEventListener(MouseEvent.MOUSE_OVER,mover);
mc2.addEventListener(MouseEvent.MOUSE_OVER,mover);
mc3.addEventListener(MouseEvent.MOUSE_OVER,mover);
mc1.addEventListener(MouseEvent.MOUSE_OUT,mout);
mc2.addEventListener(MouseEvent.MOUSE_OUT,mout);
mc3.addEventListener(MouseEvent.MOUSE_OUT,mout);

function mover(e:MouseEvent):void {
    stopPlayReverse();
    e.currentTarget.play();
}

function mout(e:MouseEvent):void {
    this.addEventListener(Event.ENTER_FRAME, playReverse, false, 0, true);
}

function playReverse(e:Event):void {
    if (mc1.currentFrame == 1) {
        stopPlayReverse();
    } else {
        mc1.prevFrame();
    }
}

function stopPlayReverse():void {
    if (this.hasEventListener(Event.ENTER_FRAME)) {
        this.removeEventListener(Event.ENTER_FRAME, playReverse);
    }
}

Any idea how I can fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:17:58+00:00Added an answer on May 13, 2026 at 11:17 am

    Your function playReverse only use mc1 how can it work with the others movie clip.

    If you choose to do it that way you can keep a track of the current MovieClip playing in reverse.
    You will have to add more logic if you want that the play in reverse always finish when passing over one clip to another.

    var currentMovieClip:MovieClip=null;
    
    function mout(e:MouseEvent):void {
        var mc:MovieClip = e.currentTarget as MovieClip; 
        if (mc !== null) {
         currentMovieClip = mc;
         this.addEventListener(Event.ENTER_FRAME, playReverse, false, 0, true);
        }
    }
    
    function playReverse(e:Event):void {
        if (currentMovieClip==null) {
           return;
        }
    
        if (currentMovieClip.currentFrame == 1) {
            stopPlayReverse();
        } else {
            currentMovieClip.prevFrame();
        }
    }
    

    Another way that implies that you can have each clip to finish their play in reverse

    function mover(e:MouseEvent):void {
        stopPlayReverse(e.currentTarget as MovieClip);
        e.currentTarget.play();
    }
    
    function mout(e:MouseEvent):void {
        var mc:MovieClip = e.currentTarget as MovieClip; 
        if (mc !== null) {
         mc.addEventListener(Event.ENTER_FRAME, playReverse, false, 0, true);
        }
    }
    
    function playReverse(e:Event):void {
        var mc:MovieClip = e.currentTarget as MovieClip; 
    
        if (mc.currentFrame == 1) {
            stopPlayReverse(mc);
        } else {
            mc.prevFrame();
        }
    }
    
    function stopPlayReverse(mc:MovieClip):void {
      if ((mc!==null) && mc.hasEventListener(Event.ENTER_FRAME)) {
        mc.removeEventListener(Event.ENTER_FRAME, playReverse);
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is what i have right now Drawing an RSS feed into the php,
I have just tried to save a simple *.rtf file with some websites and
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.