Reply LinkBack Thread Tools Search this Thread
Old 04-04-2007, 11:50   #1 (permalink)
stealthcow
knocking heads
 
stealthcow's Avatar
 
Join Date: Jul 2003
Location: London, UK
Posts: 1,914
actionscript - onrollover causing movieclips to act like buttons

I need to have an onrollover/onrollout function on a movieclip. Unfortunately, adding these functions causes the movieclip to act like a button. This means that I can't click any of the links contained within the movie clip because the onrollover creates a "force field" over the top of the movie clip. Is there a way to disable this "feature"?

[edit]
You can see the problem here

(mouse over indonesia, and then look at the popup, the links are noticing the hover status for the CSS but i cant click on them)
[/edit]

Last edited by stealthcow : 05-04-2007 at 07:15.
  Reply With Quote
Old 05-04-2007, 05:05   #2 (permalink)
stealthcow
knocking heads
 
stealthcow's Avatar
 
Join Date: Jul 2003
Location: London, UK
Posts: 1,914
come on people!
  Reply With Quote
Old 05-04-2007, 07:00   #3 (permalink)
Scott
sanddancer
 
Scott's Avatar
 
Join Date: Feb 2004
Location: South Shields
Posts: 2,924
Send a message via MSN to Scott
just disable it after the rollover.



_root.theButton.enabled = false;
__________________
  Reply With Quote
Old 05-04-2007, 07:15   #4 (permalink)
stealthcow
knocking heads
 
stealthcow's Avatar
 
Join Date: Jul 2003
Location: London, UK
Posts: 1,914
already thought of that, doesnt work...

plus, its not a button, its a movie clip, thats the whole problem
  Reply With Quote
Old 05-04-2007, 07:18   #5 (permalink)
Scott
sanddancer
 
Scott's Avatar
 
Join Date: Feb 2004
Location: South Shields
Posts: 2,924
Send a message via MSN to Scott
Should still be able to disable it, hmmm - I never tried it out mind.
__________________
  Reply With Quote
Old 05-04-2007, 07:36   #6 (permalink)
stealthcow
knocking heads
 
stealthcow's Avatar
 
Join Date: Jul 2003
Location: London, UK
Posts: 1,914
cheers for the suggestion tho
  Reply With Quote
Old 05-04-2007, 10:52   #7 (permalink)
John Good
+
 
John Good's Avatar
 
Join Date: May 2005
Location: Tropical Networks
Posts: 1,584
wow, your flash must be a hell.

inside the movie clip, below al contained elements, place a transparent button.

yourClip.transparentButton.onRollover = function(){...};
yourClip.InsideItemButton.onRelease = function(){...};

no probl.
__________________
Fonts are like cologne: A bad choice speaks louder than a good one. Justin Feinstein
  Reply With Quote
Old 05-04-2007, 20:34   #8 (permalink)
i3lance
Read between da lines!
 
i3lance's Avatar
 
Join Date: Apr 2005
Location: UK, former Londoner
Posts: 844
Send a message via MSN to i3lance Send a message via Skype™ to i3lance
Mate use the

onClipEvent (rollover) {} function. You can attach this to movieclips and get them to act like buttons. Then put your parameters within the wavey brackets. Gets round the transparent button lark (even though that works too).

I've done it on a client site for my 9 - 5 job. Let me know if you want to see an example. Better yet, Actionscript.org Macromedia Flash Resources and Tutorials. Check it out.
__________________
  Reply With Quote
Old 06-04-2007, 00:18   #9 (permalink)
John Good
+
 
John Good's Avatar
 
Join Date: May 2005
Location: Tropical Networks
Posts: 1,584
using clip events is just totally wrong. (just like table coding ;-))
but do what you please, both will work.

btw : actionscript.org is one of the best online resources for crap codes
__________________
Fonts are like cologne: A bad choice speaks louder than a good one. Justin Feinstein
  Reply With Quote
Old 06-04-2007, 11:33   #10 (permalink)
i3lance
Read between da lines!
 
i3lance's Avatar
 
Join Date: Apr 2005
Location: UK, former Londoner
Posts: 844
Send a message via MSN to i3lance Send a message via Skype™ to i3lance
Quote:
Originally Posted by John Good
using clip events is just totally wrong. (just like table coding ;-))
but do what you please, both will work.

btw : actionscript.org is one of the best online resources for crap codes

Not if you create them as function then, and refer to it generically.

