Home Tutorials Forums Articles Blogs Movies Library Employment Press
Prev Previous Post   Next Post Next
Old 06-19-2012, 09:14 AM   #1
cnnhean
Registered User
 
Join Date: Jun 2012
Posts: 10
Default Question array and frame change

well the title is not very accurate so the Question is how i can do something like that

ActionScript Code:
var h:int;                     var horses:Array = new Array();                 for (h = 0; h < numChildren; h++) {             if (getChildAt (h) is horse) {             horses.push(getChildAt(h).getRect(this));                 }             }             for ( h=0; h<horses.length ; h++ ) {             if (player.getRect(this).intersects(horses[h])) {                 horses[h].S.gotoAndStop(2);               }             }


i just cut it from the code so i hope nothing missing . so what i tried to do is whan the player touch the horse (one of many) the one he touch change to another frame.
cnnhean is offline   Reply With Quote
 


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 On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:36 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.