No prob!
Okay, a rundown on parents, children, and siblings... lets build a sample hierarchy:
avatar_mc
\ trigger_mc
\ button1_mc
\ button2_mc
\ button3_mc
you could think of this in XML too...
<avatar>
<trigger />
<button1 />
<button2 />
<button3 />
</avatar>
It doesn't matter how you illustrate it; the concepts don't change... The trigger clip and the buttons are all nested inside the avatar clip, which means that they are all children of the avatar clip (or that the avatar is their parent). Then since the trigger and the buttons all share the same parent, they are known as siblings. It's exactly like a family tree except that biological processes weren't involved in creating it :D
In your problem scenario, all mouse events are stopping at the parent (avatar) because it is listening for a rollover. If it is made unresponsive to mouse events, then mouse events will propagate beyond it to it's children.
fatbuoy1- 12-06-2007
ok i understand the concept, so do I have to put that first bit of code into the 1st frame of the avatar movie or something, just to reinforce that they are all on the same level?
fatbuoy1- 12-06-2007
ok I think its becoming more and more obvious this is the first coding i've ever done in my life!
the .fla is at http://www.pigstylearts.co.uk/vernacular-web.fla
if that would help, im completely confused im afraid!
bigmac- 12-06-2007
send me a private message with your email address.
fatbuoy1- 12-06-2007
Ok... eh I think I fixed it, just not sure how! The menu movie had 2 frames, showing it closed and open. I had it so that when you rolled over the menu movie itself that made the movie go to the 2nd frame. Like you said Greg, that meant the movie was absorbing the mouse action. So i changed it so a it was a button inside frame 1 that moved it to frame 2, keeping it on the same level.
Im guessing thats what you meant all along? Thanks a lot, that one really had me snookered. :D
bigmac- 12-06-2007
I'm looking at it now. You'd implemented my actions scheme for the avatar, but not for the nested speech bubble. That was a second instance of the exact same scenario.
bigmac- 12-06-2007
so you got it working?
fatbuoy1- 12-06-2007
Think so, im now trying to get the menu to close when I roll out, so thats another couple of hours probably... :P
bigmac- 12-06-2007
Do the same exact thing you have been doing...
put a button on frame 1 of the word bubble (I generally just use a button with nothing but a hit area in it... it makes a perfect hit object). on the parent timeline, add:
hit_mc.onRollOver = function()
{
gotoAndStop(2);
}
then on frame 2 you need to be slightly trickier. Make a movieclip of a rectangle the size of the word balloon and place it behind everything. Mind you, it has to be a movieClip. You can't hitTest on button objects. Give it an alpha of 0. Then on frame 2 actions, put this:
// disable hand cursor so that this does not appear to be a button
boundingBox_mc.usehandCursor = false;
// attach a rollout action that will close the balloon
boundingBox_mc.onRollOut = function()
{
if (!this.hitTest(_root._xmouse, _root._ymouse, true)
{
gotoAndStop(2);
}
}
fatbuoy1- 12-06-2007
Thats great thanks Greg :D I think im starting to see how you could get to enjoy programming... making things happen does kinda give you a lift!
bigmac- 12-06-2007
yep. And you're just putter in frame actions right now... :D Flash ease and flexibility grows exponentially with AS knowledge. As you get better, you use the Flash timeline for less and less because it's so restrictive... heck, the LassieAS player runs in one blank keyframe.
fatbuoy1- 12-06-2007
Jeekers...
bigmac- 12-06-2007
BTW: cool flash piece. I like the interactive concept... nice execution too! Send me the final site URL when it's done.
fatbuoy1- 12-06-2007
Thanks, will do. I've just been working on the bare bones of getting it working so far (I've never used AS, or any other code, before so its taken me a while).Theres going to be a lot more to it. Besides the content itself i'm planning on having lots of little 'clickables'... like bottles sitting on the wall you can shoot off and stuff like that, just to make it more fun.
I kind of got inspired by this guys website, not sure what you would think of it but I just love it!
http://www.jonathanyuen.com
fatbuoy1- 12-06-2007
Ok, heres a new one. Is it possible to create a contact form in Flash?
Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.