Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 26th, 2005, 4:45 PM   #1
TerraNerd
Programmer
 
TerraNerd's Avatar
 
Join Date: Jul 2004
Location: Vermont, USA
Posts: 65
Rep Power: 5 TerraNerd is on a distinguished road
Send a message via AIM to TerraNerd
Flash Actionscript - Why isnt my 'for' loop working?

onClipEvent (load) {
	this._alpha = 0;
	for (var a = 1; a<100; a++) {
		this._alpha = a;
	}
}

spot any obvious errors?
__________________
[See a gallery of my Graphic art Here.][Visit my website Here]
TerraNerd is offline   Reply With Quote
Old Feb 26th, 2005, 8:52 PM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
You can't begin a variable with an underscore in most languages. I don't know if AS is any different.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Feb 26th, 2005, 10:30 PM   #3
TerraNerd
Programmer
 
TerraNerd's Avatar
 
Join Date: Jul 2004
Location: Vermont, USA
Posts: 65
Rep Power: 5 TerraNerd is on a distinguished road
Send a message via AIM to TerraNerd
no, _alpha is a built-in property of a movie clip, actionscript/flash is different from any other language i can think of.

Im also working with the stage and the items on the stage, and where they go, and what to do, its confusing. If i wanted a certain movieclip to move to lets say 400x, 300y on the stage i would go into the actions for that object and put something like this. The _x and _y properties also begin with _, as well as _xscale, and _yscale, etc.

onClipEvent(enterFrame){
     this._x = 400;
     this._y = 300;
}
__________________
[See a gallery of my Graphic art Here.][Visit my website Here]
TerraNerd is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:03 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC