?
Solved

RollOver and Press question

Posted on 2006-11-03
6
Medium Priority
?
237 Views
Last Modified: 2010-04-03
Hi, Experts

I have a code that onPress is not working. I use RollOver once and it disable the button to function. I wonder if are there any way to make onPress work. Thanks

Please download the fla file at http://www.4shared.com/file/5385673/2a2f6212/rolloverqs.html
0
Comment
Question by:mingchih
[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
  • 3
  • 2
6 Comments
 
LVL 7

Expert Comment

by:muxxter
ID: 17870340
What are you assigning the onPress event to?

Cause I tried it out, and it works fine for me.

I did notice, however, that you set the onPress event for work_list.jew on every enterFrame event. I'd move this out of that event, cause it's getting replaced every 12th of a second.

Cheers
Gav
0
 

Author Comment

by:mingchih
ID: 17870355
ohhh
0
 
LVL 7

Expert Comment

by:muxxter
ID: 17870372
Is that what the problem was?
0
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!

 

Author Comment

by:mingchih
ID: 17870376
mm, i moved the onPress to out side the onEnterFrame, but there is no trace shows up
0
 
LVL 16

Expert Comment

by:ellandrd
ID: 17872989
here is an example:

http://www.myjavaserver.com/~seandelaney/rollOverBtnPressExample.zip

Download this and see how i have done it....

Ellandrd
0
 
LVL 7

Accepted Solution

by:
muxxter earned 1500 total points
ID: 17881939
Ok, under further inspection, here's what's going on:

You're assigning a "onRollOver" event to the parent movie clip, "work_list". As soon as you do something like that, all the components within the movieClip never recieve any other events, they are ALL sent to the parent.

As soon as I commented out the "this.onRollOver" and "this.onRollOut" event functions, everything worked as it should.

If you'd really like the functionality of rolling over the entire movie clip, add a new layer (underneath any buttons you're using), and place an invisible (_alpha = 0) movieClip that covers all the area you want to rollOver/Out. You'll also have to add onRollOver/Out events to any buttons on top of it, cause it will count as a RollOut event (for the main movieClip) when your mouse goes over a button.

Cheers,
Gav
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
Suggested Courses

771 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