Solved

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

Posted on 2008-06-18
1
390 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SCCM 2012 - Deploy Flash 16 6,894
How to emebed .XML into  flash to make a self contained .SWF 1 174
Open Source MP4 Flash Player 2 169
Adobe Indesign CS6 4 96
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 …
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
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 how to record live broadcast.

919 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

14 Experts available now in Live!

Get 1:1 Help Now