?
Solved

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

Posted on 2008-06-18
1
Medium Priority
?
398 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
The goal of the tutorial is to teach the user how to how to record live broadcast.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

764 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