Re: lingo-l scriptInstanceList
hi, warren yes, you´re right, but it wouldn´t solve the problem. to create an instance of the script did. interesting that when you assign a script to the scripinstancelist of several sprites they act like one. probably they refer to the same memory adress or something like that. but it´s unexpected. thanks, q At 16:48 24/6/2003 -0500, you wrote: On Tuesday, Jun 24, 2003, at 16:11 America/Chicago, Quixadá wrote: hi, rob yes, you´re right, that´s exactly my problem. i´ve made a simple dir just to show what´s happening. here are the scripts: The very first thing you should do is put the sendAllSprites call *outside* of your repeat loop. Try this. on startMovie repeat with i = 1 to 3 puppetSprite i,TRUE sprite(i).member = member 1 of castLib 1 sprite(i).loc = point(400 + random(70),300 + random(70)) sprite(i).scriptInstanceList.add(script(zoom)) end repeat updateStage sendAllSprites(#change,1) end Warren Ockrassa | President, nightwares LLC [EMAIL PROTECTED] nightwares LLC | Consulting Programming http://www.nightwares.com/ Developer | Structor, a presentation development/programming tool Info and demo | http://www.nightwares.com/structor/ Author | Director 8.5 Shockwave Studio: A Beginner's Guide Chapter samples | http://www.nightwares.com/director_beginners_guide/ [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!]
Re: lingo-l scriptInstanceList
thanks, evan, that´s what i did. q At 18:00 24/6/2003 -0400, you wrote: ok, so my movie, while needs much explaining on it's own, shows a method of puppeting a sprite, then adding an instance of a script directly after. in short, you just need to do something like... y = new(script zoom) sprite(i).scriptInstanceList.add(y) Cheers, Evan [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!]
Re: lingo-l scriptInstanceList
while we´re on this subject, what handler should be executed when an instance of a script is added to a sprite scriptinstancelist? the on beginsprite doesn´t seem to be executed, so that´s why i have to send sprites messages. and even those seem not work sometimes. q [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!]
Re: lingo-l scriptInstanceList
25/06/2003 8:59:02 AM, Quixadá [EMAIL PROTECTED] wrote: while we´re on this subject, what handler should be executed when an instance of a script is added to a sprite scriptinstancelist? the on beginsprite doesn´t seem to be executed, so that´s why i have to send sprites messages. and even those seem not work sometimes. q Hey Quixada, Glad you got your scriptInstance issue worked out. Below is the script I use for dynamic sprite creation. It allows me to create a sprite, assign properties like member, ink etc and as many behaviours as I want, all in one call. Also it is designed to use standard behaviour structure, that is you don't have to do anything special to behaviours you want to attach to dynamic sprites. You'll see that it forceably calls the beginSprite handler to make sure the scripts are properly initialized. Also there is code to deal with the endSprite handler. If you want to see it in action along with a demonstration of the pitfalls of dynamic sprites (this is what Kerry mentioned earlier) (and a crude partial work around for the problem) then check out http://www.manibus.com/testzone/dynamicSprite/dynaSprite.dir hth Rob PS if working with dynamic sprites the only real solution for them not interfering with score authored sprites is to dedicate a range of channels for them and never put score authored sprites in those channels --dynamic sprite generation --written by Rob Romanek, [EMAIL PROTECTED] on makeSprite aNum, aProps, aBhvrs --check for valid aNum, the sprite number if not(integerP(aNum)) then return if aNum1 and aNumthe lastchannel then return me = script(dynamicSprite) puppetSprite aNum, 1 --aProps list passed in as defaultProps = [\ #member:member(-1),\ #loc: point(0,0),\ #ink: 0,\ #blend: 100,\ #color: rgb(0,0,0),\ #backColor: 0\ ] --change default props to those passed in c=defaultProps.count repeat with i = 1 to c tProp = defaultProps.getPropAt(i) tValue = aProps[tProp] if not(voidP(tValue)) then aProps.deleteProp(tProp) defaultProps[i] = tValue end if end repeat --add additional props c = aProps.count repeat with i = 1 to c tProp = aProps.getPropAt(i) tValue = aProps[i] defaultProps[tProp]=tValue end repeat --apply them to the sprite c = defaultProps.count repeat with i = 1 to c tProp = defaultProps.getPropAt(i) tValue = defaultProps[i] case tProp of #member: sprite(aNum).member = tValue #loc: sprite(aNum).loc = tValue #ink: sprite(aNum).ink = tValue #blend: sprite(aNum).blend = tValue #color: sprite(aNum).color = tValue #backColor: sprite(aNum).backColor = tValue #rect: sprite(aNum).rect = tValue #rotation: sprite(aNum).rotation = tValue otherwise do sprite( aNum ). tProp = tValue end case end repeat if voidP(aBhvrs) then return sprite(aNum).scriptInstanceList = [me.new()] c = aBhvrs.count repeat with i = 1 to c tProp = aBhvrs.getPropAt(i) tValue = aBhvrs[i] sprite(aNum).scriptInstanceList.add(script(tProp).new()) tvc = tValue.count if tvc then si = sprite(aNum).scriptInstanceList.count repeat with j = 1 to tvc tProp2 = tValue.getPropAt(j) tValue2 = tValue[j] sprite(aNum).scriptInstanceList[si][tProp2]=tValue2 end repeat end if end repeat sendSprite(aNum, #beginSprite) end on endDynamicSprite me if voidP(me) then return if not(objectP(me)) then return sprite(me.spriteNum).memberNum = -1 sendSprite(me.spriteNum, #endSprite) sprite(me.spriteNum).puppet = 0 sprite(me.spriteNum).scriptInstanceList = [] end [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!]
RE: lingo-l scriptInstanceList
while we´re on this subject, what handler should be executed when an instance of a script is added to a sprite scriptinstancelist? the on beginsprite doesn´t seem to be executed, so that´s why i have to send sprites messages. and even those seem not work sometimes. You have probably already seen James' and my latest posts, but I'll expand a bit (been doing that for the last 30 years, actually). As James says, you don't have to have an on new handler. It's implicit. However, if you have an on new handler, you can pass parameters to it when you create the instance. E.g., in your script named setPos: property pCurrentVal property pXPos property pYPos on new me, xPos, yPos, startVal pXPos = xPos pYPos = yPos pCurrentVal = startVal return me End on beginSprite me sprite(me.spriteNum).locH = pXPos sprite(me.spriteNum).locY = pYPos end Then, when you create the instance, pass the values you want for xPos, yPos, and startVal. New() will always execute before beginSprite, even for sprites you manually attach (that is, without setting the scriptInstanceList). The important concept here is instances. When you create the new instance, Director does, as you noted, set aside some memory for that instance. That memory includes the properties for that particular instance. Ten instances, ten sets of properties, each unique to the instance. There is, however, only one copy of the executable code, shared by all instances. If you think about it, it makes perfect sense. Code acts on data, and it acts the same no matter what the data (well, within limits). So, an object really only needs to keep track of its own data--properties and local vars. Hope this helps. Cordially, Kerry Thompson [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!]
RE: lingo-l scriptInstanceList
hi, kerry yes, i don´t have placeholders, but the problem affects sprites on different channels, i mean, i´m looping on frame 1 and creating sprites from channel 2 to 41. if i try to change the parameter on sprite 10 , for instance, on frame 1, all sprites from 2 to 41 change as well. actually, i can use place holders on this project, but that´s weird.it doesn´t work. thanks kerry regards, q btw, zero pixel bitmap? is it possible? At 16:08 24/6/2003 -0400, you wrote: hi, folks it seems i´m going around in circles, so here it is: i´m creating sprites on the fly, then adding a script to them using the scriptInstanceList; that´s ok, it works. the problem comes when i try to change a parameter inside that script in only a specific sprite, because all the sprites have their parameters changed. I'm guessing you don't have placeholder sprites. This sounds like a known issue with sprites created on the fly without placeholders. The issue is actually that fiddling with the scriptInstanceList affects the whole sprite channel--locks it up so other scriptInstanceList changes don't take. The fix is to use placeholder sprites. It only takes a minute to create a zero-pixel bitmap and fill 500 channels with it. Cordially, Kerry Thompson [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!]
Re: lingo-l scriptInstanceList
check out the movie at http://www.evanadelman.com/puppetTest/puppetTest.dir - do you experience the similar problem w/ that movie. it's ok on my win2k, d8.5 Quixadá wrote: hi, folks it seems i´m going around in circles, so here it is: i´m creating sprites on the fly, then adding a script to them using the scriptInstanceList; that´s ok, it works. the problem comes when i try to change a parameter inside that script in only a specific sprite, because all the sprites have their parameters changed. here´s the handle that changes it: sendSprite(pProxima,#revert,1) and here´s the handler that´s on the script added on the fly to several sprites: on revert me,a pChave = a end pProxima is a parameter that changes the number of the sprite to be changed (because they have to be altered based on time), and it doesn´t matter, because if i change this parameter for a number, say 2, the effect is the same: not only sprite 2 pChave is changed. the result is that pChave is changed to 1 on every sprite created on the fly, no matter what. it only doesn´t happen on sprite 1, because it was not created on the fly: the pChave parameter on it remains 0. i tried something like on revert me,a sprite(the currentSpriteNum).scriptInstanceList[1].pChave = a end but same results. i think i don´t need to put the entire behaviors here, because it´s all about how on-the-fly scripts deal with sendsprite messages. win xp, d 8.5.1 thanks, q [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!] -- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ *m u t a n t m e d i a* /solutions for success // // / *Evan Adelman* | 917.916.7378 | 598 Broadway NY NY 10012 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] | www.mutantmedia.com http://www.mutantmedia.com [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!]
RE: lingo-l scriptInstanceList
Kerry I think the problem you are describing is if you create a sprite on the fly in channel 2 frame 5, lets say, and then jump to fram 500 where a score created sprite exists, the script instancelist applied in frame 5 mucks up the score one in frame 500. Let me know if I'm wrong. Nope, Rob, you're right. That's exactly what I was referring to. I'd like to see Qixada's code too. Cordially, Kerry Thompson [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!]
Re: lingo-l scriptInstanceList
hi, rob yes, you´re right, that´s exactly my problem. i´ve made a simple dir just to show what´s happening. here are the scripts: movie script --## on startMovie repeat with i = 1 to 3 puppetSprite i,TRUE sprite(i).member = member 1 of castLib 1 sprite(i).loc = point(400 + random(70),300 + random(70)) sprite(i).scriptInstanceList.add(script(zoom)) sendAllSprites(#change,1) updateStage end repeat end --## the script attached to the sprites, named zoom --## property pTest on beginSprite me pTest = 1 end on change me,a pTest = a end on findout put pTest end --## just create a bitmap on cast member 1 of castlib 1, and if you like put it on channel 4, upper left corner (doesn´t matter where) and assign the script above. it´ll show you how a sprite that was not created on the fly behaves. use sendSprite(anynumberfrom1to4,#change,anyparameteryouwant) on the message window to test. if you type sendSprite(2,#change,10) and hit enter, and then type sendSprite(3,#findout), you´ll see that sprite 3 pTest has changed and are equal to 10, and it shouldn´t, because i´ve sent a message to sprite 2 only. all sprites have changed, except sprite 4, that was not created on the fly. thanks and regards, q At 16:42 24/6/2003 -0400, you wrote: Hi, Kerry suggested one possibility but I think I'm reading your problem a little differently. You have a bunch of sprites lets say 1 to 10 which are all created on the fly sending a message to one of them affects them all right? Kerry I think the problem you are describing is if you create a sprite on the fly in channel 2 frame 5, lets say, and then jump to fram 500 where a score created sprite exists, the script instancelist applied in frame 5 mucks up the score one in frame 500. Let me know if I'm wrong. Anyway I think the problem Quixada is having stems from how the behaviours are attached to the sprite on the fly. Sounds to me like each sprite is not getting a unique instance of the behaviour but rather pointers to the same instance. Quixada if you can post some of your code you use to attach the behaviours that may help us solve the problem. -Rob 24/06/2003 3:42:56 PM, Quixadá [EMAIL PROTECTED] wrote: hi, folks that´s ok, it works. the problem comes when i try to change a parameter inside that script in only a specific sprite, because all the sprites have their parameters changed. but same results. i think i don´t need to put the entire behaviors here, because it´s all about how on-the-fly scripts deal with sendsprite messages. win xp, d 8.5.1 thanks, q [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!]
RE: lingo-l scriptInstanceList
q btw, zero pixel bitmap? is it possible? Possible. Easy. New cast member. Open the paint window. Give the cast member a name. Close the paint window. Check the PI. Width 0. Height 0. Just for the fish, I put my placeholders offstage, too. Cordially, Kerry Thompson [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!]
RE: lingo-l scriptInstanceList
hi, rob yes, you´re right, that´s exactly my problem. i´ve made a simple dir just to show what´s happening. here are the scripts: movie script --## on startMovie repeat with i = 1 to 3 puppetSprite i,TRUE sprite(i).member = member 1 of castLib 1 sprite(i).loc = point(400 + random(70),300 + random(70)) sprite(i).scriptInstanceList.add(script(zoom)) sendAllSprites(#change,1) updateStage end repeat end --## Try adding an on new me handler to your script, and have it return me. Then try creating an instance first, then adding it. newInstance = script(zoom).new() Sprite(i).scriptInstanceList.add(newInstance) Cordially, Kerry Thompson [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!]
Re: lingo-l scriptInstanceList
On Tuesday, Jun 24, 2003, at 16:11 America/Chicago, Quixadá wrote: hi, rob yes, you´re right, that´s exactly my problem. i´ve made a simple dir just to show what´s happening. here are the scripts: The very first thing you should do is put the sendAllSprites call *outside* of your repeat loop. Try this. on startMovie repeat with i = 1 to 3 puppetSprite i,TRUE sprite(i).member = member 1 of castLib 1 sprite(i).loc = point(400 + random(70),300 + random(70)) sprite(i).scriptInstanceList.add(script(zoom)) end repeat updateStage sendAllSprites(#change,1) end Warren Ockrassa | President, nightwares LLC [EMAIL PROTECTED] nightwares LLC | Consulting Programming http://www.nightwares.com/ Developer | Structor, a presentation development/programming tool Info and demo | http://www.nightwares.com/structor/ Author | Director 8.5 Shockwave Studio: A Beginner's Guide Chapter samples | http://www.nightwares.com/director_beginners_guide/ [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!]
Re: lingo-l scriptInstanceList
ok, so my movie, while needs much explaining on it's own, shows a method of puppeting a sprite, then adding an instance of a script directly after. in short, you just need to do something like... y = new(script zoom) sprite(i).scriptInstanceList.add(y) Cheers, Evan Quixadá wrote: hi, rob yes, you´re right, that´s exactly my problem. i´ve made a simple dir just to show what´s happening. here are the scripts: movie script --## on startMovie repeat with i = 1 to 3 puppetSprite i,TRUE sprite(i).member = member 1 of castLib 1 sprite(i).loc = point(400 + random(70),300 + random(70)) sprite(i).scriptInstanceList.add(script(zoom)) sendAllSprites(#change,1) updateStage end repeat end --## the script attached to the sprites, named zoom --## property pTest on beginSprite me pTest = 1 end on change me,a pTest = a end on findout put pTest end --## just create a bitmap on cast member 1 of castlib 1, and if you like put it on channel 4, upper left corner (doesn´t matter where) and assign the script above. it´ll show you how a sprite that was not created on the fly behaves. use sendSprite(anynumberfrom1to4,#change,anyparameteryouwant) on the message window to test. if you type sendSprite(2,#change,10) and hit enter, and then type sendSprite(3,#findout), you´ll see that sprite 3 pTest has changed and are equal to 10, and it shouldn´t, because i´ve sent a message to sprite 2 only. all sprites have changed, except sprite 4, that was not created on the fly. thanks and regards, q At 16:42 24/6/2003 -0400, you wrote: Hi, Kerry suggested one possibility but I think I'm reading your problem a little differently. You have a bunch of sprites lets say 1 to 10 which are all created on the fly sending a message to one of them affects them all right? Kerry I think the problem you are describing is if you create a sprite on the fly in channel 2 frame 5, lets say, and then jump to fram 500 where a score created sprite exists, the script instancelist applied in frame 5 mucks up the score one in frame 500. Let me know if I'm wrong. Anyway I think the problem Quixada is having stems from how the behaviours are attached to the sprite on the fly. Sounds to me like each sprite is not getting a unique instance of the behaviour but rather pointers to the same instance. Quixada if you can post some of your code you use to attach the behaviours that may help us solve the problem. -Rob 24/06/2003 3:42:56 PM, Quixadá [EMAIL PROTECTED] wrote: hi, folks that´s ok, it works. the problem comes when i try to change a parameter inside that script in only a specific sprite, because all the sprites have their parameters changed. but same results. i think i don´t need to put the entire behaviors here, because it´s all about how on-the-fly scripts deal with sendsprite messages. win xp, d 8.5.1 thanks, q [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!] [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!]
RE: lingo-l scriptInstanceList
hey, did i ever tell you guys how much i love this list?! :^)) thanks, kerry, that solved my problem! big hugs, q At 17:22 24/6/2003 -0400, you wrote: hi, rob yes, you´re right, that´s exactly my problem. i´ve made a simple dir just to show what´s happening. here are the scripts: movie script --## on startMovie repeat with i = 1 to 3 puppetSprite i,TRUE sprite(i).member = member 1 of castLib 1 sprite(i).loc = point(400 + random(70),300 + random(70)) sprite(i).scriptInstanceList.add(script(zoom)) sendAllSprites(#change,1) updateStage end repeat end --## Try adding an on new me handler to your script, and have it return me. Then try creating an instance first, then adding it. newInstance = script(zoom).new() Sprite(i).scriptInstanceList.add(newInstance) Cordially, Kerry Thompson [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!]
RE: lingo-l scriptInstanceList
living and learning! :^) q At 17:14 24/6/2003 -0400, you wrote: q btw, zero pixel bitmap? is it possible? Possible. Easy. New cast member. Open the paint window. Give the cast member a name. Close the paint window. Check the PI. Width 0. Height 0. Just for the fish, I put my placeholders offstage, too. Cordially, Kerry Thompson [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!]
lingo-l scriptInstanceList
Howdy all - Having a bit of a problem w/ setting a sprite's scriptInstanceList. I want the new sprite to have a bit of exitFrame functionality, but no mouse functionality so that sprites under it act under their own control. Typically I've done this just by not including mouse behaviors. So, anyway, I guess it would be quicker to show w/ code: behavior creating the new sprite where x is the next empty channel aScript = script(aTest).new(x) sprite(x).scriptInstanceList.add(aScript) then aTest has only on new me, aNumber put aNumber return me end on exitFrame put i have exitFrame Func end now when I do this, i get no passing of mouse events. It's like setting the scriptInstance list fills in the mouseEnter methods if they aren't thereAny ideas? Evan stacey wrote: hahhah- thanks Warren!! I am currently trying to use buddy api- but for whatever reason, i can't get it to recognize that combo - or even control or alt keys- I am using controlDown...putting the focus on the stage... any suggestions? This should be stupidly easy- but now its stupidly stumping. thanks again! s On Tuesday, August 20, 2002, at 12:11 PM, stacey wrote: is it possible to disable the good - ole crtl alt delete command? any suggestions on how to do it? I seem to recall there are Xtras that can -- Buddy API might be one, in fact -- you can hit the list at http://www.updatestage.com/products and see if anything looks promising. Not sure why someone would want to do this- but all the same... The Vulcan nerve pinch isn't just for bailing frozen apps. It can also be used to bypass splash type lockouts, which is not always desirable. Think of a kiosk with an unprotected desktop that has just had its program force quit by a thirteen year old with anger issues. Warren Ockrassa | http://www.nightwares.com/ Director help | Free files | Sample chapters | Freelance | Consulting Author | Director 8.5 Shockwave Studio: A Beginner's Guide Published by Osborne/McGraw-Hill http://shop.osborne.com/cgi-bin/osborne/0072195622.html [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!] -- ... m u t a n t m e d i a solutions for success Evan Adelman | 917.916.7378 | 598 Broadway NY NY 10012 [EMAIL PROTECTED] | www.mutantmedia.com [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!]
Re: lingo-l scriptInstanceList
aScript = script(aTest).new(x) sprite(x).scriptInstanceList.add(aScript) then aTest has only on new me, aNumber put aNumber return me end on exitFrame put i have exitFrame Func end now when I do this, i get no passing of mouse events. It's like setting the scriptInstance list fills in the mouseEnter methods if they aren't thereAny ideas? No where in this code do you make reference to a mouse event. try having a mouse event and then see if you lose mouse functionality. that would be my first suggestion. Brian Douglas (:ub) [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!]
Re: lingo-l scriptInstanceList
Howdy all - Having a bit of a problem w/ setting a sprite's scriptInstanceList. I want the new sprite to have a bit of exitFrame functionality, but no mouse functionality so that sprites under it act under their own control. Typically I've done this just by not including mouse behaviors. So, anyway, I guess it would be quicker to show w/ code: Not too hard. First, though, I assume there actually is a sprite in channel x. You have to explicitly handle mouse events, unless the sprite is invisible. To pass it on up the chain of command (e.g., from a sprite script to a frame script--check Bruce's book for the right order), you would do something like: on mouseUp me pass end on mouseDown me pass end U.S.W. If you want to pass it to a sprite underneath it--that is, in a lower channel, but covered by your sprite--you have to do a little fancier footwork. Something like: property pTargetSprite -- a sprite number on new me, targetSprite pTargetSprite = targetSprite end on mouseUp me sendSprite (pTargetSprite, #mouseUp) end Cordially, Kerry Thompson [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!]
Re: lingo-l scriptInstanceList
Thanks tons -- I guess I'll have to figure out a different way I think -- there could be up to 50 different sprites under the covers waiting for mouse direction. I could cycle through them to see if the clickloc intersects w/ their rectangles, but that seems rather intensive? dunno maybe not so bad when i think of it - maybe that's what I'll end up doing - thanks much, Evan (yeah, sprite(x) actually is puppeted and assigned a member earlier ;) Kerry Thompson wrote: Howdy all - Having a bit of a problem w/ setting a sprite's scriptInstanceList. I want the new sprite to have a bit of exitFrame functionality, but no mouse functionality so that sprites under it act under their own control. Typically I've done this just by not including mouse behaviors. So, anyway, I guess it would be quicker to show w/ code: Not too hard. First, though, I assume there actually is a sprite in channel x. You have to explicitly handle mouse events, unless the sprite is invisible. To pass it on up the chain of command (e.g., from a sprite script to a frame script--check Bruce's book for the right order), you would do something like: on mouseUp me pass end on mouseDown me pass end U.S.W. If you want to pass it to a sprite underneath it--that is, in a lower channel, but covered by your sprite--you have to do a little fancier footwork. Something like: property pTargetSprite -- a sprite number on new me, targetSprite pTargetSprite = targetSprite end on mouseUp me sendSprite (pTargetSprite, #mouseUp) end Cordially, Kerry Thompson [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!] -- ... m u t a n t m e d i a solutions for success Evan Adelman | 917.916.7378 | 598 Broadway NY NY 10012 [EMAIL PROTECTED] | www.mutantmedia.com [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!]
Re: lingo-l scriptInstanceList
Ah - see, I don't want a mouse event in this sprite -- i just want it automatically passed to a lower channel sprite that has a mouse event (like it would if i attached a similar sprite by dragging on the stage or score). If, in authoring, you have in sprite 1 a box w/ a mouse Enter handle that says put hey, where'd the fax machine go then in sprite 2 place a circle that completely covers sprite 1 w/ just the handler exit frame that says put it's in the field getting stomped on to really fine music when you hit play, in the message window you'd see the exitFrame message in sprite 2 a whole bunch of times, and as you roll over the combo, you'd see sprite 1's message (if in fact you roll over sprite 1's rectangle). That's exactly the functionality i want via scriptInstanceList, and it doesn't seem to be avail. Thanks though, Evan brian wrote: aScript = script(aTest).new(x) sprite(x).scriptInstanceList.add(aScript) then aTest has only on new me, aNumber put aNumber return me end on exitFrame put i have exitFrame Func end now when I do this, i get no passing of mouse events. It's like setting the scriptInstance list fills in the mouseEnter methods if they aren't thereAny ideas? No where in this code do you make reference to a mouse event. try having a mouse event and then see if you lose mouse functionality. that would be my first suggestion. Brian Douglas (:ub) [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!] -- ... m u t a n t m e d i a solutions for success Evan Adelman | 917.916.7378 | 598 Broadway NY NY 10012 [EMAIL PROTECTED] | www.mutantmedia.com [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!]
Re: lingo-l scriptInstanceList mouseDown problem
At 9:48 AM +1000 5/15/02, Luke Wigley wrote: Cole Tierney wrote I've got a situation where adding a behaviour to a fully instaniated sprite causes it to block mouse events from other sprites in lower channels. The newly added behavior instance has no mouse events. Director 8 Mac authoring. Any thoughts or similar experiences? Hi, Does the behaviour you are adding have an ancestor property? (Director seems pass the events on to the Ancestors but then doesn't back-track and pass them on to other sprites in lower channels if the ancestor doesn't have the mouse event handler) Luke Bummer. No ancestors unfortunately. Cole [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!]
lingo-l scriptInstanceList mouseDown problem
Anybody ever have trouble with mouse events when adding behaviours dynamicallly? I've got a situation where adding a behaviour to a fully instaniated sprite causes it to block mouse events from other sprites in lower channels. The newly added behavior instance has no mouse events. Director 8 Mac authoring. Any thoughts or similar experiences? Cole [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!]