What source would you reccommend JG?
__________________
  Reply With Quote
Old 06-04-2007, 12:25   #11 (permalink)
John Good
+
 
John Good's Avatar
 
Join Date: May 2005
Location: Tropical Networks
Posts: 1,584
generic function is also a nonsense.

I would recommend to code by hand every single line.
people who share share their crap.

maybe I would not trash everything on layer51. I've been there once or twice, nothing usefull as is but some good ideas.
__________________
Fonts are like cologne: A bad choice speaks louder than a good one. Justin Feinstein
  Reply With Quote
Old 06-04-2007, 14:21   #12 (permalink)
i3lance
Read between da lines!
 
i3lance's Avatar
 
Join Date: Apr 2005
Location: UK, former Londoner
Posts: 844
Send a message via MSN to i3lance Send a message via Skype™ to i3lance
Yes why not make it easy on him eh?

I must admit I like to hand code my own stuff but seeing other examples as a base for your own (where to begin) sometimes helps.
__________________
  Reply With Quote
Old 10-04-2007, 11:19   #13 (permalink)
stealthcow
knocking heads
 
stealthcow's Avatar
 
Join Date: Jul 2003
Location: London, UK
Posts: 1,914
johngood, that wont work, if i put a transparent button behind the html input area then as soon as i mouseover the input area i'm mousing out of the transparent button, if i put the button on top, then i wont be able to click the text

stupid fucking flash
  Reply With Quote
Old 10-04-2007, 11:25   #14 (permalink)
stealthcow
knocking heads
 
stealthcow's Avatar
 
Join Date: Jul 2003
Location: London, UK
Posts: 1,914
source file

you can download the source file from http://www.kdwebserver.co.uk/~serica...rc/fla/map.fla if that helps!
  Reply With Quote
Old 11-04-2007, 04:57   #15 (permalink)
stickmus
hmmm...
 
stickmus's Avatar
 
Join Date: Jan 2004
Location: Yorkuk
Posts: 2,127
Am I missing something? Where do you tell it what your links are supposed to do?
__________________
George Smith - a vain attempt to get higher on google for my name

  Reply With Quote
Old 11-04-2007, 05:05   #16 (permalink)
stealthcow
knocking heads
 
stealthcow's Avatar
 
Join Date: Jul 2003
Location: London, UK
Posts: 1,914
its html.... (at the moment its hardcoded in the last frame of the popupTop movie clip for testing purposes)
  Reply With Quote
Old 11-04-2007, 05:24   #17 (permalink)
John Good
+
 
John Good's Avatar
 
Join Date: May 2005
Location: Tropical Networks
Posts: 1,584
Quote:
Originally Posted by stealthcow
johngood, that wont work, if i put a transparent button behind the html input area then as soon as i mouseover the input area i'm mousing out of the transparent button, if i put the button on top, then i wont be able to click the text

stupid fucking flash

you have to call the event for the bottom element when the upper element is rollovered

stupid fucking you !
__________________
Fonts are like cologne: A bad choice speaks louder than a good one. Justin Feinstein
  Reply With Quote
Old 11-04-2007, 05:29   #18 (permalink)
stealthcow
knocking heads
 
stealthcow's Avatar
 
Join Date: Jul 2003
Location: London, UK
Posts: 1,914
how can i put a rollover instance on a textarea?
  Reply With Quote
Old 11-04-2007, 05:35   #19 (permalink)
John Good
+
 
John Good's Avatar
 
Join Date: May 2005
Location: Tropical Networks
Posts: 1,584
it's possible, but it's a pain.

wow, I'm looking at your fla.
looking like the whole thing is to move to trash...

give me a minute.
__________________
Fonts are like cologne: A bad choice speaks louder than a good one. Justin Feinstein
  Reply With Quote
Old 11-04-2007, 05:41   #20 (permalink)
John Good
+
 
John Good's Avatar
 
Join Date: May 2005
Location: Tropical Networks
Posts: 1,584
#1
why dont you put your texts in movieclips, with a getURL when it's released ?

#2
don't use on(rollover), use instead : yourLevel.yourMovieClip.onRollover = function(){}
you'll have a better control.

#3
dont use the var for the text. use instead : yourLevel.yourTextField.text = yourText;
(edit : obviously htmlText if you specified html in the field...)
__________________
Fonts are like cologne: A bad choice speaks louder than a good one. Justin Feinstein
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8