Flex :: Moving Canvases Between Several Ui Elements?

Mar 1, 2010

I need to animate a lable movement between 2 canvases...The mxml example of the code is:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="main()" frameRate="1">

<mx:Script>[code].....

Currently the problem is that the label actually do not leave borders of the first canvas (I see scrollbars instead of it).I think this is related to globalToLocal conversion problems, but do not understand how to use it.Also another question is how to animate the movement corretly, because move function performs movement without any visible action.

View 1 Replies


Similar Posts:


Flex :: Creating A TileList With Canvases Which Are Drag-able?

Nov 24, 2010

I want to create a tilelist in which there would be different canvas or vbox etc, and i want to make them drag able.I wrote a code to do this, but the output does not shows anything in a list.

<mx:TileList width="1500" height="1000" dragMoveEnabled="true"
selectable="true" selectionColor="#FFFFFF"
dragEnabled="true" dropEnabled="true"

[code].....

View 1 Replies

Actionscript 3 :: Elements Are Snapping To Pixels While Moving?

Mar 12, 2012

I have an imported png in a 'info_icon' symbol. I have another imported png in a 'info_content' symbol.

I have some code that allows you to drag an instance of a 'map' symbol around. Inside this map symbol are instances of 'info_icon' and 'info_content'.

When I drag the map slowly, I can see the info_icon instances and info_content instances, jiggle ever so slightly...I think to line up to pixels.

how to stop that. I'm looking at the pixelSnapping property and it doesn't seem to be helping..

info_button_mc.pixelSnapping = PixelSnapping.NEVER;

View 2 Replies

ActionScript 1/2 :: Add A Small Amount Of Physics To Some Moving Elements?

Nov 4, 2009

I need to add a small amount of physics to some moving elements.I found flade, but it looks like overkill for what I'm looking for. Also, all the examples are side-views with gravity.
 
Basicaly, I have a top-down view, and have square shapes that I want to be able to slide along a wall when they hit it at an angle. They don't even need to rotate when they make impact. I tried comming up with my own solution, based on the relative rotations and quarants they collide on, but it is very clunky. I can't help but feel there is a better way to do this. Heck, there might even be some usefull ActionScript function that I don't know about.

View 14 Replies

ActionScript 2.0 :: Keeping Randomly Moving Elements Inside Frame?

May 30, 2005

I have gone through the tutorial on this site regarding random movement. But I need it to be kept in a frame. This is the code(from this site)

