Skip to main content
Participating Frequently
June 29, 2008
Question

Using movie clips as buttons

  • June 29, 2008
  • 9 replies
  • 498 views
I dont ever use buttons because movie clips appear to do all of the same stuff with the same code.

so in my set up i have a "video" section that, when you "roll over" it expands and reveals some video thumbnails. i want it so when you click the video thumb that a page will open on the right side. i have all the "on release" code set up but it still wont work???? i think that the expanding window is all worried about waiting for the "roll out" to happen so the buttons cant be clicked.

how do i have it so that the movie clip does its roll in roll out stuff but dosent change your courser into the little hand and finger like its a button?

NOTE: the "korath" article has the same type of code as the thumbnails (except for the different target object)

oh and should i be using "relative" or "absolute" for the target object???


there is the example at

www.wafflecone.ca


i couldnt upload the full fla cuz its 15 MB!
This topic has been closed for replies.

9 replies

Participating Frequently
June 30, 2008
well if anyone else happends to look at it, dont just scroll down to video in the library thats not it.

its in the movie clip update_zone_mc.

June 30, 2008
I took a look... I don't see any clips inside the video movieClip. I drilled down to the bottom but didn't see them, so I must be misunderstanding. Anyway, I added a clip and tried to get the effect you want, and I can see it would take me some tweeky time that I don't have this evening, because I have a deadline and have to get something else done. Don't loose hope, there are smart folks on this forum that could straighten it out for you more quickly that I can. Anyone else?
Participating Frequently
June 29, 2008
uhmmm well this is all getting a little confusing.

i havent used this kind of code before and it hasent worked in the few places iv tried (I replaced the "movieclipname" text)

the best way is too look at the fla....heres a link


http://www.mediafire.com/?zlld2j0mxxj


i know that the movie clips can be confusing, im still learning on how to set everything up.

-double click on the "video" box on the left side

-move the timeline to 20

-"click the "video" box once

that is where i have been putting most of the code.

you can go further into the "video" box where there is more movie clips.

masking

than where the thumbnails are.



hope you can take a look at it.
June 29, 2008
Something like this:

this.onEnterFrame = function() {
if (movieClipName.buttonArea.hitTest(this._xmouse, this._ymouse, true)) {
movieClipName.useHandCursor=true;
} else {
movieClipName.useHandCursor=false;
}
};
June 29, 2008
by the way, in that case all your buttons should be movieClips, which you said you're comfortable working with anyway.
June 29, 2008
oh I see... :-D You may have to write some code that uses hitTest to check and see if the mouse is over one of you buttons, and if not, then use the hand cursor code to turn off the hand.
June 29, 2008
cool!
Participating Frequently
June 29, 2008
nice one that works good!

it makes the courser not come up for the expanding box, but, now the thumbnails inside of that movie clip box dont have a curser come up. so they cant work as buttons. do i use the same code somewhere but with "true" ?????
June 29, 2008
In your rollover function, put:
movieClipName.useHandCursor=false;