ActionScript 3.0 :: Record The Current Position Of Any Of The Items Item In Order To Use That Data To Change The Position Of The Item After The User Clicks?

Jan 2, 2010

If I have several items that move across the screen but the user can click any of them at any time, how do I record the current position of any of the items item in order to use that data to change the position of the item after the user clicks?

This is what I am doing: I have 11 images that slide accross the screen. The user can click any of them at any time. When he clicks one I am scaling the image so it looks like it is comming forward (z axis) and then the rest of the images are scaled down so it looks like they are going back on z axis. So what I am trying to do is get the current position of the image when the user clicks the image so that I can use that to correctly estimate the scaling and moving of the image to make it look like it scales from the center and not from the top left corner. So if have a variable that gets the current position of the image being clicked I'm thinking I can change its position using something like: x = currentposition + -45;

View 9 Replies


Similar Posts:


ActionScript 3.0 :: Redirect The User If He Clicks On The Menu Item?

Mar 2, 2009

I have a flash file.i contains menu bar on top of it.i need to redirect the user if he clicks on the menu item.please help me in acomplish this task

View 1 Replies

ActionScript 2.0 :: Display Item In Datagrid In Order It Was Chosen And Remove Selected Item

Jul 20, 2010

I am in search of finding a way to display shopping cart items in a flash 8 datagrid in the order it was chosen by the user & also to ability to delete an item if the user choses. Currently I have the items displaying however they are displaying in a position as it is stored and called in the array. [code]

View 5 Replies

Position Item Using X And Y Co-ordinates?

Apr 26, 2009

allowing a user to enter there own x and y co-ordiantes and then a rectange gets position in the x and y co-ordinates declared

View 4 Replies

Professional :: Access A Particular Array Item Regardless Of Position?

Feb 28, 2012

I want to access a paricular array item regardless of position useranswers.splice(indexOf("ans2",1) This dosent work but basically i want to use indexOf and then splice that item?

View 1 Replies

ActionScript 3.0 :: Item Move On Mouse Position?

Jun 2, 2010

i want to make my thumbnails move opposite of where the mouse is. so for example, if i move the mouse up the thumbnail moves down, if i move the mouse left, the thumbnail goes right etc...

im trying to google this but i dont even know what its called so im not getting good results, or rather TOO many varied results lol.

what this function is called?

View 14 Replies

Flex :: Sorting - ArrayCollection Bubble Item Up Or Down By One Position?

Mar 22, 2010

I have an ArrayCollection where I want to be able to bubble items up or down by one position. What is the best way to do this?

View 2 Replies

Actionscript 3 :: AddChildAt() To Add Item At Specific Index Position?

May 16, 2011

I have a textBox and I am using it as a mail address input field where the user can type in several addresses, a bit same as in hotmail. Each address is rendered into a clickable button. Thus upon double-clicking on a specific address I want the item to be editable. After having edited the address when the user taps enter, the item is added to the list of mail adds.I am adding it using the code below:

flowBox.addChildAt( myItem, myindex);

However addChildAt seems to add the item as the last item in the list. But I want it to add the item the position where it was originally. Say the item was at position 2 in the mail list, after editing adn tapping enter, it should add at position 2 itself and not at the end of the list.

View 2 Replies

ActionScript 3.0 :: AddChildAt() To Add Item At Specific Index Position?

May 16, 2011

I have a textBox and I am using it as a mail address input field where the user can type in several addresses, a bit same as in hotmail. Each address is rendered into a clickable button. Thus upon double-clicking on a specific address I want the item to be editable. After having edited the address when the user taps enter, the item is added to the list of mail adds.I am adding it using the code below:flowBox.addChildAt( myItem, myindex);However addChildAt seems to add the item as the last item in the list. But I want it to add the item the position where it was originally. Say the item was at position 2 in the mail list, after editing adn tapping enter,

View 2 Replies

Actionscript 3 :: Flex - Tree Control Drag Drop .item Position?

Dec 9, 2009

just facing a difficulty with tree control drag drop..Suppose i have tree with drag-drop enabled.I want to which node(id) is droped inside which node. 1]if i drag "Cat1" node inside "Cat3",i want to identify ids of siblings of "cat1",and "cat3".2]in general i want to know the ids of current element being moved along withits new parent and new position and save these postions.3] Also "cat4" when moved outside "cat3",i want know its position and its siblings id.

<mx:XML id="treeDP">
<node label="Categories">
<node label="Cat1" id="1" isBranch="true"/>

