Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 05-16-2010, 01:28 AM   #1
idkas3
Registered User
 
Join Date: Apr 2010
Posts: 21
Default x and y positions values on ONE variable?

I am trying to figure out how to obtain x and y positions' values on one variable

concept is...

cactus_mc.x = 233;
cactus_mc.y = 32;

two consecutive values of cactus_mcx and y must be applied on one variable

var xandyA = (cactus_mc.x, cactus_mc.y) // error

so I can continue with following functions in the future

if (xandyA == xandyB ){
code
}
idkas3 is offline   Reply With Quote
Old 05-18-2010, 08:32 AM   #2
cardin
Cardin
 
cardin's Avatar
 
Join Date: Jan 2003
Location: Singapore
Posts: 56
Default

This might be helpful:

ActionScript Code:
var pointA:Point = new Point(10, 14);                         var pointB:Point = new Point(5, 14);             pointB.x += 5;                         trace(pointA.equals(pointB));             //true!

Point is in the package flash.geom.Point.
__________________
Yohohoho... Yohohoho.
cardin is offline   Reply With Quote
Old 05-25-2010, 06:24 PM   #3
ActionScriptRetard
Member
 
Join Date: May 2009
Location: United Kingdom
Posts: 99
Default

you could try an array..
ActionScriptRetard is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:26 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.