Solved

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

Posted on 2008-06-18
1
389 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
1 Comment
 
LVL 8

Accepted Solution

by:
section25 earned 500 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

705 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now