Flex :: Getting The Global Coordinates Of A Component+flex?

Feb 20, 2012

I have a texInput component,which is placed inside containers like following

<s:BorderContainer ...>
<mx:VBox ...>
<mx:HBox ...>
<mx:TextInput ...>

[code]....

Now after initialization i want to get the location of my textInput with respect to Application.I tried with with localToGlobal(PointofLocalCoridnate), then it is not giving the correct location of textInput.

View 8 Replies


Similar Posts:


Flex :: Getting The Global Coordinates Of A Component?

Dec 15, 2011

I have a texInput component,which is placed inside containers like following

<s:BorderContainer ...>
<mx:VBox ...>
<mx:HBox ...>

[code].....

View 1 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

Actionscript 3 :: Convert Global Coordinates To Local Coordinates Of A UIComplenent In Flex Project?

Dec 19, 2011

I was trying to convert global coordinates to local coordinates of a UIComplenent in my flex project using below code using below code

var gp:Point = new Point(e.stageX,e.stageY); //global point
var lp:Point = uic.globalToLocal(gp); //local point

uic is UIComponent in which I have subclass of Sprite for drawing something I have set the sprite's mouseEnabled and mouseChildren to false to not interrupt the mouse event. above code is within uic's mousemove event where I was tracing the gp and lp gp was giving correct value and suprisingly lp was giving negetive values. when I move the move to the top left corner of uic i expect lp to be 0,0 but it is giving the -width of of uic. I broke my head for hours and ended up finding an alternate by using offsets. Infact my original code was much simpler like this which was same issue

var lp:Point = new Point(e.localX,e.localY);

I am not sure what exactly is causing this problem. the workaround had lot of issues and it creating a mess in my rest of the algorithms.Just now I found even more interesting thing (which is actually weird). for some reason I went and create a new lp2

var lp2:Point = new Point(e.localX,e.localY);

now surprisingly it was giving correct values as expected and I went back and changed the code as

var gp:Point = new Point(e.stageX,e.stageY); //global point
var lp:Point = uic.globalToLocal(gp); //local point
var lp2:Point = new Point(e.localX,e.localY);
var lp2:Point = uic.globalToLocal(gp);

now it is expected to have all the lp, lp2 and lp3 variables to be same but weiredly lp two is giving wrong value and lp2 and lp3 were giving correct. I am suspecting using the variable lp has something to do. I am not sure about that but above proves it so right now I am using lp2.

View 1 Replies

Flex :: Get Global Coordinate Position Of A Component?

Aug 9, 2010

In flex, how to get global coordinate position of a component?

View 1 Replies

Flex :: How To Get X / Y Coordinates Of Caret Inside TextArea Component

Mar 4, 2011

