Why do you have the Flash sprite puppeted? I thought that since automatic
puppeting came about, manual puppeting was no longer necessary.
Charlie Fiskeaux II
Media Designer
The Creative Group
www.cre8tivegroup.com
859/858-9054x29
----- Original Message -----
From: "Brad Hile" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 05, 2002 9:13 AM
Subject: RE: <lingo-l> Flash Sprite + puppeting
Robert Tweed wrote:
> I don't get the basic principle of what you are suggesting. Could you
> explain a bit more please? The problem with the score is that there is no
> way (in code) to *tell* the score what member type is has in a particular
> sprite channel.
Hi Robert,
The setting of the type was totally incorrect so scrap that bit but maybe
I'm missing something here as I'm only working with textfield variable
names, but setVariable definately works fine in these examples:
(The flash sprite is puppeted and the frame is sitting on a go the frame
loop with no playhead movement.)
Pardon the rough lingo programming I have stripped this down and also wrote
it very quickly
------------ simple cast member script--
on mouseUp
-- copytest is the name of the dynamic text field in a flash member
psNum=1
puppetMember=member("flashtext",1)
puppetsprite psNum, true
sprite(psNum).member=puppetMember
updatestage
setVariable(sprite psNum, "copytest", "Some text goes in here")
end
--------------- as a behaviour--
on mouseUp
-- copytest is the name of the dynamic text field in a flash member
psNum=1
puppetMember=member("flashtext",1)
puppetsprite psNum, true
x = script("attach").new()
sprite(psNum).scriptInstanceList.add(x)
sendsprite(psNum, #hupdate, psNum,puppetMember)
updatestage
sprite(psNum).member=puppetMember
updatestage
end
script "attach" is:
property pSprite, pMem
on hupdate me, ps, pm
-- not really necessary but handy
pSprite=ps
pMem=pm
end
on setVars me, message
setVariable(sprite pSprite, "copytest", message)
updatestage
end
--------------- as a parent script ----
on new me, chan
me.mMakesprite(chan)
return me
end
on mMakesprite me, chan
ps=chan
puppetMember=member("flashtext",1)
puppetsprite ps, true
sprite(ps).member=puppetMember
updatestage
end
on mUpMemText me,chan, message
setVariable(sprite chan, "copytest", message)
updatestage
end
-- to activate:
fObj=new (script"flasher",1)
fObj.mUpMemText (1,"hey Babe !")
-----------------------------------------
[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!]
[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!]