Solved

RollOver and Press question

Posted on 2006-11-03
6
184 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
  • 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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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 500 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
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 what frame rate is, how to control it and what effect it has on the video.

747 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

10 Experts available now in Live!

Get 1:1 Help Now