?
Solved

Stop move clip instance but still allow child clips and buttons to work

Posted on 2008-06-18
1
Medium Priority
?
400 Views
Last Modified: 2012-05-05
I am developing an animated movie in flash and am running into a hurdle that I do not know how to solve.

I have a movie clip instance composed of a series of button moving along a path.  The desired operation is as follows:
- On rollOver, scrolling buttons stop travelling along path and _alpha is changed to 100
- Button that is rolled over changes to Over state, changing what is displayed
- If user moves to another visible button, it's state is changed to Over while the latter buttons state is returned to Up
- On rollOut, scrolling buttons movie clip plays, and _alpha is changed to 50

The buttons are animated in a movie clip named Scroller.  I have added the following Actions to Scroller:
on (rollOver) {
      _root.scroller.stop();
      _root.scroller._alpha = 100;
}
on (rollOut) {
      _root.scroller.play();
      _root.scroller._alpha = 50;
}

What happens:
On roll over, the clip's _alpha is changed to 100, and the clip stops playing, HOWEVER, by stopping the clip, it also seems to stop all the child button instances from playing as well, ie. changing from Up to Over state.

Or atleast that's what I thought at first.  When I removed the _root.scroller.stop() and _root.scroller.play() the clip no longer stops on rollover, but the buttons over state still does not work.

When I remove all Actions, the clip nolonger stops, nor alphas up, but suddenly I can achieve the overstate on the contained buttons (a half victory I guess, but useless since the user cannot read moving text).

Help please!
0
Comment
Question by:Ev001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 8

Accepted Solution

by:
section25 earned 2000 total points
ID: 21817126
By adding actions to the Scroller clip itself, you have inadvertantly placed a button within a button. You can't do that. You can't have rollover actions on both the button and the clip that the button is in, because only one can be detected.

What you need to do, is simply take the on(rollover) actions off of the scroller clip and place them in the button's actions instead.

So  on the button, you would have
on(rollover) {
   _root.scroller.stop();
  _root.scroller._alpha = 100;
 ... and whatever else you want the button to do here
}

but you need the button to control the parent (scroller) movie clip.

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question