Hi Rob,
I like it!!! it looks a lot cleaner than nested tell statements so I think I'll use that from now on, it's annoying that director can't figure out the right scope to be in, perhaps they should work a little bit harder at MM to earn that paycheck they think they deserve.
Rob Romanek wrote:
The problem you raise is not an issue of tell being obsolete or not but strickly the problem of mouseEnter/Within/Leave targeting out of scope. Basically I find I do not use tell any more in DMX04 the new DOM renders it not essential. That does not mean that it won't work anymore (there are other lingo commands which are considered obsolete and still work) But for what you are doing I would restructure your code as follows[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!]
--original code
Property arrow, icon
on mouseEnter me tell the stage tell channel("Navigation").sprite icon = sprite(me.spriteNum) arrow = channel("Highlight").sprite end tell end tell end
--new structure
Property arrow, icon
on mouseEnter me
_player.activeWindow.movie.channel("navigation").sprite.movie.call(#mEnter, me)
end
on mEnter me icon = sprite(me.spriteNum) arrow = channel("Highlight").sprite end
Now that may seem more convoluted to some but personally I like the way it targets the proper scope and then allows me to write my code in a standard way without the nested tell statements.
Both ways work. And yes I wish they had fixed the enter/within/leave problem too.
hth,
Rob
On Mon, 13 Sep 2004 11:11:38 +0100, Evil Kosh <[EMAIL PROTECTED]> wrote:
Hi guys,
okay, I'd just like to quash this right here and right now, "tell" is NOT obsolete
MM says in the Director manual that tell is apparently now obsolete and you dont need to use it anymore, except when of course you have to use it and perhaps MM should come forward and explain why I had to use tell in order to get my project to work, tell obsolete? nah, I dont think so.
I got a director movie, which I use as a LDM within my main movie, within the LDM movie I've got a mouseEnter, Within and Leave events, I put some code in there, like below (I'll top post this code, so you can read this, THEN read the code):
as you can see in my code, I've commented out all the tell commands, WITHOUT them, none of this code works, what happens, is that me.spriteNum is 2, which is NOT a sprite on the (main movies, but is within the LDM)stage, so it doesnt do ANYTHING, on the other icon I dropped this behaviour onto, it's spriteNum is 3, which happens to coincide with a bitmap of 810x610, but when I highlight the icon within the LDM, it highlights sprite(3) from the main movie!!!!! not the LDM. so I get a highlight (which is what the script does) over the sprite(3) within the main movie, as opposed to sprite(3) within the LDM, marvellous! The Hack is to get the LDM to tell the stage, to tell the LDM what to do, what a hack.....
Version 10+ of director and they havent got something like this working yet, people have only been requesting (and subsequently ignored for the most part) for the last 5+ years......
So remember people, whatever MM says, TELL IS NOT OBSOLETE!!!
[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!]