I googled for almost a day to find the answer to my question: [URL]. This almost works (and is a great solution), but the solution doesn't work when I do:
1). Copy and paste multiple-line texts.
2). Write long and scroll the texts.
I also found another working example at: [URL]. (The autocomplete prompt appears when you press ctrl+space right at the caret's position). But an email from its author says he uses monotype fonts to calculate individual character's location. Is there a way to get multi-line input from a textfield?

View 1 Replies

Flex :: Bind To Global Variables Inside Component?

Aug 19, 2009

I've developed a component which is a combination of a few items (canvas, labels, etc...) but when I try to bind it to a variable such as: {stationXML.getItemAt(1).AAA.@value}, it doesnt work. Before I combined all the items in a component, they were all in the main MXML file at which time they worked. Not sure if it matters, but the "stationXML" arraycollection variable is declared inside the file "Station.as".

View 2 Replies

Actionscript 3 :: Flex - Using A Global Event Bus In Flex

Jan 18, 2011

I am using modules in flex, to build different parts of my webapp. What I need now, is a way these modules can communicate with each other on events. What really is happening is ,that there is a central module, which then will take care of loading other modules and passing data to and fro. But, coding for each part to delegate events to each of these loaded modules from the central module and back would be a big nightmare.

What I really want to do is have a global event bus for it. Are there any specific libraries, already existing for such a process. Also, I would be using MVC, so it should also take care between events form the model to the view and vice-a-versa.

View 3 Replies

Actionscript 3.0 :: Matrix3d Local To Global Coordinates For Rotation?

Feb 4, 2010

I made a cube with as3. I wanted it to rotate in the Y Axis according to the horizontal mouse movement. It works nice when this is all I want. But if I try to also make it rotate on the X axis with the vertical mouse movement, things get screwy.

This happens because the transformations are added in the global coordinates, not the local ones. So, for Example, if I wanted the cube to rotate 30 degrees along its Y axis, I have to find a way to translate that into the global coordinates, and then apply that to the matrix3D of each face. I need a local to global translator.

[Code]...

View 1 Replies

ActionScript 3.0 :: Variable Of Nested MovieClips Global Coordinates

Apr 24, 2009

I have a MovieClip ("mc3" that moves dynamically) inside of a MovieClip ("mc2" that moves dynamically) that is on the stage ("stage" that is static). I need to find the value of mc3's x in relation to the stage? I need to make it into a variable. I am trying to do the math, can't figure it out. Also tried localToGlobal and failed.

View 5 Replies

ActionScript 3.0 :: Flash LocalToGlobal And GlobalToLocal - Get Value In Global Coordinates

Oct 27, 2010

I have a small problem with usage localToGlobal and than back to local. I can get global coordinate of my nested mc in question alright. Than i check if this coordinate + value of my mc.width is more than my stage width. I get to this part with no problem. Than if value is bigger (so mc is not on the stage i mean if part is off the stage i change value so it is stage width - mc.width). So i get value in global coordinates that i need. But how do i apply this to my nested clip is my question? For reference here is my code:

[Code]...

View 3 Replies

Flex :: 4 - Null-component - Checking If The Cancel Button Component In The Child Component?

Jun 23, 2011

I have a component "child" which has a cancel button. Now this component is placed in a state called "newChildComp" I also have another component called "parent". In the parent component, i have a button that dispatches an event. Here is the event code:

[Code].....

so, basically,i am checking to see if the cancel button component in the Child component, while i am still in the parent Compoent, was clicked, if it was clicked, call the cancelButtonHandler. The problem is by the time the addNewChild handles the event, that cancel button was still null. My question is how do i solve this without using the itemCreationPolicy on the cancel button?

View 1 Replies

Flex - Define A MXML Component And Update MXML Component In Flex Application

Aug 12, 2009

A Flex components values are initlized by init methord. In an application flow, How to refresh a mxml component data value ; as init is callled at the start up it self only.

eg. of mxml componet may be as simple as button label or text as complex as repeater whose data provider is a web service ( means a fresh quesy should be made to pull the data and refresh the dataprovider of repeater )

View 3 Replies

Flex :: Actionscript 3 - Delete Node Of Type Object From Flex Tree Component?

Feb 11, 2011

I have a tree with nodes , and a delete button , first user select the node and click this delete button , I want this node to be removed from the tree , Its not XML , every node in tree is of type Object

{label:'folder',children:[{label:'file1'}]}

I tried delete myTree.selectedItem (but compiler wont let me do it) also tried myTree.selectedItem = null (just unselects the item)and also how can I access reference to parent object of myTree.selectedItem ?

View 3 Replies

Flex :: Reduce The Scrolling Speed Of The Flex Mobile SpinnerList Component?

Mar 26, 2012

I'm using the SpinnerList component in a flex mobile application, the spinner turn too fast for my need, is it any way to reduces its speed.

There is many answer regarding the speed of the mouse wheel but no answer concerning the spinner itself.

View 1 Replies

Flex :: Actionscript 3 - Extend A Flex Component That Is Not A Container (RadioButton, For Example)?

Jul 21, 2009

I want to extend the RadioButton component in Flex 3, adding a text input line to it in place of the label. Is it possible to do this?Alternately, is it possible to have a container -- such as an HBox -- delegate all properties to an internal component -- such as a RadioButton -- so that I could create a composite component that 'acts like' a radio button?

View 1 Replies

Flex :: Why Wouldn't A Flex Remoteobject Be Able To Work Within A Custom Component

Mar 31, 2010

I have a remoteobject within my main.mxml.I can call a function on the service from an init() function on my main.mxml, and my java debugger triggers a breakpoint.When I move the remoteobject declaration and function call into a custom component (that is declared within main.mxml), the remote function on java-side no longer gets called, no breakpoints triggered, no errors, silence.[code]

View 2 Replies

Flex :: Order Of Calls To Set Functions When Invoking A Flex Component

Apr 14, 2010

I have a component called a TableDataViewer that contains the following pieces of data and their associated set functions:[code]This component is nested in another component as follows:[code]Looking at the trace in the logs, the call to set table is coming before the call to set dataSetLoader. Which is a real shame because set table() needs dataSetLoader to already be set in order to call its load() function.So my question is, is there a way to enforce an order on the calls to the set functions when declaring a component?

View 1 Replies

Flex :: Setting Background-color For Flex Tree Component?

Oct 21, 2010

I have a Flex Tree component in my app. I set the icons for open and close.
BUT I can't find something about changing the default background-color from white to something different.

obviously there is no background-color setable in css...

View 1 Replies

Actionscript 3 :: Flex - Ribbon Component For Adobe Flex Or Aswing?

Apr 1, 2011

Anyone can point me to free or commercial Ribbon component done for Adobe Flex or Aswing? I seen one at some point but for some reason cant find any now. (Please don't mention minddomo, since it has nothing to do do with my question).

View 2 Replies

Flex :: Alivepdf - PDF Blank When Trying To Create A PDF Version Of A Flex Component?

May 19, 2011

I have a flex component, a VBox, that has content inside it. Text components mainly.The VBox is holding a report that I want to be able to save to PDF. I am using AlivePdf to achieve this but the PDF produced is blank when viewed in Adobe reader (latest version).When I open the PDF in Notepad++ I can see that there is definitely content in there and the file appears to be structured correctly.This is the method I am using to generate the PDF:

private function doPrint(whatToPrint:UIComponent):void
{
var printPDF:PDF = new PDF( Orientation.LANDSCAPE, Unit.MM, Size.A4 );[code].....

View 1 Replies

Flex :: Choose Which Component Gets Scrollbars In Nested Flex Containers?

Aug 19, 2011

I have several nested VBoxes in flex, and I'm aiming for one of them to get scrollbars if the total content is larger than the window height. However, when I grow the container, it doesn't get scrollbars at all (vertical scroll policy is AUTO), and the outer container stretches past the bottom of the screen, causing the entire app to get scrollbars. So it looks something like this:

[Code]...

View 2 Replies

Global Security Manager In Flex?

May 31, 2010

I made a swf that interacts with other site on the internet (which has a crossdomainfile for me).in the main.mxml there is a definition of webservice (mx:WebService)(which is not in my domain). Therefore when loading the swf, there is a first call to crossdomainfile.xml.I put this swf on my server so that my clients can get it.

When i connect to my server to download the swf, i expect to be asked if i want to allow the swf connect to foreign webservice domain.Do i always need to define exception in Global Security Settings panel?I don't want my client do define special things..Is there a best practice for that? Why when i surfing the net other swf can do this? I read about the FlashPlayerTrust, can i define there a website i trust my swf will connect to?

View 3 Replies

Flex :: Use Global Application States?

Mar 8, 2011

I am trying to use global application states to manage roles in my application. How can I use <properties.state> everywhere in my application if I declare it in my top level application?

View 1 Replies

Flex :: Add A Image To Header Of Flex Panel Component

Jul 24, 2009

I want to replace the default title of the header with my image in Flex Panel.

View 2 Replies

Flex :: Actionscript 3 - Flex Component Visibility On Application?

Sep 10, 2009

Is there a way to tell at runtime if a flex UIComponent is in the user's view or not.For example, if I have a tabNavigator with a combobox on each tab, is there a property of the comboBox that will tell me if it is visible to the user or not when I switch from one tab to another?I know it is not the comboBox.visible property. That is set to "true" for both comboboxes. I want a property that will change when I switch from one tab to another making the comboBox visible to the user. I don't know what that property is.

View 2 Replies

Flex :: Generate A Flex Image From A Hidden Component?

Jan 20, 2010

I'm trying to put an image, generated from some text, in a RichEditableText. Since it's a styled text, I thought about putting it another RichEditableText, style it, then print it to a Bitmap to use as source for InlineGraphicsElement.I use the following code to do that

var txt:RichEditableText = new RichEditableText();
txt.text = name;
// Appliy given styles to the text flow of input rich editable text

[code].....

View 2 Replies

Flex :: Interaction Between Main Flex Application And Component?

Apr 30, 2010

I made a login component for my flex 4 application, and i load this component from my main flex application with:

<ns1:Login id="page_login" visible="true"></ns1:Login>

Now i want to change the visibility from true to false, from the login component.

View 1 Replies

Flex :: Flex - Function Call Inside Of Component?

Sep 1, 2010

I want to call an App function inside a (I know about the Component scope already).What I mean is this:

<mx:Script>
<![CDATA[
public someFunction():void {

[code]......

View 1 Replies

Flex :: Flex - Programmatically Close A DateField Component?

Oct 17, 2010

I'm using a dateField component (with editable = true) as an itemEditor in a dataGrid. Interestingly, when editing the textInput part of the dateField it doesn't seem to react to an ESC keydown as I would expect, i.e. reload old dateField value and give up focus. This seems to be standard for most other components, but not for as most other components do.

How would you go about implementing such behavior? I can listen to keydown == escape on the TextInput portion, but just realized that I don't know how to tell dateField to give up focus and politely close - in fact I'm not even sure that's the right strategy (maybe I should work at the DataGrid level?

View 1 Replies







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