?
Solved

How to add hotspot buttons within a draggable movieclip?

Posted on 2010-09-16
6
Medium Priority
?
340 Views
Last Modified: 2012-05-10
How is this done (link below)? I've been able to create a draggable 3D object in flash but I can't seem to add a hotspot within the main movieclip because the parent object is blocking the button.

It's done here and I really like the way it works:

http://www.expeditiontitanic.com/#/explore/deeper-look/spin/rov

Any ideas?
0
Comment
Question by:pixystk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 5

Expert Comment

by:bupper
ID: 33697872
Have one parent movieclip. Within it, have child1 (which registers the dragging code and contains the image, background, etc.) and another child2 (which contains the buttons). When the user clicks and drags child1, it should not drag child1, but rather the parent - in effect, dragging both child1 and child2. You can specify rotation, scale, position, etc. on the parent.

Make sure child2, the buttons, is above child1!
0
 

Author Comment

by:pixystk
ID: 33729548
Thanks bupper, I have the movie working inside the contaner movieclip. So you're saying to add the buttons to a separate movieclip?

but if i need to only show the hotspot on a select few frames while it's being dragged. do i add the button/movieclip inside child1???

confused.
0
 
LVL 5

Expert Comment

by:bupper
ID: 33729650
Yes - child1 and child2 should both be separate MovieClips.

Put the object (pictures, background, etc.) in child1.

Put the buttons in child2.

When you drag, just drag the container clip, and _not_ child1. For example, add the following code to child1, in the first frame (any layer):
[Using AS2]
this.onPress = function () {
    startDrag(_parent, .................); // ADD THE REST OF THE PARAMETERS
}

Why do you ever need to "show" the hotspots? A Hotspot is just the area someone can click on a button. So if you have text, but you want a larger area to be "clickable", then you make a rectangle in Frame 4 in the button on the stage.
0
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 

Author Comment

by:pixystk
ID: 33730410
sorry for the confusion... what i mean by hotspots are the actual buttons. In some of the 3D VR applications that's how they refer to the buttons. These buttons correspond to a series of frames in the rotation... the button is tweened to follow a specific point. (button_mc)

I'm posting my flie so you have a look...(teapot.txt -- .fla named as .txt)I want the buttons(movieclips) to load a movieclip to the stage when you mouseover it and disappear when you mouseout.


teapot.txt
0
 
LVL 5

Accepted Solution

by:
bupper earned 2000 total points
ID: 33730605
Ok, I took a look at the file and fixed it for you. I attached the fixed version as you did -- .fla named .txt.

What did I all do? Take a look yourself -- I nested the clips, somewhat how I described previously; I also fixed some of your code so the popup would appear (the name was wrong), etc.

Hope this works for you! :)
teapot-fixed.txt
0
 

Author Closing Comment

by:pixystk
ID: 33736705
yes! perfect!!
Thank you so much!!!

I modified this a bit to change to a rollover/rollout, but it works and i'm very very very happy!
0

Featured Post

RHCE - Red Hat OpenStack Prep Course

This course will provide in-depth training so that students who currently hold the EX200 & EX210 certifications can sit for the EX310 exam. Students will learn how to deploy & manage a full Red Hat environment with Ceph block storage, & integrate Ceph into other OpenStack service

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

765 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