Get the latest Education e-news

Go Back   Game Career Guide Forums > Programming
Forum Home Register Members List Mark Forums Read

Thread Tools Display Modes
Old 02-05-2008, 08:58 AM   #1
Junior Member

Activity Longevity
0/20 19/20
Today Posts
0/11 ssssssss1
Default Some help with coding (flash action script 2.0)

Well, hellow there. I'm new on this forum, and I was thinking of making some questions.
As you might guess for the title, this are mainly question for someone experimented (or with coding background) at action script 2.0, so probably if you don't know about it, you can't help me here.
Well, the thing is that, as you might know, flash has the option to create classes in order to organize the code. Among the functions I want to give a class, I need to found out wheter my MovieClip is (or not) colliding with other stuff in _root. I already programed the best collition checker my game can have (it register wheter the character is above or below the other movie, I've already tested it).
Now, the problem is that to make it work, I need to make a "for" inside the class code, and for some reason, everything I choose is given back as "undefined".
To make things more clear, here you have the code I'm having problem with:
class player extends MovieClip{
lots of codes that are useless for you
var z
for(z in _root){
//note: this is my problem, z is always "undefined"
//note: so this never happens
please someone tell me if you know how to fix this ... salu2's

ps: or if at least you know a good page with clear tutorials on how to fix this
nacritico is offline   Reply With Quote

Thread Tools
Display Modes

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

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

Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.
All times are GMT -8. The time now is 09:20 PM.

UBM Tech