deadlydentures
05-30-2003, 07:43 AM
I have lots of problems that i have been trying to figure out for the last few days. I hate making topics on such simple stuff, but i have enough of them that i'm going to break down and do it. Alot of it has to do with my lack of understanding of activescript and OO in general. I have enough trouble not putting dollar signs in front of every varible :p
To give you an idea on what i'm doing, i'm making a forum board in flash. I know PHP and mysql like mad, but i've never touched Javascript or Actionscript. I decided to do the rest of it in Flash to learn something and for the challenge. I've learned alot. But like i said there are alot of things i don't understand yet and I'd be very happy if you'd answer them :D
1) For some reason, this code doesn't work.
for( j=0 ; j<i ; j++ )
{
_root.createTextField( "forum"+String(j), 1, 10, 50*j + 20, 200, 25 ) ;
_root["forum"+String(j)].text = forums[j].name ;
}
It creates the textbox, and gives it the correct text, but then the next loop that it does, it overwrites it. Why? There should be two instances, but there is only one.
2) Lets say i have a dynamic textbox, and i want to delete it.
I say
delete textboxinstance ;
Is that the right way to do it? It deletes it, yet in the varibles list it still exists.
3) I've been considering how my flash movie should be set up. I could either have one fairly large swf file that has all the code and symbols and stuff, or i could have several small ones, each displaying their own page. (one for the entire board index, one for a forum, ect.) The possible problem with that is that would each movie need to have their a list of the symbols(graphics and movieclips, buttons), or can they share with each other? Is it possible to send each movie the info they need, like current user? Would it be efficient or inefficient?
4) How would I make a new instance of say a symbol? Are all symbols treated as MovieClips?
Hmmmmm, i guess thats it. As you can see they are all about OO.
The Flash MX turtorials didn't cover this kind of stuff, and there are almost no questions here asking this kind of stuff. And i know a forum board is quite the challenge for someone who has never really touched ActionScript, but the syntax is just like C++. Its the object orientation and all that jazz that i don't know.
Thank you :D
To give you an idea on what i'm doing, i'm making a forum board in flash. I know PHP and mysql like mad, but i've never touched Javascript or Actionscript. I decided to do the rest of it in Flash to learn something and for the challenge. I've learned alot. But like i said there are alot of things i don't understand yet and I'd be very happy if you'd answer them :D
1) For some reason, this code doesn't work.
for( j=0 ; j<i ; j++ )
{
_root.createTextField( "forum"+String(j), 1, 10, 50*j + 20, 200, 25 ) ;
_root["forum"+String(j)].text = forums[j].name ;
}
It creates the textbox, and gives it the correct text, but then the next loop that it does, it overwrites it. Why? There should be two instances, but there is only one.
2) Lets say i have a dynamic textbox, and i want to delete it.
I say
delete textboxinstance ;
Is that the right way to do it? It deletes it, yet in the varibles list it still exists.
3) I've been considering how my flash movie should be set up. I could either have one fairly large swf file that has all the code and symbols and stuff, or i could have several small ones, each displaying their own page. (one for the entire board index, one for a forum, ect.) The possible problem with that is that would each movie need to have their a list of the symbols(graphics and movieclips, buttons), or can they share with each other? Is it possible to send each movie the info they need, like current user? Would it be efficient or inefficient?
4) How would I make a new instance of say a symbol? Are all symbols treated as MovieClips?
Hmmmmm, i guess thats it. As you can see they are all about OO.
The Flash MX turtorials didn't cover this kind of stuff, and there are almost no questions here asking this kind of stuff. And i know a forum board is quite the challenge for someone who has never really touched ActionScript, but the syntax is just like C++. Its the object orientation and all that jazz that i don't know.
Thank you :D