ActionScript 2.0 :: Make A Blank Button With A Transparent Hit Area?
Oct 17, 2007
I'm trying to make a button symbol with a transparent hit area - surounded but a dynamically drawn border. Heres what I have. I have a simple AS script that uses goTo and lineTo (plus a randomizer to make sure the buttons are skewed and differnt everytime) to create a "sketchy box" as my button. My script resides in a movie clip withing the "over" state of a button symbol. Now the active hit area is ONLY the line elements. Question : How in the world, using only actionscript an I make a second, transparent area inside of the sketchy lines to make the whole button symble clickable?
I am making flash with mouse over its not working properly, 1) When mouse over the button not come the transperant area to entire pic 2) How can transparent area slowely to come mouse out
public static function cloneDpObj(target:DisplayObject):Bitmap { var duplicate:Bitmap;
[code]....
to clone target displayObject (MovieClip or Sprite) and return Bitmap Object.
It can get bitmap from the target object, but it seem don't get all the area of the image.
By give the width and height of target object, but the target object in design was applied by Glow Effect, so my question can we get the all view of bitmapdata from a displayobject?
Is there a way to make the transparent area from an png image not to register when I add with a mouse event to that image? What is happening is the rectangle around the symbol is effected by the mouse event.
I would like to make a flash movie with a picture, where when the user holds down the mouse button, part of another picture will emerge in that general area (like a magnifying glass looking into another dimension).
Technically, my idea was to make a flash file with two images, and then code the mouse to be able to make the top picture transparent in a circle-like area around the cursor, while the mouse button is down.
But how to do that? I am using Flash CS4, but I don't really care if the solution is in AS2, or AS3, as long as it works
I need the first page to load blank (just a transparent background would do) but at the moment it's loading the first page of text. I want the text to appear when I hit the home button (named: mc.menuBtn1_btn). I'm having a little problem with the following code. I want the buttons to slide in on the x from left to right and then settle in position, with no text on screen. Then, when I hit the home button, the home page appears, followed by all the other buttons in the menu I decide to click.
I've made a mask with a FLVPlayback inside and with a sliding bar that appears when I make rollover in the FLVPlayback. All working well. I want to put some simple controls in the sliding bar like pause or play, but I can't access the buttons because they are inside a first button ( the FLVPlayback ) that triggers the sliding bar. How can I make to have a button inside another button area?
I imported a image file and made it into a button. So in flash8, is there any way to add an actionscript or anything to make the image transparent when I mouseover the button?
It seems simple enough, and I'm half way there ( I can get external movies to load ) however the transparent button is over my head ( read: I'm a complete noob ).[code]...
I've tried hardcoding a url into getURL as well but it doesnt' seem to be recognizing that there's even a button there.. is that because there's a new movie being loaded?
Of course, when the mouse rolls over the graphic, the button beneath it is not clickable.Without going into all the reasons why I can't incorporate the graphic into the button itself... is there a way in AS3 to programmatically make that graphic virtually "transparent" - so that it doesn't interfere with the button's rollover and hit states?
I'm trying to know if there's a way in ActionScript 3 to load a PNG image and make some sort of button or sensible area applicable only for the visible area of that PNG??Maybe there's a simple way to define a polygonal area on execution time, I mean, dynamically and make it sensible to mouse events??
How do I set an area to be transparent in ActionScript 3.0?At the moment I'm creating a subtitles area to sit over the player and it has the following code:[code]
On the opening of the map where it shows a transparent red spreading would you create the growing red transparent area over the map in the Pacific with transparent shape tween. Also any tutorials on doing this.
It uses drag-n-drop interactivity. When I drag a MC and drop it in a "drop-box", feedback pops up. When the mouse leaves the drop-box area, the feedback remains. Is there a way I can have the feedback go back to blank when my mouse leaves the drop-box area?
On the opening of the map where it shows a transparent red spreading would you create the growing red transparent area over the map in the Pacific with transparent shape tween. Also any tutorials on doing this.
I am importing some graphics on the fly, and want to be ableto drag them around the stage, which all works great. My issue isthat if I add a large element, like a border around the edge of thestage, this covers up all the other items so that clicking on themis not possible. I can see them, but when I click, the large itemgets the event, even though visually, it is transparent. There arethings I could do if I was doing all the development of thegraphics in the IDE, but these items load at runtime, so it has towork with bitmap
So I have a BitmapData object that's 400x400, and is mostly transparent with a small area (up to 50x50) of color somewhere inside. That's drawn to a bitmap, and now I somehow need to generate a Sprite that is only the dimensions of the small colored area, and sits in the same place on the screen.The size and position of the colored area is variable, and the operation to create the new Sprite must be near-instantaneous, so no lengthy pixel comparison exercises.
i have a drop down menu am working on and each button tab (although they are not button instances !) when clicked opens up the "drop down" section which you can mouse over to choose another specific button etc - if you mouse out of that drop down area then it pulls back up to the original tab state .. what do i change to the code below to decrease the area that you mouse out of to make the drop down area pull back .....at the moment it at least two inches on the screen below and to the right of boundaries of the drop down box before it pulls up - i want to it pull up as the mouse leaves the boundary box .... hope this makes sense .... there is some part of the actionscipt below that controls this but can work out which bit and how to change it !!! (am guessing the x mouse and y mouse bits - but how to change it ???)
I want to make a button, when clicked, open a blank email in outlook express to an email, with a subject.i take it you would use:[code] just wanted to show you what i meant! that was just a random stab.
i am loading a background bitmap into a sprite. after that i make this sprite draggable. now i would like to have a copy of this sprite where just the area with the non-transparent parts of the bitmap react to the click.
i know that i can determine if a pixel is transparent with the getPixel32() method, but it seems to be overkill to anylyze every pixel... or is it not?
I want to put a transparent area on my stage. When the mouse enters that area I want to be notified (so that I can do stuff).I expect to use some code like"addEventListener(MouseEvent.MOUSE_OVER, mouseInRemote);" - but the qustion is "What do I add to my stage?"
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.
I've got a text field pulling XML and its CSS. The XML has a few long lines of text it uses as links. The links are long enough to word-wrap in the text field. Now, if you were to select the text, it would only select the words. However, the blank area to the right of the wrapping link is still an active hotspot for the link somehow. I wouldn't consider this a problem if clicking the blank area didn't return the text field to the top (it is scrolling text). It gets very distracting and hard to track where you are in the text.
I have objects that the user can click&drag. They're PNGs, mainly rectangular, no problem till here.But I then had to put an L-shaped object (a PNG with a lot of transparency), so i've made a movieclip with an shape with the same L shape than the png, and use it as its hitArea:
This works PERFECT, the mouse events respond as expected, and I can click on objects that are below/above the transparent area of the png/object.All objects are inside a Sprite called playgroundLayer1. The issue comes when I take the L-shaped object and put it on another Sprite (playgroundLayer2), that is above the playgroundLayer1.I this case, I can click&drag on the L, but no object below the transparent area of the L receives mouse events.
I really need to make a transparent button, so it needs to just look like floating text but with button capabilities. But I was confused about a couple things: Initially I was using the "FPushButtonSymbol" but was unable to make it transparent, although I tried like this:
[Code]....
This left some shadow though So, I utlized a post from ezboard.com, which said to just make a square and then do Insert->Convert to Symbol and make it a button symbol. When I converted into a symbol, I also exported it for use with ActionScript. So I have been making instances of my new button (TermButt).... But can I still use generic button functionality like labeling, text fonts/colors, button size:
I have made it this far with much help and all was working well until the xml changed. Sometimes the c_Result node does not exist and my c_points text box returns 'undefined'. I have tried if(c_points != undefined){ etc which works to a degree but I don't know how to make the text box blank if the node doesn't exist and load the c_Result node if it does.
import mx.styles.CSSStyleDeclaration; _global.styles.TextArea = new CSSStyleDeclaration(); _global.styles.TextArea.setStyle("backgroundColor" , "transparent");[code].......
I've just finished working on an extensive HD intro for my website, which is in 1280x720 resolution.
At the moment, my site has a splash page with 3 buttons on it: B1) opens the site in fullscreen mode B2) opens the site in normal window mode B3) opens a new browser window linking to my intro
Here's the AS code I'm using for my intro button: Actionscript Code: intro_btn.onRelease = function() { getURL("[URL]", "_blank");};
I'm wondering if there is a way to somehow specify in that code segment what dimensions I'd like the new window to have? I know this can be accomplished in JavaScript with something like this: Actionscript Code: <a href="javascript:void(0)"onclick="window.open('[URL]','height=1280, width=720,scrollbars=no')">intro</a>
I've already tried putting the intro on it's own separate HTML page, but because of resolution and other background contrast issues, I've found that it undoubtedly looks best in a window that is resized to its specific dimensions, rather than having extra space around the edges, top, and bottom.