PDA

View Full Version : Button with mc causing probs



mark_in_2k
January 23rd, 2004, 04:23 PM
I'm not too experienced with AS, so here we go...

OK, on the attached fla I have an "invisible" button (button with 0 alpha). I copied a script from the tutes section that will allow me to open a new window when the button is clicked (another rip from a forum question :esmirk: ).

This works OK, but I also have a MC below the button layer and this MC has some AS attached to it which basically makes it fade out to the image on the bottom layer.

It seems to me that the button script makes the MC script stop working because it's above the MC layer (I've switched the button layer below the MC layer and the fade out then works, but the button doesn't :hair: ).

How can I get both scripts working together? I know that MC's can't work like buttons, but is there a work around this?

TIA,

Mark

PS. Don't forget, I'm an AS n00b!

blah-de-blah
January 23rd, 2004, 10:38 PM
Well right now you have the invisible MC covering the bottom MC, so the rollover function won't work. So all you have to do is move the code from the invisble button into the bottom MC. Then delete the invisible button :)

mark_in_2k
January 26th, 2004, 08:54 AM
thanks for the reply, but that isn't working cos i'm using an invisible button, not an invisible mc.

i need to have a button in order to use the "on (release)" AS so that my new browser window will open.

can any1 help me out?

TIA

Mark

blah-de-blah
January 26th, 2004, 08:59 AM
No you don't need to have a button, movieclips work as well. I just tried it and it worked.

mark_in_2k
January 26th, 2004, 09:18 AM
thank you! it works (well, the javascript for the new browser window isn't bringing up the correct window, but that's another story!!). the book i'm reading says that you can't have (release) AS for mc'sI:-)

Thanks again for you help!

Mark

blah-de-blah
January 26th, 2004, 10:07 AM
You can, and the javascript thing only works when you're actually using it, so don't worry :)

mark_in_2k
January 26th, 2004, 10:11 AM
thanks...i got the javascript working now.

it was because i was testing it from flash. :ne: when i put it into a webpage it all worked great!