Flex - Build Efficient Button Skins With Larger Hitareas Than Visible Area?

Aug 3, 2011

What I'm trying to do: build a super simple button skin (say a small circle when in up state, slightly larger circle when in over / down states) that has a larger mouse hit area than visible area. In other words, I'd like the button to look like a 5x5 circle when in up state, but transition to over state when the mouse is in a 15x15 pixel area around such circle - in order to make clicking on the button easier.

What I've done in the past is to use a transparent ellipse behind the the visible ellipse. This works nicely but seems like a waste of memory (not much, although if you start having a lot of these buttons it adds up) and rendering cycles (transparency). I thought I could avoid this by wrapping the ellipse in a group with a given size and listen to its mouse events, but somehow no mouse events seem to fire on such a group - not sure why.

I guess I'd love to know if anyone knows an efficient way to do this. Also would love to know why such a group won't fire mouse events, but I guess that's secondary. Simple code snippet below:

[Code]...

View 1 Replies


Similar Posts:


Flex :: Layout: Can Width Be 100% Of The *visible* Area Of A Larger Container?

Nov 30, 2010

I've got the following situation, where I have an outer Vbox that is set at a fixed width, and then inside it there is a header made from an HBox and a content area (Canvas) that is much wider than the enclosing VBox (and therefore requires scrollbars on the outer VBox to see it all).

I would like to set the width of the header to fill the entire width of the outer container, but only the visible part, and to remain fixed so that when I scroll to view the content, the header doesn't move.

[Code]...

View 3 Replies

Actionscript 3 :: Make Flash Button Of PNG Visible Area?

Oct 15, 2010

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??

View 4 Replies

Flex :: Getting The Global Coordinates Of The Visible Area Of A Component?

Oct 19, 2010

I am trying to determine the global coordinates of the visible rectangle that is currently rendered on the stage.

Specifically, if a canvas has an explicit height and width and is a child of a panel that has a scrollbar, the scrollbar can "hide" a part of the canvas. ContentToGlobal(x,y) provides the global position of the content at the time, but content coordinates can scroll off the boundaries of the parent panel and continue to give x,y coordinates that are not visible.

Is there a way to determine the viewable rectangle that is not hidden by anything?

View 2 Replies

Flash :: Determining Visible Area/invisible Area Of A Masked Object?

Sep 29, 2011

I have a movie clip named circle_mc(see the image on the link below) and a mask object(movie clip) which determines visible area of the circle. User can change the portion which is visible (extend the red area and make it red+blue, gray area is invisible). I need to find proportion of visible area to invisible area (red+blue/gray) so that I can calculate angle.

View 1 Replies

Flex :: Button Skins Return To Default?

Aug 20, 2011

I have a problem which involves skinned buttons returning to their default skins after certain actions occur in my application. Below I have included a partial screenshot where you can observe the problem.The left button is returned to its default skin after it was clicked (the click triggers a state transition). The right button is the default skinned button. Note that my mouse is neither over nor pressing the left button.The code for the Button Skin is as follows:

