HVH Forums

Havaha Forums

You are not logged in.

#1 2008-05-31 14:00:49

super gerbil
Super Mod Gerbil Guy
From: (Not always)Great Britain
Registered: 2007-12-03
Posts: 237

How would you....

How would you say if any movieclips are at a certain coordinate?
I want something like this:

Code:

if(anymovieclips.x==420){
do stuff
}

Obviously though anymovieclips wouldn't be the right thing big_smile


http://newsimg.ngfiles.com/29000/29281_gerbil_grounds_final.jpg

Offline

 

#2 2008-05-31 14:07:49

BasV
Actionscript Guru
From: The Netherlands
Registered: 2007-11-27
Posts: 191
Website

Re: How would you....

you'll have to check for each Movieclip. Note, however, that the x and y properties on Movieclips are Numbers. That means mc.x == 420 has a VERY slight chance. You better do something like

for (..each movieclip) {
if (mc.x > 420 && mc.x < 421) {
//..
}
}

you should save all the movieclips you want to check in an array. If your movieclips are added during runtime (so, by code) you can also use:

for (var i:String in this) {
if (this[i] is MovieClip) {
var mc:MovieClip = this[i] as MovieClip;
if (mc.x > 420 && mc.x < 421) {
//do stuff
}
}
}

Offline

 

#3 2008-05-31 14:13:14

super gerbil
Super Mod Gerbil Guy
From: (Not always)Great Britain
Registered: 2007-12-03
Posts: 237

Re: How would you....

The array one would come in much more handy.

Thanks


http://newsimg.ngfiles.com/29000/29281_gerbil_grounds_final.jpg

Offline

 

#4 2010-06-24 16:03:29

Effidlixfup
Member
From: US
Registered: 2010-05-26
Posts: 6
Website

Re: How would you....

I would pretend not to know a thing about you, I would speak perfect Finish and say, "Im sorry, were not selling cabbage inside of the hedge gardens."

HWYR to that?
www


Find   porn pics  with   Extremely Low  prices  in  Adult-shop   !!  www.pet-station.com/download.php  It struck me at that moment as I observed my own behavior how I was beginning to simulate a kind of calm and unaffected frontwhen in fact I almost jumped out of my shoes at the sight of her.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson