View Full Version : actionscript chat
orange gold
07-03-2007, 04:17 PM
//draws a text box, selects green text , makes it dynamic text
//and under var: he puts text1
_root.onEnterFrame = function() {
text1 = "hi everyone";
if (text1 == "hi everyone") {
text1 = text1 + " please answer me"
}
}
hangalot
07-09-2007, 06:36 PM
thats BAD code!
with
text1 = "hi everyone please answer me";
you will have the same effect and the added advantage it will not be bad for the cpu usage.
gramatically you must fix the puncuation, but i am the last person who should be allowed to comment about that :)(or spelling!)
orange gold
07-10-2007, 05:54 AM
that code works it would make any dynamic / input text with the var "text" say my message
CyanBlue
07-10-2007, 01:54 PM
Of course your code works, but you are asking Flash to redraw the content of the textField with the same text on each frame whereas hangalot's code is simply asking Flash do it once and no more...
Is there any specific reason why you are running that within the onEnterFrame??? It might not be a big one but why ask Flash to do the same thing over and over???
hangalot
07-10-2007, 01:59 PM
see CB you think like a programmer but live in denial.
CyanBlue
07-10-2007, 02:16 PM
Um... I am one of you now??? :o
Assertnfailure
07-10-2007, 05:10 PM
this.addEventListener(ForumEvent.POST, postHandler);
private function postHandler(evt:ForumEvent):void{
lurk();
}
hangalot
07-10-2007, 05:13 PM
fortunatly thats as3 otherwise you would have had a scope problem....
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.