Hi Adobe friends...
I'm taking a stab at converting my lingo scripts to javascript syntax.
I started with a very easy one. My question is why does on
beginSprite(me) NOT translate to function beginSprite(this){}. That
returns an error of missing formal parameter, and function
beginSprite(){} compiles when omitting the this.
Thanks,
- Michael M.
-- lingo:
property pSp
on beginSprite(me)
pSp = sprite(me.spriteNum)
end
on exitFrame(me)
theNumber = random(1701336, 8888888)
pSp.member.text = string(theNumber)
end
------------------------------------------------------
//javascript:
var pSp;
function beginSprite(this){
pSp = sprite(this.spriteNum);
}
function exitFrame(){
var theNumber = Math.round(Math.random() * (8888888 - 1701336) +
1701336);
pSp.member.text = theNumber.toString();
}
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[email protected] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]