>>The purpose of using 'repeat while not the mouse Down' is so that a
>>mouseDown event would interrupt the repeat  loop.
>>
>>I mustn't do this?
>
>No, that's fine. I just wasn't sure what you were doing.

Are there other ways to interrupt repeat loops?



>Is setAt a handler you wrote? If not, it behaves like the example you found 
>in the Lingo dictionary.


No, I did not write it any handler.  Actually, I do not know what handler to 
use. Perhaps you may be so kind as to enlighten me.


>I don't think it's what you want here.


If you know what I want, why don�t you tell me?



>I'm not quite following the logic. Is this a handler for a behavior your 
>are going to attach to your scrolling sprites?


Yes. I am trying to re-write the code I gave you earlier, which you said was 
inefficient.

I have already used the code you have helped me to write in my program. I 
apologize, but I would still like to learn how to improve on the code that I 
have written myself.


>on mouseUp me repeat with i = 1 to 100   repeat with sprNum = 1 to 20    
>set the LocH of sprite sprNum = (the LocH of  sprite sprNum)-i     
>updateStage   end repeat  end repeat end



I�m still trying to figure out how to redo it.  I gathered from what you 
have written that it is not advisable to have a loop within a loop, as the 
code I had written was taking too long to execute, so I�m thinking of ways 
to remove the inner loop. Any suggestions?



>What are you going to do with the variable setMoveAmt?
>As your code is there, all it is doing is setting the value of >setMoveAmt 
>over and over, but again, I'm not sure what setAt does for >you.


If I don�t use it, I use what? The following is what you wrote in an earlier 
message. I was trying to modify it to fit into what I am trying to write.  
How else do I do it?


>So, you could add a handler like this:

>on setMoveAmt me, moveAmt   pMoveAmt = moveAmt end
>Then you could do a sendSprite(sNum, #setMoveAmt, newAmt) to set the >value 
>from outside the sprite.


Could you please explain what you wrote? What do you mean?


>
>>I'm not trying to build a list, I'm trying to move sprites. Many times, I 
>>have difficulty trying to create what I want. It's tough.
>
>Programming's tough ^_^

You don�t need to rub it in. I�m already very, very frustrated.


>Like I said, I'm not quite following your logic. Do you have a clear
>picture of the steps you want to program? I'm asking because it's essential 
>that you be clear in your mind how you are going to do something--get your 
>algorithm clear, then the syntax will follow.
>


If you do not follow it, do you think I will be able to do so?


Even if I did understand what I wanted to write, the syntax doesn�t follow.



>>Is this the way to use the getAt function?
>>
>>On MouseUp me
>>Repeat with myIndex = 1 to 100
>>gMoveAmt .getAt( )
>>end repeat
>>end
>
>No, not really. You have to have a list to retrieve the values from.

So what do I do? How do I know which which functions to use? Most of the 
time this is the confusing part.


>You use properties when you want to encapsulate something--for example, a 
>particular sprite's screen position.


Why do you need to encapsulate it? Isn�t a property just a characteristic of 
the object?


>Globals are used for data that you want to share globally, among all 
>objects.


So, am I correct to say that properties are used for individual objects but 
when they are used by all objects, they become globals?

Could it then  be compared to local and global variables?

>
>>on getPropertyDescriptionList
>>  if the currentSpriteNum = 0 then exit
>>
>>  return \
>>[ \
>>#pMoveAmt: \
>>[ \
>>  #comment: "Distance to move? ", \
>>  #format:  #integer, \
>>  #default:  5 \
>>] \
>>]
>>end getPropertyDescriptionList
>>
>>I'm sorry, but I don't think  you initialized variables in the example 
>>above?
>
>It's initialized, but you can't see it. Remember,
>getPropertyDescriptionList is a very special handler in Director. Notice   
>the line that says #default: 5? If you don't change that number when you
>attach the behavior, it's initialized to 5. Otherwise, it's initialized to
>the new value you type in.

I note that the script you have written is attached to each sprite I wish to 
move. Yet the way you have written it differs.

In Special Edition using Macromedia  8,  Pg282,
the author uses the on exitFrame handler to  loop.  Is this what I should be 
doing instead?


Pg 283 the author has avoided hard coding the default value.  He specified a 
range for the default.   May I do it this way too?

on getPropertyDescriptionList
  if the currentSpriteNum = 0 then exit

  return \

[ \ #pMoveAmt: \
[ \  #comment: "Distance to move? ", \
  #format:  #integer, \
  #default:  5 \
#range: [#min : -20,  #max:20] \]
end getPropertyDescriptionList




>>When I use the getPropertyDescriptionList handler, am I going into Object  
>>Oriented programming?
>
>You're heading there.


At the rate I�m going, it�s going to take me 10,000 light years?


I apologize for asking so many questions but I really do not understand.  
Instead, it is becoming more and more confusing. Where is the light at the 
end of the tunnel?


I�m sorry that I have taken so much of your time and I do appreciate the 
trouble you go into trying to explain things to me.


Thanks very much
Genevieve



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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!]

Reply via email to