Re: Just out of curiosity (repeat loop)

2002-09-21 Thread Colin Holgate

>on repeatList aList
>   repeat with i in aList
> put aList.getPos(i)
>   end repeat
>end

Buzz's hidden counter will work, but this one may fail. What happens 
if a later entry in the list is a repeat of an earlier entry?

[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: Just out of curiosity (repeat loop)

2002-09-21 Thread Mark A. Boyd

At 08:08 2002-09-21, Andreas Gaunitz P11 wrote:
>I have often wondered if there's a "hidden counter" somewhere that 
>Director uses when counting throough the items using 'repeat with anItem 
>in aList'? If so, can I check the value of that counter and use it?

I can't speak for how Director does it, but you can get the count of a 
"repeat with i in list" by checking the position of i in the list. Of 
course, this will not work for lists with duplicate entries.

on repeatList aList
   repeat with i in aList
 put aList.getPos(i)
   end repeat
end

repeatList(["a",1,"b",99,"a"])
-- 1
-- 2
-- 3
-- 4
-- 1

So, I guess you could just increment your own variable.

on repeatList aList
   myCount = 1
   repeat with i in aList
 -- do something
 myCount = myCount + 1
   end repeat
end

Which just about brings us back to 'using repeat with i = 1 to aList.count'

If you want to make it slightly more efficient, store the list count in a 
variable rather than getting the count on every iteration.

cnt = aList.count
   repeat with i = 1 to cnt




--
Mark A. Boyd
Keep-On-Learnin' :)

[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: Just out of curiosity (repeat loop)

2002-09-21 Thread Buzz Kettles

At 5:08 PM +0200 9/21/02, you wrote:
>In some cases it's convenient to use 'repeat with anItem in aList', 
>to roll through the entries of a list. However, pretty often I 
>realize I need a counter for one reason or other, so i resort to use 
>'repeat with itemCounter = 1 to aList.count'.
>
>I have often wondered if there's a "hidden counter" somewhere that 
>Director uses when counting throough the items using 'repeat with 
>anItem in aList'? If so, can I check the value of that counter and 
>use it?
>
>No big deal, just curious.

yes, there's a hidden counter.

& if you want it, create it!

hiddenCounter = 0
repeat with anItem in aList
hiddenCounter = hiddenCounter + 1
put hiddenCounter
end


hth

-Buzz

>
>-A.
>
>
>
>[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: combo box - Active X

2002-09-21 Thread Miguel Angel Urbano Ramírez

Hello:

I forget to say that the script I Put it over the sprite (Microsoft Form Combo Box) 
and with the property inspector it was set to behavior.

Thanks in advanced.



Miguel Urbano






[EMAIL PROTECTED] wrote:

>Hello!
>
>Excuse me for my english, but I will try to explain me.
>
>I am doing a projector in wich:
>
>1.-I insert an Active Control (Microsoft Form Combo Box) to select one of many 
>options.
>
>2.- I do a script of type behavior with the next text.
>
>---text-
>
>--Copyright 1999 Chuck Neal 
>[EMAIL PROTECTED] 
>--If you find this code helpful, send me an e-mail and let me know.  :-) 
>
>property startText, choiceList, whatDo, spriteNum 
>
>on getPropertyDescriptionList me 
>  return [#startText : [#format : #string, #default : "DefaultText", #comment : 
>"Default text in drop-box."], #choiceList : [#format : #string, #comment : "List of 
>choices separated by (;)", #default : "Choice 1;Choice 2;Choice 3"]] 
>end 
>
>on beginSprite me 
>  
>  the itemDelimiter = ";" 
>  repeat with x = 1 to choiceList.item.count 
>    addItem(sprite spriteNum, choiceList.item[x]) 
>  end repeat 
>  (sprite spriteNum).text = startText 
>  
>end 
>
>on getBehaviorDescription me 
>  describe = "Combo box startUp script.  Requires the MS Forms Combo Box Active X." & 
>return & "Drop this behavior on a Microsoft ComboBox ActiveX sprite.  This will build 
>and populate the dropdown list.  To retrieve the property just get the text of sprite 
>X property for the ActiveX Sprite." 
>  return describe 
>end 
>
>
>
>-end text --
>
>
>how do I obtain the value of the selected option, and with that value and assign this 
>value to a variable, and with this variable, use a handler to do another script in 
>which we can to go to another movie or another action?
>
>
>Thanks in advanced.
>
>
>
>Miguel Urbano
>
>
>__
>The NEW Netscape 7.0 browser is now available. Upgrade now! 
>http://channels.netscape.com/ns/browsers/download.jsp 
>
>Get your own FREE, personal Netscape Mail account today at 
>http://webmail.netscape.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!]
>

__
The NEW Netscape 7.0 browser is now available. Upgrade now! 
http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.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!]



Just out of curiosity (repeat loop)

2002-09-21 Thread Andreas Gaunitz P11

In some cases it's convenient to use 'repeat with anItem in aList', 
to roll through the entries of a list. However, pretty often I 
realize I need a counter for one reason or other, so i resort to use 
'repeat with itemCounter = 1 to aList.count'.

I have often wondered if there's a "hidden counter" somewhere that 
Director uses when counting throough the items using 'repeat with 
anItem in aList'? If so, can I check the value of that counter and 
use it?

No big deal, just curious.

-A.



[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!]



combo box - Active X

2002-09-21 Thread directorurbano

Hello!

Excuse me for my english, but I will try to explain me.

I am doing a projector in wich:

1.-I insert an Active Control (Microsoft Form Combo Box) to select one of many options.

2.- I do a script of type behavior with the next text.

---text-

--Copyright 1999 Chuck Neal 
[EMAIL PROTECTED] 
--If you find this code helpful, send me an e-mail and let me know.  :-) 