<?xml version="1.0" encoding="utf-8"?>
<fx:Metadata>
<![CDATA[ [code]......

View 1 Replies

Flex :: Skinning - Use StyleManager.setStyleDeclaration To Set Button Skins?

Feb 9, 2010

I am trying to load an swf file which has button skins as images (In the library of the swf file i have given export properties which is 'TickMark') and set the skin of a flex button using StyleManager.setStyleDeclaration.I am getting errors like 'Argument count mismatch on TickMark(). Expected 2, got 0.'This is what i am trying to do:

private function init():void
{
loader = new Loader();[code].....

If I use the class GraphicClass in setStyleDeclaration, it works... but basically I want it dynamically.Or there are other easy methods to skin (image) a flex button dynamically?

View 2 Replies

Flex :: 4 - Move All TitleWindows Instances Within The Visible Area After Application Change It's Width / Height?

Jun 8, 2011

Is there a nice and not much processor consuming way to move all TitleWindow instances within the application visible area when the application been scaled - change it's width or height ?

View 1 Replies

ActionScript 3.0 :: Makes Button Visible...but Button Stays Visible If They Seek Back In Video?

Mar 30, 2011

when the video reaches 1 minute, a button appears. is there a way to hide the button again if the user uses the seek bar to go back to the 30 second (or any time before 1 minute) point?

View 2 Replies

Flex :: Build Tooltip For Fxg Button

Feb 10, 2011

I have a nice looking fxg button, to which I want to attach a tooltip- how do I achieve that without much hassle? (the spark button does this out-of-box, but is not very visually pleasing)The examples I have seen on search is reverse- using fxg effects in the tooltip.

View 1 Replies

ActionScript 2.0 :: [Flash8] Use Many Copies Of One Instance To Build The Visible Part Of Maze?

Aug 1, 2006

I am writing a maze program for school. I am using a 2d array to represent to location of walls for the maze. The background (for figuring out where a player can move) is not the problem.I am using this algorithm for places the images...

for (i = 0; i < 22; i++) {for (j = 0; j < 16; j++) {if (maze[i][j] == 1) {instanceName = "wall" add i add j; //for multiple names for each instance
duplicateMovieClip("wall", newname = "instanceName", 1);
setProperty("instanceName", _x, (25*i+13));

[code]....

What needs to be done to use many copies of one instance to build the visible part of my maze? I want to be able to have all pieces anmed "wall" instead of "wall1", "wall2", etc...which isn't working anyway.

View 5 Replies

ActionScript 3.0 :: Height / Width Of Bounding Box Of Visible Area?

Jun 23, 2008

In many cases the pieces have artifacts outside of their visible area. For example, a piece can have a picture of a dog's face, but one of the long ears is off to the side, outside the visible region of the piece. The path data is extremely detailed, so our designers didn't crop it off. They used a mask (at least I think it's a mask, I'm not a graphics guy and know little about that stuff) and this makes it invisible in Flash, when we turn them into movie clips. Also, in Flash when I look at the width and height of the piece, it does reflect only the visible area.However, in ActionScript when I try to get the width and height using, for example

Code:

pieceObject.width

I get the width of the piece including the part that is hidden, i.e. a larger width than the visible area.Is there a way in AS 3.0 to get the height / width of the bounding box of visible area only?

View 6 Replies

ActionScript 2.0 :: Find Center Of The Visible Area After Drag?

Jul 19, 2009

I have a AS2 movie clip that has a drag navigation. The movie clip is bigger then the visible area. How can I find the center xy of the current visible area when I stop the drag?

View 2 Replies

ActionScript 3.0 :: Find And Store Visible Area On Mouseover?

Oct 27, 2010

I'm working on a game where if the person puts there mouse over a card, it should pop out over the other cards, and when moved off, the card should go back to where it was, i can get the card to pop out no problem, and go back to it's location, the thing is, i don't want the card to go back when i move off the entire image, only when the mouse moves off of what was originally visible, and i'm not certain how to obtain a pre-visible area that i can use to test if the object should still be over all the other cards.

View 5 Replies

ActionScript 3.0 :: Create A Screenshot Of The Current Visible Area?

Nov 15, 2009

I'm making a first-person adventure game where I have the different frames in the root movie be the various locations that the user can interact with. I want to have fading transitions between the scenes and I was wondering if this was possible in flash. What I've tried for now is to create an array with all the current children then when the frame is changed I add those objects on top of the new frame and use a (alpha) Tween object to fade them out. This doesn't seem like a good idea and feels very hackish, so I had a few questions:
 
1. Is there an event that is called when a frame is changed (Event.FRAME_CHANGE doesn't exist ) since the way I'm doing it now is to have a local variable which I compare with this.currentFrame.
 
2. This may sound weird, but is there a way to create a screenshot of the current visible area and use that as one would any other visible object? This would allow me to Tween that one out instead of the array of children that I'm using now. I know it's possible in OpenGL, to render the current view scope to a texture array, but does Flash have this capacity?
 
PS: This is all done inside a separate class, in case that matters (I am very noobish).

View 5 Replies

ActionScript 1/2 :: Cursor Visible In Non Editable Text Area?

Oct 25, 2010

I would like to know how to have the cursor visible in non editable Text Area.

View 7 Replies

ActionScript 3.0 :: Build A Secure Login Area On A Flash Website?

Feb 28, 2012

I'm trying to build a secure login area on a Flash-AS3 website. I've managed to create the login form and pass data to a PHP script which checks them.

1) I know that in PHP I can echo some infos that can be get from AS3. In this case I suppose to echo something like "success" or "failed" to give an answer to the login attempt. Is this way of communication secure? Can anybody sniff this content and force AS3 to behave like if login was successful?

2) Suppose that PHP-AS3 communication has been secured. What should I do now? May I simply show admin pages hidden before? Is it the correct way? Is it secure?

View 5 Replies

ActionScript 3.0 :: Build A Secure Login Area On A Flash Website

Jan 21, 2012

I'm trying to build a secure login area on a Flash-AS3 website. I've managed to create the login form and pass data to a PHP script which checks them. Now I've got some questions.

1) I know that in PHP I can echo some infos that can be get from AS3. In this case I suppose to echo something like "success" or "failed" to give an answer to the login attempt. Is this way of communication secure? Can anybody sniff this content and force AS3 to behave like if login was successful?

2) Suppose that PHP-AS3 communication has been secured. What should I do now? May I simply show admin pages hidden before? Is it the correct way? Is it secure?

View 5 Replies

Flex :: Missing 'Export Release Build' Button

May 12, 2011

So I was working normally, and accidentally hit the profiling button after that, I later decided to export my current.air.URL...Why would the export button disappear all the sudden? I cannot find it at all. It seems rather interesting not being able to export a .air and provide an installer.

View 1 Replies

Actionscript 3 :: Take Snapshot Of Display Object Visible Area In Flash?

Jul 28, 2011

I have camera input app in flash (AS3) and I draw some graphics over it. I want to take the image snapshot of the stage visible area but only the video an graphics I draw over video. I want to exclude controls from the image snapshot. My display object layout is in following relation:

-stage
--canvas (Sprite)
---video (Video)[code]..........

Stage size is fixed and I want to take a image snapshot of everything that is child of my canvas element (camera input video and overlayed graphics, but excluding controls). I am able to make this image snapshot when overlayed graphics are inside the bounds of stage size. I do it like this:

var bmpd:BitmapData = new BitmapData(canvas.width, canvas.height);
bmpd.draw(canvas, new Matrix(1, 0, 0, 1, canvas.x, canvas.y));

But this gives me unwanted result when graphics which I draw on top of video on canvas exceed the bounds of stage display area. How do I limit the image snapshot only in the bounds of visible area inside stage?

View 3 Replies

ActionScript 3.0 :: Bound MovieClip Not Draggable Outside Visible Stage Area

Jul 31, 2009

I have some movieClips on stage which are draggable and I don't want them to be draggable outside of a visible stage area. Problem is these movieClips are inside a sprite which is panable and then for whatever reason this bounds doesn't work anymore as I intend it to. How do I fix this bounds?

Code:
var arr:Array = [m1,m2,m3,m4,m5,m6,m7,m8,m9,m10];
var thumbSprite:Sprite = new Sprite();
addChild(thumbSprite);
for each (var item in arr) {
item.addEventListener(MouseEvent.MOUSE_DOWN, startDragCard, false, 0, true);
[Code] .....

View 3 Replies

Flex :: Build A FormItem With An Image Button In The Label Section?

Jul 30, 2010

I want to build a flex FormItem extension that adds a button into the item label section, such that there is both a text label and, to the right of it, a button that uses an image icon: Basically, I want to create that 'i' icon, such that I can click on it to display a help overlay for the item in question.Is there an existing component that does this? If not, how do I do it?

View 1 Replies

Flash :: Flex - TFS Build 2010 Call An Ant Script And / Or Build?

Mar 31, 2011

In TFS 2010 build, I have a new build and I want to call an ant script that builds Flash. How do I call the ant script? Also How can I compile the Flash directly? I've seen the Power Tools and this question but it doesn't help me as we don't have TFS 2008. I can't find any documentation on how to use the power tools except the 1 sentence on the bottom of download page saying to create your build the old way and import it (which isn't very helpful). I've installed the power tools on the agent computer but I don't see any new options in the Toolbox when I'm designing the build flow.

View 2 Replies

Flex :: Creating Ant Build Script To Build Only When A Dependency Was Updated?

Apr 14, 2011

I just started working with ant a few days ago. Right now I have a general buildall.xml which should call each project's build.xml. Because some projects depend on each other, I need to rebuild some other projects which depend on it. This isn't a problem--I'm just setting the depends property of the target. However, ant is always building the dependencies, even when the files haven't changed.Let's say project1 has no dependencies; project2 depends on project1; project3 depends on project1, 2; project4 depends on project1, 2, and 3; and so on.I could hack a solution which looks at project K, and checks if project 1 .. project K have updated files using uptodate. If so, then run the target. This is messy and appears unnecessary.

What is the cleanest way to implement this?EDIT: So I decided to just hack in a bunch of targets, "check_projectK" where it does the uptodate checks on all of its source files, its build file, and the build files of the 1 .. K-1 projects. Due to dependencies, this is always handled correctly. However, this is still a large amount of copy and paste for a large workspace.

View 1 Replies

Flex :: Will Google Index Content That Is Only Visible After Clicking A Button

Mar 23, 2011

Will the Googlebot "click" buttons on a Flex 3 site when it indexes it?

I've got a Flex 3 site. When the user clicks one of the buttons on my site, a panel opens and text appears. As the text is not immediately visible, will Google index the content in the panel? (I'm not cloaking or anything weird. It's just the normal functioning of the site).

Are there any Flex 3 developers out there who see Keywords listed in Google Webmaster Tools for text that is visible only after clicking a button?

View 2 Replies

Flex :: Tabbar Size Is Not Reduced When Button Visible And IncludeInLayout False

Nov 30, 2010

i have a tabbar with 10 button. when i change the some buttons visible and includeInLayout property false then tabbar size is not change..it is same as when it has 10 button

View 1 Replies

Flex :: How To Use Available Skins

Sep 24, 2011

How to use the skins shown on various sites e.g flex skin site into my flex project.

View 1 Replies

Actionscript :: Flash Getting VIM To Be Efficient Like Flex

Nov 4, 2009

I'm trying to setup VIM for editing Actionscript 3 for some upcoming Flash projects. I dislike working in an IDE and prefer VIM. Right now, I know that I want:[code]I've tried setting up Omnicomplete but was running into issues.How can I set up Omnicomplete with tab completion properly?Where can I find a good AS3 syntax file?What is a good AS3 compiler for terminal/bash?

View 5 Replies

Flex :: Looking For A More Efficient Way To Clear Controls?

Jul 28, 2011

In main.mxml I have a bunch of textInput controls a combobox and a few checkboxes that I would like to be able to clear with some sort of loop. Right now, I do it like this:

[Code]...

I read a post on SO that recomended adding the controls to an ArrayCollection with the creationComplete event. I tried that and it worked fine but it was not any more elegant than what I have now. All of these controls are in mxml format and not generated with AS by me. I also tried looping like this:

I can't get past that part though. I cannot find a way to reference the values of the control.

View 1 Replies

Flash :: Using Skins Without Embedding In Css Doc And Swf In Flex?

Oct 23, 2009

The issue I am having is creating an application with nearly every component skinned using CSS. The majority of the components are skinned using:Embed(source="file.png");method. The problem I am running into, is flex trying to compile all of the embedded assets into the final swf. As it stands now, my compiled swf stands around 16mb!@@ OUCH. It is a very large application, but not that big. Any ideas on how to load the assets into the application at run time, or on request maybe?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved