Making A MovieClip Button Hit Area
Hi
I know this has probably been asked before. But I can't find the answer by searching the forums.
How do I have a certain area of a movieclip, which I'm using as a button, NOT trigger the hit state.
Oh yeah.... and how does one get images in the library to be smoothed without right clicking and ticking "allow smoothing" FOR EVERY SINGLE IMAGE???
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 03-28-2007, 01:41 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
MovieClip Button Hit Area Question
Hey I have an easy question I have some movieclips that I am using as buttons after I defined the down,over and out states of my movieclips. But when I rollover the movieclip which is text it blinks of and on. So how do I define the hit area of the movieclip? thanks
Making A Movieclip Act Like A Button?
Hello Flashkit people,
So I have this movieclip, but I would like to do button things to it.. For instance, I would like to be able to detect: rollOver, rollOut, press, and release on the movieclip.
in the past, what I have done is put a button wrapper over the movieclip and that worked fine.
however, in this case, I can't do it because I am using "duplicateMovieClip" (which doesn't work with buttons, at least not that I know of) and I am also using "LoadMovie" (i am loading swfs into a movieclip target.. i don't think it can load them into a button target).
so in a way, I have to keep it a movieclip, and at the same time I want to be able to detect things like rollover and rollout and press and release.
how do I do this? any help is appreciated.
~jimmy.
Making A Movieclip Visible On Button Rollover
okay, i am sure there are otherposts about this, and I know this is probably a simple question, but for some reason i keep getting a syntax error. In short, i am trying to make a movieclip show up on rollover, then make the same movieclip invisible on rollout.
here are my steps:
1. initially I put a movieclip on the timiline and made it invisible with this code (this is on the movieclip i want to control with the button):
onClipEvent(load){
this._visible = false;
}
this makes the movieclip invisible intially
2. Then I made an invisible button and put the following code on it:
on(rollOver){
_root.mymovieclip._visible = true
}
on(rollOut,releaseOutside){
_root.mymovieclip._visible = false
3. For some reason, i keep getting a syntax error when I compile. Do I need to refer to the instance of the movieclip, or just the movieclip itself?
I know this is probably a simple question, but any help is greatly appreciated!
}
Making The Mouse Stay An Arrow When Rolling Over An Active Movieclip Or Button
I need to be able to put an active area on a graphic, but I don't want to have the mouse change to the hand, it needs to stay the arrow. This is for an educational application where I need the user to find a certain part of a graphic and click it, but if the mouse turns into the hand, it will give the answer away. Is there a way to do this. Thanks in advance.
Help With Making A MC Appear Randomly In An Area
hi,
i want to make it so my movie clip appears randomly in an area, i was using this code, but i dont want it to appear near the edges of the movie
Code:
xvaluevar = random(560);
_root.testtarget._x = xvaluevar;
any idea on how i can do it?
thanks
Making The Work Area Bigger ?
im working on my site now..
i have a massive load of text to put on one page (frame), but the work area is too small and when i am editing my fla, i cant see the text at the bottom
how do i fix this?
(im using flash mx 2004 pro)
Making A Hyperlink From XML In Text Area?
I've searched and searched but I can't seem to find any examples of importing XML and making active hyperlinks.
This is possible right?
any help is greatly appreciated!
Custom Scrollable Text Area - Help Making One
I am making a custom made scrollable text area in my flash app. I have custom graphics for the up and down arrows and a handle and slide track for the scroller. However, I am unaware of how to get this thing working in Flash exactly. Can anyone recommend a tut on this subject for me please? i would greatly appreciate the help. I am using Flash MX 2004 AS 2.0 if that helps
Thanks
Problem Making The Stage Fit The Viewable Area
I'm trying to fit a series of sprite in my7 flash application,
but when I say to start at [0,0] it actually starts at something like [40,40]. I'm not sure of the exact position, but the point is, I can't seem to get anything to position itself relative to the top left of the viewable area, it always starts some distance in.
Since my application works out scaling and positioning relative to the supposed top left of the viewable area (which I assumed to be [0,0], its causing me problems. This has been since I started setting stage height and width through setting stageheight and stagewidth, rather than hard coding it. I don't want to hard code width/height really, since that means I can't easily resize the app when required (in my case I might want it to be smaller).
Can anyone shed light on the cause of my problem?
Making Swfs Only React To The Mouse In A Certain Area
I'm making a site which is going to have various toy type things on it such as elastic lettering, things following the mouse etc.
These toys are going to be all inside individual banners which will be loaded externally from a collection of swfs.
I would normally just do this and put together the site in dreamweaver. however the client wants to have things such as a light which when switched puts the site into darkness and turns the cursor into a torch etc.
I don't know enough about html to do this so i was wondering how to keep the individual banners from only reacting to the mouse when they're inside the banner
Making Movie Clips Randomly Float Around A Set Area
hi
I want three or so movie clips to move randomly around inside a specified area - you don't have to worry about collision between the objects- ideally they would each be on different layers so that one can move in front of
another - the movement of the objects also need have a nice slow organicmovement - like blood cells - if you see what I mean - any idea?
PLEASE HELP
Area Drawn On A Movieclip
Hi
I've written some code which allows a user to draw on a mask, so you can progressively see what is behind it (it's a cleaning game - you clean the dust off and see a clearer picture behind)
I want to give them a score depending on how much they've cleaned, and I can't seem to find a way to do this.
Basically, I'd like to be able to determine over how much of the movieclip they've drawn.
Does anyone know of any way to do this, or have anything along these lines that I could adapt?
Thanks in advance for your help!
Christine
Movieclip Area Too Small
Hi,
I have about 200 buttons. Each button calls a user defined function upon rollover. I need to scroll through these buttons, so I put them in a movieclip....or at least I tried to, until I ran out of space. Everything works perfectly, except that it's incomplete. Please tell me what I should do now. If you can help, and you need more details, just let me know.
Thanks,
Debbie
[F8] Defining A Hit Area For A MovieClip
I Have A menu system which flashpipe1 helped me develop, whereby when one menu_mc is clicked it opens + shuts any other open menu_mc's. However, all content within the menu_mc is being taken by flash to be a hit area to make this action occur, so i cnt have any buttons/image gallerys/froms inside the menu_mc's
this is the current code:
Quote:
for (i=1; i<5; i++) {
this["menu"+i+"_mc"].onPress = function() {
if (this._currentframe == 1) {
goOut();
this.gotoAndPlay("in");
} else {
this.gotoAndPlay("out");
}
};
}
function goOut() {
for (i=1; i<5; i++) {
if (this["menu"+i+"_mc"]._currentframe != 1) {
this["menu"+i+"_mc"].gotoAndPlay("out");
}
}
}
http://board.flashkit.com/board/atta...chmentid=62722
^LINK TO FLASHPIPE1's sample FLA.
Exact Hit Area Of A MovieClip
Hi all,
I m new to this Group. This is my first Thread in this Forum. Well, here is my problem.
Consider there is Two movieClips ( Outer_mc, inner_mc);
"inner_mc" is inside "outer_mc". and "inner_mc" is having only one circle(width:100,Height:100). Fine.
Now if you trace the Width and height of "outer_mc" it will show exactly the width and height of the circle(100,100).
Now rotate the "inner_mc" about 40 degrees. Now trace the width and Height, it will show you(140.9,140.9). But Actually There is no change in hitArea. Well, I would like to Know the Hit area Width and height instead of the movieClip's width and height. After rotating how to get exact hitarea Width and height.
Get Masked Area Of Movieclip
A_mc masked by b_mc
is it posible to convert visible area of masked movieclip(A_mc) as bitmap
ActionScript Code:
import flash.display.MovieClip;
var A_mc:MovieClip=new MovieClip();
with (A_mc) {
graphics.beginFill(0xFF0000);
graphics.drawRect(0,0,300,100);
graphics.endFill();
x=100
y=100
}
addChild(A_mc);
var B_mc:MovieClip=new MovieClip();
with (B_mc) {
graphics.beginFill(0xFFFF00);
graphics.drawRect(0,0,300,100);
graphics.endFill();
x=120
y=120
}
addChild(B_mc);
Movieclip Is Off The Work Area
Somehow I have moved a movieclip off the work area and now I can't move it back so that I can work with it. I was hoping that someone would be able to let me know how I can move it back to the visible work area - Flash MX 2004.
Thanks for any help
Rod
Editing A Movieclip In Its Own Area.
When i use the library to edit a movieclip i cant move the screen very far to the right does anyone know if they changed this in the new flash (or is there a way to change this in 2004?). It's really annoying.
Keeping A MovieClip Within A Set Area?
I am having problems with a MovieClip, basically it can be moved arround with the mouse and it is resizeable but when i move it arround or enlarge the movieclip (when its in a published format) i want to constrain it to an area such as 400 width by 400 height.
Because at the moment you can drag or resize the movieclip ouside the whole frame, which i dont want. i want to constrain it to a set area.
is there a code in which i can make this possible.
thanks in advance
safa
Zoom To Area/MovieClip
Hi,
I have this "universe" with multiple "galaxies" as shown here:
http://www.avento.as/blaest/
I want to make it so that when the user clicks one galaxy, I zoom so the particular galaxy fills the stage.
I've been browsing the web for a nice solution. As far as I see, I should be using some kind of actionscript virtual camera - but I haven't really found a good example yet.
How would you guys solve this? The next thing that happens when user has zoomed to a galaxy is that I would allow the user to zoom to a "star" -- that is, one of the images in the galaxy.
-- nitech
Viewable MovieClip Area In Flash MX GUI
How do you make the viewable area of a movieClip larger within the Flash MX GUI?
I have some rather large movieClips and I am having a hell of a problem editing some of my movieClips just because the GUI only displays some of the movieClip. I am not talking about zooming out, as If I zoom all the way out, I get left with the movieClip with the grey area around it. Parts of the movieClip are hidden behind the grey area.
The only way I've figured to get round this is to dril down the hierarchy, editing from the root movie.
Anyone?
How Do I Get A Movieclip To React To The Mouse Within A Certain Area?
Hi, I would like to have a movieclip follow the mouse, but only when the cursor comes within a certain radius of the movieclip, and when it does it will follow it, but when it leaves the radius the movieclip will bounce back to it's original position.
If anyone can help that would be great.
Constrain MovieClip To Irregular Area
Hello!
I am looking to constrain a draggable movieclip within a non-rectangular (pie shaped) area... using AS3. I can drag out the old trig books, but thought some Flash whiz may have a shortcut approach to get me started. Any ideas? Thanks.
How To Limit The Movieclip's Movement Area
Hello, friends. I have two movie clips. one is smaller and supposed to be moved within the larger one. And the movement is controled by four buttons for up,down, left and right on the flashpage. Does any one have idea how to make it? Thanks a lot in advance!
Limit A Region Area Where A MovieClip Is Visible
Ok...here we go!! That's the question: I have a movieclip (an image) inside another movieClip (it's a simple rectangular frame that delimit the image area).
This is inside a main movieClip (the Main one). i'm trying to do that: i want that my "draggable" image is visible only inside the frame area. if it's moved outside (completely or partially) it's become not visible, but only that partial area of the image that's outside the frame. I'm trying to do a Mask zone. It's possible to do this?
Thanks
Paolo
Help In Dynamically Creating A Transparent Area On A Movieclip
I have a .jpg graphic in a movieclip on layer two (1024/768). This is used as a background.
I have a .jpg scrolling movieclip on layer one. It is a very wide graphic used for displaying a panorama.
I would like to be able to create, dynamically using actionscript, a transparent area on the layer two movieclip (create a window) to view the underlying movieclip.
I believe this is possible using the Rectangle class in the flash.geom.rectangle but I can't figure out how to attach it to the layer two movieclip or how to make it transparent so shows the underlying scrolling graphic.
If someone can help, I would sure appreciate it. I am a beginner in Flash and trying to learn.
Rollover Button To Be Triggered By Area Smaller Than Button
I'm pretty new at Flash. I am creating a flash file to insert into a PowerPoint, since PP has no way to really use mouseovers. This is my first project, but I'm going to want to do a lot with this technique in the future.
I have an image of the toolbar of our software and images (transparent pngs) of the tooltips with arrows that will point to the icon.
I can make a roll-over button that only appears when the user rolls over the icon, but the tooltip text is wider than the icon that triggers it, so the buttons I'm creating overlap.
So I want the area that triggers the roll-over effect to be smaller than the button. Or is there a better way to accomplish this task?
Thanks for any advice!
Rollover Button To Be Triggered By Area Smaller Than Button
Newbie. Trying to simulate tool tips on roll-over toolbar
I'm pretty new at Flash. I am creating a flash file to insert into a PowerPoint, since PP has no way to really use mouseovers. This is my first project, but I'm going to want to do a lot with this technique in the future.
I have an image of the toolbar of our software and images (transparent pngs) of the tooltips with arrows that will point to the icon.
I can make a roll-over button that only appears when the user rolls over the icon, but the tooltip text is wider than the icon that triggers it, so the buttons I'm creating overlap.
So I want the area that triggers the roll-over effect to be smaller than the button. Or is there a better way to accomplish this task?
Thanks for any advice!
Hit Area On Button. Help
I have a graphic that is a transparent gif. I have created it into a button. Problem is that when I edit the button, the hit area becomes the whole graphic white space and all and not just the graphic. I have tried defining the hit area by drawing a rectangle for the required area, but it disappears and the whole thing is selected. The hit area then overlaps into other buttons.
I want to keep the transparent gif becuase it is a leaf and there will be several of them and I want to see the background. I do not want to do trace bitmap option becuase I do not like the effect it makes.
Any suggestions? Will be mighty appreciated.
Tazmania
Button Over Area
I have made a navigation menu where all my buttons have the same rollover area. Each button has a different text when rolled over with the mouse. When I move the curser over the "rollover" shared viewing area of the buttons (not over any of the buttons themselves) I see the text I intended the viewer only to see when actually rolling over the button. How can I stop this from happening?
Button Area... ?
Hi
http://shanks.*****nut.net <-- observe the spinning cubes
These were made in 3dsm, and then rendered as a flash file
I want each cube to act as a button... but, this poses a problem :/
They are not individual objects in the .fla file, as they had to be grouped for the rotation animation to work...
is there a way i could either select them by colors, and turn them into buttons, or to create a map over the top which rotates with them, and acts like a button.. --> an invisible layer which is actually the button which sits ontop of the cubes...
any advice / help, i greatly appreciate.
Shanks
Button Area
Hi all, again,
I have made some buttons with movie clips on the down state; however this makes the buttons initial selectable area huge and far from slick. Im sure there must be an easy way to combat this, but unfortunatley I dont know what it is.
So any Ideas?
Jasinio
ps, I do know some stuff about this program honest (Catbert)
Button Hit Area
Hi... I'm brand new to Flash and using MX. When making simple buttons like a square box with some text in it. I have troubles with the hit area. It seems that sometimes the text area will be above the hit area. So when I assign the hit area in the button properties. The mouse will only react to the button where the hit area is larger than the text. What am I doing wrong?
Thanks
Button Hit Area
Hello,
I have a problem with the button hit area. The problem is when I move my mouse over the picture, the button starts blinking. I really don't know why this is happening, because I selected a large hit area. I will include the .fla. Can somebody see what the problem is?
Thanks!
MC Button Hit Area HELP
Hi, im using a movie clip as a button, how do iset the hit area?
this.onRelease = function (){
bla bla
}
thanks
Button Hit Area
Probably a dumb question but here it goes:
I have created some text (homepage) and made it a button symbol. In button edit mode i have changed the color of the text for OVER and DOWN and then drawn a large black rectangle in the hit area. The odd thing is when I'm testing the movie, it works correctly when the mouse pointer is over the rectangle area i drew EXCEPT when the pointer is directly over the text, then i lose the over formatting. I have tried to leave the text in the hit area and also removed it, same symptons occur both ways.
Any help appreciated (I'm using Flash 6 mx)
Rob
Button Hit Area - HELP
Hi,
I'm working on a very simple flash animation with two buttons. However, when I define the Hit area for each button, when I test the movie, the Hit areas are either off to the side of where I need them, or don't seem to be there at all.
I've done several Flash animations using buttons before this, but this is the first time I've had this sort of problem in quite a while.
Does anyone know what could be going on here?
Thanks!
Button HIT Area
I created a button from a graphic and placed it on stage.
In the 4 frame attributes of the button - up over down hit - I placed in the hit another image that will show onMouseOver
This image shows, but, the hit area had to be expanded beyond the button itself.
That is, the hit area is above and below the button. It's like the button is on TOP of the actual hit area and mouse over the button, you get nothing.
But, since I expanced the hit area, mouse over above or below the button, the image shows.
Anyone have any suggestions on how to fix this so the button is the hit area and not the area behind it?
Hope I described this well enough.
Button Hit Area...
Hey all!
I know you can increase a buttons (text button that is..) hit area by adding a white vector box behind it. but, i am going to impliment a menu thingy that shows which menu item was selected, smiliar to the one that i quickly made.
If you looked at the example when i add a white hit area on the button it prevents the rectangle object from being seen. is there any other way to increase a buttons hit area? Actionscript maybe?
thanks!
P.S.
The menu items that have a mask are 1 and 3.
also, the rectangle thing may stop short of its destination some times.
Hit Area Of Button
how can i enlarge the hit area of a button when i'm over it?
i tried creating a movieclip ("mc") containing two frames;
one frame ("normal") with a button including a small hit area, and one with a button containing a larger hit area (framename="over").
when i roll over the movie clip it sucessfully changes to frame "over" with the large hit area button (from root i tell "mc" to cange to frame "over"), but in fact only up,over and down state frames are taken from the new button. the hit area is still the small one from the first frame.
basically the thing i want to achieve is, that one rolls over the button, but will have to move his mouse farer away from the overstate graphic of the button, to release it. so optically the same button, but with a larger hitarea than the one you entered when rolling over the button in the first place, so one cant accidentally get off of it too early.
thanks for your ideas,
dual
Button Hit Area...
Hey all!
I know you can increase a buttons (text button that is..) hit area by adding a white vector box behind it. but, i am going to impliment a menu thingy that shows which menu item was selected, smiliar to the one that i quickly made.
If you looked at the example when i add a white hit area on the button it prevents the rectangle object from being seen. is there any other way to increase a buttons hit area? Actionscript maybe?
thanks!
P.S.
The menu items that have a mask are 1 and 3.
also, the rectangle thing may stop short of its destination some times.
Hit Area Of Button
how can i enlarge the hit area of a button when i'm over it?
i tried creating a movieclip ("mc") containing two frames;
one frame ("normal") with a button including a small hit area, and one with a button containing a larger hit area (framename="over").
when i roll over the movie clip it sucessfully changes to frame "over" with the large hit area button (from root i tell "mc" to cange to frame "over"), but in fact only up,over and down state frames are taken from the new button. the hit area is still the small one from the first frame.
basically the thing i want to achieve is, that one rolls over the button, but will have to move his mouse farer away from the overstate graphic of the button, to release it. so optically the same button, but with a larger hitarea than the one you entered when rolling over the button in the first place, so one cant accidentally get off of it too early.
thanks for your ideas,
dual
[MX,05] Tell A Button To Go To A Certain Area On A Pg
Is there a way I can tell a button to go to a certain area on a web page? I am trying to mimic a web page that has a list of lets say questions and each question has a long answer about a paragraph. I want a list of the questions at the top to act like individual buttons that on release will direct me to its question and answer that are below instead of scrolling all the way down and trying to find the question. I want to be able to do this inside a dynamic text field is this possible?
Thanks in advance
Button Hit Area
Hello,
I have a flash movie that is 750x744. So basically the page has to scroll. Well when it scrolls my button hit area or hotspot seems to move in Firefox and older IE browsers. Is there any way to fix the movement problem?
Any help would be greatly appreciated
Thank you in advance
|