Jump to content


Photo

n00b can't make buttons work inside movie clip


  • Please log in to reply
6 replies to this topic

#1 töff

töff

    Young Padawan

  • Members
  • Pip
  • 4 posts

Posted 30 July 2007 - 09:59 AM

(Adobe Flash CS3, Actionscript 3.0)

I have a movie clip on the stage.
Inside the movie clip I have some buttons (and lots of non-interactive graphics).

When I am editing inside the movie clip, the buttons work with "Enable Simple Buttons" on. But when I go back to the parent scene, they don't work ... and of course they don't work in "Test Movie" either.

One more piece of info that might be important: The whole reason I put the buttons inside the movie clip is that I want to zoom & pan the whole movie clip dynamically (it's a map) with other buttons (which DO work!, on the root stage). But the map has some hotspots in it that I want to make interactive as buttons.

There must be a SIMPLE SOLUTION, but I've searched the web for hours, looked and looked, read about "trackAsMenu" and alpha=0 and visible=false, none of it seems to be what I need, but I just can't tell because I am a pretty green Flash newbie so I just have to ask. This must be a COMMON OCCURRENCE, to use buttons inside movie clips, eh?

Help please! t.i.a.

#2 töff

töff

    Young Padawan

  • Members
  • Pip
  • 4 posts

Posted 30 July 2007 - 10:41 AM

BTW ... I am assigning NO rollover, mouseover, click events or anything like that to my movie clip.

I just wants the buttons inside the movie clip to work as buttons, or at least be accessible to Actionscript 3.0 as buttons.

I don't want the movie clip itself to do anything when clicked or moused-over.

#3 curthard89

curthard89

    Young Padawan

  • Members
  • Pip
  • 226 posts

Posted 30 July 2007 - 11:25 AM

just do in actions

target.onRelease = function() {
button stuff here
}

#4 töff

töff

    Young Padawan

  • Members
  • Pip
  • 4 posts

Posted 30 July 2007 - 11:52 AM

just do in actions ... target.onRelease = function() { button stuff here }

The problem is, the buttons are not responding at all to the mouse. No rollover color, no hand cursor, nothing. It's not a matter of WHAT "button stuff" they will do ... it's a matter of making them respond as buttons in the first place.

#5 töff

töff

    Young Padawan

  • Members
  • Pip
  • 4 posts

Posted 30 July 2007 - 08:05 PM

I'm embarrassed to say, it was a simple layering problem.

This is what I get for biting off something moderately complex for my first Flash project.

Thanx & sorry!

#6 pangemedia

pangemedia

    Young Padawan

  • Members
  • Pip
  • 2 posts

Posted 05 May 2010 - 09:29 AM

Hi there,

I'm exactly with the same problem as you. I'm also doing a map using AS3, and the mouse controls pan movements. It all works fine, but I can't get the buttons (that will be hotspots) to work inside a movie clip (I also need to make the buttons work inside a movieclip). When I test scene, it all works fine, but the buttons don't work in "test movie" option.
The problem isn't any code in AS3, because my movie doesn't even recognize the buttons inside the movie clip.How did you solve this. I have a picture in layer 1 and I put a button on layer 2. You said this was a layer problem, and I tried to put the button on the same layer as the picture, and it still doesn't work.

What have you done to solve this?

#7 mithailebaiker

mithailebaiker

    Young Padawan

  • Members
  • Pip
  • 5 posts

Posted 09 July 2010 - 01:29 AM

No color rolling, no hand cursor, nothing. This is not a question of "button thing" they will do ... it is reacting to buttons as in the first place.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users