Solved

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

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
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 select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
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.

734 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