[code].....

View 2 Replies

Flex :: Toggling States - When Other Item Is Selected The First Item Does Not Change Its State?

Apr 26, 2011

I have used states in my application.The thing is I have made the first item in my list to be selected. so I gave like this,

if(itemIndex == 0)
this.currentState="selected";

this works fine.The problem is when other item is selected the first item does not change its state,it remains in the selected state until its clicked.My code looks like this,

<s:BorderContainer id="outerCont" width="275" height="100" borderVisible="false"
backgroundColor.normal="#3D3C3C" backgroundAlpha.selected="0.1"
backgroundColor.selected="{data.color}">

My states are like this,

<s:states>
<s:State name="normal" />
<s:State name="hovered" />[code]........

View 1 Replies

ActionScript 2.0 :: Move Punto_mc From Current Position To Random Position After Release?

Aug 29, 2009

how to make an actionscript to move punto_mc from current position to random position after release, and then from this new position to mevo to another randon position after release?

View 2 Replies

Actionscript 3 :: Tween Position Relative To Current Position?

Jan 23, 2010

I have a tween set on a timer:

var manTimer:Timer = new Timer(1000,14);
manTimer.addEventListener(TimerEvent.TIMER, moveMan);
function moveMan(e:TimerEvent):void {[code]....

I just need to make the tween's position relative to it's current position, as opposed to starting at the stage's 0 position then moving the the stage's -40 position. It needs to start at its current position the move -40 from that position.

View 1 Replies

ActionScript 3.0 :: Get Array Position Of Clicked Item To Fetch String From Another Array?

Mar 23, 2010

I put my mc's in an array.I have another array with strings.when the mc is clicked I want to get its position in the mc array and return the string from the same position in the string array.How do I do that?

PHP Code:
var numBtnArray:Array = new Array;
function addNumButtonsToStage():void{

[code].....

View 4 Replies

ActionScript 3.0 :: This Array / Position - Change The Page Indicator When The User Scrolls

Feb 26, 2009

I have a scroll pane component with SWFs loaded in them vertically like a PDF viewer. I need to be able to change the page indicator when the user scrolls. I have an event listener on the scroll pane listening for scroll. I have an array of the Y values of each page; looks something like this: 0,800,1600,2400,3200 etc What kind of equation would I do to determine the correct number. My scroll event looks like this:

[Code]...

View 6 Replies

ActionScript 1/2 :: XML Current And Next Item?

Dec 15, 2011

I have this code within the flash to load in the XML file. A list of buttons is generated from the XML list. How do I find out which is the current 'item' selected, and then how to select the next 'item' from the XML list

myXML = new XML();myXML.ignoreWhite = true;myXML.load("items.xml");myXML.onLoad = function(_status) {if (_status) {var clientList:Array = [];var clientRegistry:Object = {};tempxml = myXML.firstChild.childNodes;var space = 10;
for (var i = 0; i<tempxml.length; i++) {var clientData:Object = {};var item = all_items.list_mc.attachMovie("clip", "clip"+i, i);

[code]....

View 3 Replies

Flex :: Spark List Component Item Order

Oct 17, 2011

I have a regular spark list which is sorted correctly when no item renderer is used. However, when the following item renderer is used, the list shuffles and displays items from previous instances of the list.[code]

View 2 Replies

Flex :: Reverse Order Of ArrayCollection So That The Last Item Appears First In A ComboBox

Jan 26, 2011

Is there a way to reverse the order of the items in a comboBox? I'd like to use index numbers to refer to items in the arrayCollection below. I want the newest content to appear first in the comboBox. But, if I add something above the first item then all of the index numbers will be off by one. If I could add a new item to the end of the arrayCollection, but have it appear first in the comboBox drop down that would solve a lot of problems.

[Code]...

View 1 Replies

ActionScript 3.0 :: Add Item In Array Between Added Items?

Feb 24, 2010

Array ( 0 , 1, 2, 4, 5, 6)I wanted to add in 3 in between 2,4 so it becomes ( 0 , 1, 2, 3, 4, 5, 6)how can i do it.

View 3 Replies

Flex :: Select Item In Details Form Dropdown When Datagrid Item Is Selected

Feb 15, 2011

I have this datagrid:

<mx:DataGrid id="dgCompetenteN" includeIn="Test" left="10" right="472" top="69" bottom="149"
dataProvider="{colCompetente}" editable="false">
<mx:columns>

[Code]....

What I want to do is, when I select an item in the datagrid, the selected item of the dropdown should be the correct one (the one which has the field idCompSuperioara equal to the third element in the selected datagrid row).

View 1 Replies

Flex :: Get List Item Selection Working When Using A Png Mask In An Item Renderer In A 4.5 Mobile App?

Jun 10, 2011

I'm creating a mobile app in which I need to show a calendar with months at the top. The months are part of a component that extends from SkinnableDataContainer (and has some custom scrolling/behaviour - which is why I did'nt use a spark list). I need the months to be shown as a 'trapezium' shaped tab and so I'm using a png image as a mask in the item renderer for the component.

When the mask is not applied, it all works well - the months render, the list/data container selection works when I click on a month and so on.When the mask is applied, it renders well, scrolling and everything else seems to work well - but when I click on a month, nothing happens visually. And from the trace statements in my code, it appears list item selection is not changing. Looks like mouse clicks are not working.

Code:

public class TopCalendarMonthRenderer extends LabelItemRenderer {
[Embed(source="/assets/trapezium_alpha.png")]
private static var TrapeziumMask:Class;
private static var trapeziumMaskInstance:BitmapAsset;

[code]...

View 1 Replies

Drop Down Menu Bug - Invisible Bottun Around Each Item Interferes With The Item Besid It

Jul 22, 2011

I have made a drop down menu with 7 items but as the invisible bottun around each item interferes with the item besid it, when i try to roll the mouse from one item to another, the invisible bottum dont work and the dropdown remains open.

View 1 Replies

Flex :: Access TileList Item Index In A Custom Item Renderer?

Mar 4, 2011

<mx:itemRenderer>
<mx:Component>
<mx:Canvas>

[code]......

View 2 Replies

Actionscript 3 :: Trigger Flex Piechart Item Click Event When A Datagrid Item Is Clicked?

Nov 4, 2011

Is it possible to trigger Flex Piechart Item click event when a Datagrid Item is clicked.If so can anyone give some example.

View 3 Replies

ActionScript 2.0 :: Select An Item From List Component And Fire A Function Directly Related To Selecting That Item

Jul 13, 2009

I want to be able to select an item from my list component and fire a function directly related to selecting that item. list is called "tidlist" function is "selecttid(n)" the "n" needs to be replaced with the index number... so if run my swf and the list component displays my items... when i select one (the third one for example)... i want to fire "selectTid(3)".... cant seem to grasp.

View 1 Replies

Actionscript 2.0 :: Select An Item From List Component And Fire A Function Directly Related To Selecting That Item?

Jul 13, 2009

I want to be able to select an item from my list component and fire a function directly related to selecting that item.

list is called "tidlist"
function is "selecttid(n)"

the "n" needs to be replaced with the index number... so if run my swf and the list component displays my items... when i select an item (the third one for example)... i want to fire "selectTid(3)".... cant seem to grasp.

View 1 Replies

ActionScript 3.0 :: Drag And Drop Item Order Not Matching DataGrid Source

May 25, 2010

I have a DataGrid that contains data linked to a server. When I select mutliple items from the grid (using shift-select) and drag some items out from the DataGrid to another component, the array of items being dragged over appears to be in a completely arbitrary sort-order, and are not in the sort -order f the DataGrid as I'd expect.

Therefore, wwhen i drop them on the target (which is unsorted), their order doesnt match that of the DataGrid... what am I doing wrong and how can i fix this?

I'm getting the array using:

var dragItems:Array = event.dragSource.dataForFormat("items") as Array;

Is this the wrong data source on dragSource to look at?

I should mention that the drop target is a nonlist control, and that i am using a custom drop handler...

View 1 Replies

Flex :: Show Current Item As Tool Tip In ComboBox ItemRollOver?

Nov 24, 2009

I need to know how to show current item as tool tip in ComboBox itemRollOver event at present i am using the below code,

private var tip:ToolTip
private function ItemRollOver(event:ListEvent):void
{[code]...........

when i click the item or itemRollOver faster tool tip is not destroyed some time.

View 1 Replies

ActionScript 3.0 :: Any Control Lists Items And Can Edit The Item?

Oct 29, 2010

is there any control that lists items (like s:list control) and also allows to edit the item ( like mx:ComboBox )?

View 0 Replies

ActionScript 2.0 :: Get A Character To Pick Up An Item And Throw The Same Item?

Oct 30, 2005

Im doing my platform game and I want to know in ActionScript how to get a character to pick up an item and throw the same item.

how do I do that? whats the code?

View 1 Replies







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