Code:
function getdistance(x, y, x1, y1) {
var run, rise;
run = x1-x;
rise = y1-y;
return (_root.hyp(run, rise));
} function hyp(a, b) {
[Code] .....

Lets say I make an physical border for the element. A "box" 200x100 and this box is centered. How do I keep my random moved element inside this "box" or frame you may call it.

View 1 Replies

Actionscript 3 :: Flex - Reference Flex Elements Added During Runtime?

Jan 17, 2010

I am having difficulty getting a reference to elements added after compile-time using the 'id' property. I have seen a few forum topics suggesting that this isn't possible, and that getting a reference to elements added this way is trickier, but never just exactly what that trick is. This code throws a fun little: Error: uncaught exception: Error calling method on NPObject! [plugin exception: "ReferenceError: Error #1069: Property canvas_tentpoles_0 not found on SGraph and there is no default value."].

[Code]...

View 2 Replies

Professional :: Position Elements Relative To Other Elements Or In Absolute Values?

Jan 26, 2010

Is it generally to position elements relative to other elements or in absolute values?

View 2 Replies

Flex :: Get Flex Popups To Open Under Some Of My Visual Elements?

Apr 3, 2012

Ive been trying to get flex popups to open under some of my visual elements.

View 1 Replies

ActionScript 3.0 :: Shift Array Elements Without Deleting The Elements?

Oct 1, 2009

does anyone know how to shift all the array elements by one or more without deleting the array itself?

Something like rotating the array:

1,2,3,4,5,6,7,8,9,10
10,1,2,3,4,5,6,7,8,9
9,10,1,2,3,4,5,6,7,8
8,9,10,1,2,3,4,5,6,7
7,8,9,10,1,2,3,4,5,6

View 4 Replies

Html :: Show Elements Over Flash Elements?

Jun 9, 2010

When i create a menu, the dropdowns go behind the flash element. But in some sites, like Digg, it is shown above. z-index is of no use

View 2 Replies

Flex :: Add Elements To XMLListCollection?

Jun 27, 2011

I have a MenuBar, which is using a XMLListCollection object as a dataProvider.I wish to add and remove elements from this collection at runtime.How to add / remove elements from XMLListCollection ?

View 2 Replies

Flex :: Access Mxml DOM Elements?

Jul 9, 2009

Is there a way to access the DOM-Elements of a mxml file in a way that you can in JS (e.g. using Prototype or jQuery)?

I need to know if a top-level element has a child (sub-sub-...-childs) with a certain id.

In JS (using prototype) it would be something like:

$('tabs').select('[id="something"]');

View 2 Replies

Actionscript :: Inspect UI Elements In Flex?

Jul 10, 2009

Is there any tool available for Flex applications that acts similar to Web Developer or Firebug toolbar to inspect UI elements? Basically in a complex hierarchy of UI controls allowing you to browse the elements and see properties such as x and y coordinates, width, height, id.I'm interested in tools that would allow you to do this at runtime, since most of the properties are dynamic.

View 3 Replies

XML :: Flex Sorting Of ListCollection Sub Elements

Aug 13, 2009

In a Flex webapp, is there an easy way to go about applying a sort to the children of an XML element, based on the children's attributes? Example follows below:

XMLListCollection:
<a anotherProp="ABCDE">
<e prop="AB">1</element>
<e prop="BC">2</element>
</a><a anotherProp="FGEH">
<e prop="HF">3</element>
<e prop="AD">4</element>
<e prop="AC">5</element></a>

I would like to sort the <e> elements, within each <a> element separately, according to their "prop" attribute. My code for generating the array containing the <a> elements is along the lines of:
for each(var node:XML in initialInput:XMLListCollection){
if(node.localName()=="a"){
//I was hoping to be able to sort the <e> children of the node variable here
xmlListCollectionVar.addItem(node);
}}

At the end I would like the <a>'s to remain in their defined order, but their <e> children to be sorted based on the "prop" attribute. So far if I try:
node.children().sort=someSortVar
Where someSortVar has its fields set to:
SortFields("e.@prop",...)
I get an exception about a null value. Any way to convert the children list to XMLListCollection, sort it and integrate it back into the node variable?

View 3 Replies

Flex :: Best Way To Remove All Elements From AS Array?

Sep 25, 2009

I'm writing an application in Flex / ActionScript and have a number of class member variables of type Array storing data. My question is: what's the "best" way to clear out an Array object? I noticed the ArrayCollection class has a function removeAll() which does this, but the basic Array class does not. Some possibilities I've considered are:
Iterating through the array, calling pop or shift on each element
Setting the array length to 0
Setting the member variable to a "new Array()" or "[]"

View 4 Replies

Flex :: Animate Child Elements In It?

Oct 17, 2009

Anyone know how to animate the size/position of child elements of a layout in Flex 4 ?

I have a list component with a custom layout. I want when I change the positions of the child elements I want them to animate their move to the new positions.

View 2 Replies

Flex :: Access Children Elements In A SWC?

Feb 17, 2010

Does anyone know if its possible to access children elements in a SWC? I have created some MC's and inside of some of these MC's I have some dynamic textFields. I export the content to a SWC and load it into my Flex project. No problem loading it or accessing the parent elements, they display fine. But I want to access the textfields nestes in the MC's and modify the text. When I debug the app, I can see the textfields as child elements. It's typed as a TextField and the Instance Name is the same as input in the Flash IDE but I cannot access it. When Flex compiles it throws an error saying it doesn't recognize the method. I've tried to insert actionscript on the timeline, linked external classes and nothing can be accessed.

View 3 Replies

Flex :: Getting Unique Elements From An ArrayCollection?

Mar 19, 2010

I have an ArrayCollection as mentioned below.

private var initDG:ArrayCollection = new ArrayCollection([
{fact: "Order #2314", appName: "AA"},
{fact: "Order #2315", appName: "BB"}[code].....

I want to populate a ComboBox with UNIQUE VALUES of "appName" field from the ArrayCollection initDG.

<mx:ComboBox id="appCombo" dataProvider="{initDG}" labelField="appName"/>

One method I could think is to loop through the Array objects and for each object check and push unique appName entries into another Array. Is there any better solution available?

View 4 Replies

Flex :: Access The Array Elements?

Oct 27, 2010

var count:uint = 0;
var textInputs:Array /* of TextInputs */ = [];
for(var i:String in columnsData){

[Code]....

here how can i access the first, second of Array of textinputs in the form of string or any thing to further proceed

View 2 Replies

Xml :: Flex - Manipulate Elements Inside A XML?

Mar 17, 2011

What are the inbuilt functions available in flex,actionscript that I can use to find a node with a specific name inside xml variable and what functions could help me manipulate it? Something like Xquery in SQL! I dont want to use for loop everytime I want to manipulate a xml variable. For example, if I want to "cut" node inside this xml and add another attribute to it named enabled pro grammatically. Or how could I find "Find Next" node and delete it?

<menuitem label="Edit">
<m label="Cut"/>
<m label="Copy"/>
<m label="Paste"/>

[code]....

View 2 Replies

Flex :: List All Elements In A Container?

Jul 11, 2011

I want to list all controls (buttons, datagrids, etc) in a container

This works but gives me a warning 1008: variable 'comp' has no type declaration.

for (var i:int = 0;i<this.numElements;i++)
{
var comp = this.getElementAt(i);

[Code]....

when I get a compiler warning it's because I'm not doing something the way it is supposed to be.

Are there any alternatives to reference the id property? A method I'm missing even a whole different way iterate through all the controls?

View 3 Replies

Flex :: Style Elements Reference For Controls?

Aug 22, 2009

Is there any documentation link where I can find list of styles applicable to flex controls? In particular the AdvancedDataGridControl. Like border, border-left,top,bottom,indent, etc like list of all possible style elements.

#1: Link provided by Lior below is the complete list.
#2 : found this looks quite cool.

View 2 Replies

Actionscript 3 :: Flex: Copy UI Elements On Click

Dec 24, 2009

I have a panel with several canvases and buttons on it. I want to implement a feature: when I click next button I want the whole Panel and canvases to be copied and placed below the current one. Also I want to make it possible to do this operation several times.

How do I dynamically generate UI elements? (and maybe I will need some new Arrays, e.g. state1, state2, etc)

View 2 Replies

Flex :: Changing Value In Array Where Elements Are Objects

Mar 29, 2010

Example:
var arr_1:Array = new Array();
arr_1.push({sdate:"2010-02-02",status:"New"});
arr_1.push({sdate:"2010-02-03",status:"New"});
arr_1.push({sdate:"2010-02-04",status:"New"});
arr_1.push({sdate:"2010-02-05",status:"New"});
How can I change element number 3 status to: "Old", without removing it. Just update the status value??

View 1 Replies

Flex :: Detect Overlap Between Elements On Canvas?

Jul 4, 2010

I'm trying to detect overlap between elements on my canvas. The attempt is to reuse some of the code for collision detection at [URL]

This is the smallest MXML sample I could come up with that gives me a type error.

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"

[code]....

View 1 Replies

Flex :: Does Dictionary Maintain The Order Of Its Elements

Jul 22, 2010

Does Flex Dictionary maintain the order of its elements?

View 2 Replies

Flex :: Adding Custom Elements To Charts

Nov 18, 2010

If you see google finance or other such charts, they usually have a small pentagon on the chart that indicates when the dividend was paid. Note the D markers in the screenshot [URL]. In this link you will see A,B,C,D .... along the charts X-Axis. If you choose a larger data range say 2005- 2010 , then you will see blue dividend markers along the x-Axis. Is there any thing in Flex that will allow us to do that?

View 1 Replies

Flex :: Asdoc - Add A Comment To Some Elements In A Document?

Nov 21, 2010

I want to add a comment to some elements in a Flex document, and process the comments using ASDoc. I can easily do this for the script portion, but I end up with a ton of ugly "This property can be used as the source for data binding." messages for each element I declared in Flex. Is there any way to embed a comment into a flex element so that it can be read by ASDoc? I have tried using the standard

<!-- -->

notation, but that didn't seem to work.

EDIT: The notation seems to be swallowed up as an HTML comment..

View 3 Replies

Flex :: Programmatic Manipulating With Chart Elements In AS3

Dec 5, 2010

When I hover the mouse above the chart elements, it can show some standard hints. How can I show the tooltips without hovering?

View 1 Replies

Flex :: Canvas - Way To Make Elements Non-selectable?

Jan 4, 2011

As part of requirements for a new feature of "locking" a page, it is desired to have all elements on a locked page be non-selectable. This is not to be confused with disabled. All elements should appear as if the page were active, but not be selectable.The current thought is to create a clear canvas and place it over the existing elements. With this thought, I have two questions:if you can think of a better way to make all items non-selectable than applying a clear canvas element over the existing elements could you describe it?if not, what is the best way to retrofit existing implementations to accept the overlayed canvas item? BTW, all .mxml pages inherit from a custom .as file.

View 3 Replies







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