Ask a Question related to Macromedia Flash Actionscript, Design and Development.
-
chicken king webforumsuser@macromedia.com #1
comparisons and depth
sorry to post two questions in one day, but i have run into a second problem. i have a looping movie clip which changes _y position randomly with every loop. that is working fine. but what i want to do is is have it check on the first frame of that loop for its _y position and adjust its depth based on that location.
right now i have tried this code
onClipEvent (enterFrame) {
if (_root.dad._y<=200) {
_root.dad.swapDepths(1);
} else {
_root.dad.swapDepths(100);
}
}
which is on a mc in the first frame of the dad movie clip.
sorry if this is a dumb question. i have primarily done animation and am teaching myself more advanced code stuff.
actually what i am really looking to do is campare the _y of _root.tractor to the _y of _root.dad and if tractor._y > dad._y then the depth of tractor > depth of dad and if tractor._y < dad._y then depth of tractor < depth of dad.
any advice from out there???
thanks in advance.
chicken king webforumsuser@macromedia.com Guest
-
batch reducing image depth without affecting image depth
Hi All, I have to optimise a project for a client, the main part is reducing all the image bit depths from 32 bit to 16 bit. I was just going to... -
#26080 [NEW]: Comparisons always true in xml.c
From: AxelLuttgens at swing dot be Operating system: Darwin 7.0.0 (Panther) PHP version: 4.3.3 PHP Bug Type: Compile Warning... -
chaining comparisons
When I learned python I was overjoyed that I could evaluate 1 < 2 < 3 and get "true". I just realized that you can't do that in Ruby. Is there a... -
NASA G5 v PC speed comparisons
It seems NASA thinks that G5s are pretty fast, and they're independant http://www.macobserver.com/article/2003/07/04.7.shtml PK -
Date comparisons
Hi. I'm using ADO.NET to retrieve data from SQL Server via stored procedures. Lately I found the following problem: There's a stored procedure... -
chicken king webforumsuser@macromedia.com #2
Re: comparisons and depth
sorry. i am a putz. i got it figured out. i just put this on an mc in the main timeline:
onClipEvent (enterFrame) {
if (_root.tractor._y>=_root.dad._y) {
_root.tractor.swapDepths(2);
_root.dad.swapDepths(1);
}
}
onClipEvent (enterFrame) {
if (_root.tractor._y<=_root.dad._y) {
_root.tractor.swapDepths(1);
_root.dad.swapDepths(2);
}
}
thanks for all the help y'all have given me.
chicken king webforumsuser@macromedia.com Guest



Reply With Quote