property startText, choiceList, whatDo, spriteNum 

on getPropertyDescriptionList me 
  return [#startText : [#format : #string, #default : "DefaultText", #comment : 
"Default text in drop-box."], #choiceList : [#format : #string, #comment : "List of 
choices separated by (;)", #default : "Choice 1;Choice 2;Choice 3"]] 
end 

on beginSprite me 
  
  the itemDelimiter = ";" 
  repeat with x = 1 to choiceList.item.count 
addItem(sprite spriteNum, choiceList.item[x]) 
  end repeat 
  (sprite spriteNum).text = startText 
  
end 

on getBehaviorDescription me 
  describe = "Combo box startUp script.  Requires the MS Forms Combo Box Active X." & 
return & "Drop this behavior on a Microsoft ComboBox ActiveX sprite.  This will build 
and populate the dropdown list.  To retrieve the property just get the text of sprite 
X property for the ActiveX Sprite." 
  return describe 
end 



-end text --


how do I obtain the value of the selected option, and with that value and assign this 
value to a variable, and with this variable, use a handler to do another script in 
which we can to go to another movie or another action?


Thanks in advanced.



Miguel Urbano


__
The NEW Netscape 7.0 browser is now available. Upgrade now! 
http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.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: converting 8.5 files to 8.0

2002-09-21 Thread Colin Holgate

>i tried the method of resource edinting, etc. unfortunately it 
>didn't quite work for me, as i ran out of time and could not keep 
>trying something i couldn't be sure to work for me.


Brian's said that it worked out for him. If you tried it and failed, 
I guess you must have missed a step, or typed a wrong number.

[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: converting 8.5 files to 8.0

2002-09-21 Thread nik crosina

hi,

i tried the method of resource edinting, etc. unfortunately it didn't quite work for 
me, as i ran out of time and could not keep trying something i couldn't be sure to 
work for me.

but: i came up with the desparate idea to simply copying assets from v8.5 to v8.0, and 
as far as i can remember it worked (with some adjustments to the score)

i did it on the computer that v8 installed; downloaded and installed the v8.5 trial 
version (from the macromedia site), opened the 8.5 file and a new 8.0 movie and 
started copying!

that was definitely the fastest method i can recommend..
if the movies you have to convert are very big / complex, etc. then that is quite 
probably a long process ;-)
[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!]



image scroller_archive

2002-09-21 Thread sandeep


many thax to evan and howdy
how do u search a problem in the archive. do u guys dnlodthe archive and read 
throughout.
i think that will take ages.
any other way around
thanx


 dear list
> is there any archive for the list
> so that the questions that r answered a number of times before should not be asked 
>time and again
> thanx
[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: converting 8.5 files to 8.0

2002-09-21 Thread Colin Holgate

>I have a number of Movies in Director 8.5 format that I need to 
>share with my students who only have director 8.0.
>

Sometimes I'm glad I wrote this article!:

http://www.director-online.com/accessArticle.cfm?id=1034


Darrel added in the figures for going from 8.5, so you should be able 
to work out how to go from 8.5 to 8.0. Read from about half way down.

[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!]



converting 8.5 files to 8.0

2002-09-21 Thread Brian Goldfarb

I have a number of Movies in Director 8.5 format that I need to share 
with my students who only have director 8.0.

Does anyone know of a way of converting 8.5 files to 8.0 format...or 
at least copying groups of cast members or lingo scripts into 8.0 
files.
  I am working on the Mac platform.

Brian
-- 

=+-+=+-+=+-+=+-+=+-+=+-+=+-+=+-+=+-+=+-+=+-+=+-+=
Brian Goldfarb
Assistant Professor
Department of Communication
University of California, San Diego
La Jolla, CA 92093

phone: 858-822-2239
Email: [EMAIL PROTECTED]
=+/-+=\+-+=+-+=/+-+=+-+\=+-+=+/-+=+-+\=+-+=/+-+=+-\+=
[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!]