Re: lingo-l CounterClockWise

2004-10-04 Thread Carl West
Pedja wrote:
Hey Ben
That is creative thinking...I have no clue if it will work, I'll do a
test in a minute but I like the mental process! Never thought about
using angles, it won't be 360degs though if it's a polygonal shape but
still it absolutely makes sense..
Total up the degrees-from-straight and you'll get +/- 360.
--
Carl West
mailto:[EMAIL PROTECTED]
http://carl.west.home.comcast.net
[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 Negative verbose statement

2004-09-29 Thread Carl West
Petro Bochan wrote:
Hello,
In this behavior:
property aSprite
property aValue
on beginSprite me
  set the aSprite of me to sprite the spriteNum of me
  set the aValue of me to 9
end beginSprite
on doSomething me
  set the aValue of me to the -aValue of me
end doSomething
--
using verbose syntax I'm trying to set property variable aValue to a
negative meaning. I know I can do this like set the aValue to -9 or
aValue = -aValue, but I want it the way this is done in doSomething
handler. Director complains saying Expected end of statement. I played
around with the brackets but to no result. Is there a workaround about this?
My test (MX, Mac)
in a parent script named 'bar':
property pFoo
on new me
  return me
end
on setme me, arg
  pFoo = arg
end
on test me
  put pFoo,pFoo
  put -pFoo,-pFoo
  put me.pFoo,me.pFoo
  put -me.pFoo,-me.pFoo
  put -(me.pFoo),-(me.pFoo)
  put the pFoo of me, the pFoo of me
  put -the pFoo of me, -the pFoo of me
  put -(the pFoo of me), -(the pFoo of me)
end


In the message window:
boo = new(script bar)
boo.setme(7)
boo.test()
-- pFoo 7
-- -pFoo -7
-- me.pFoo 7
-- -me.pFoo -7
-- -(me.pFoo) -7
-- the pFoo of me 7
-- -the pFoo of me -7
-- -(the pFoo of me) -7
boo.setme(-1234567)

boo.test()
-- pFoo -1234567
-- -pFoo 1234567
-- me.pFoo -1234567
-- -me.pFoo 1234567
-- -(me.pFoo) 1234567
-- the pFoo of me -1234567
-- -the pFoo of me 1234567
-- -(the pFoo of me) 1234567

--
Carl West
mailto:[EMAIL PROTECTED]
http://carl.west.home.comcast.net
[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 Obfuscation was: OT: don't do that

2004-09-18 Thread Carl West
roymeo wrote:
...
a time to use good variable names and a time to do a string-replace on 
all the valiables with l0O11lO-type strings to obfuscate your code for 
 a client who you're worried about paying you,
Insidious.
The first eight could be:
1001110
100111O
10011l0
10011lO
1001l10
1001l1O
1001llO
and that's being nice.
They don't need to be that short or nicely ordered.
And the routine to run through the code to do that is relatively 
painless (for globals and properties anyway. How to identify locals on 
the fly?). You could even save out the replacement list for later 
restoration.

Hmmm...
--
Carl West
mailto:[EMAIL PROTECTED]
http://carl.west.home.comcast.net
[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 Getting separate parts of a number

2004-09-03 Thread Carl West
Carl West wrote:
...
splitList = 
[[integer(pVal+[.5,-.5][1+(pVal0)]),pVal-integer(pVal+[.5,-.5][1+(pVal0)])],[0,0]][1+(pVal=0)] 
Oh never mind, Colin's answer can be made into one line and it beats the 
pants off us:

splitList = [bitor(pVal,0),pVal- bitor(pVal,0)]
4x faster than mine which was 1.5x faster than Pedja's
--
Carl West
mailto:[EMAIL PROTECTED]
http://carl.west.home.comcast.net
[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 Getting separate parts of a number

2004-09-02 Thread Carl West
Tab Julius wrote:
This is all you need:
  intPart =integer(myFloat - .5)
  floatPart =myFloat - intPart

Unless myFloat is negative.
It's the whole rounding-up/-down/truncating thread again. With a twist.

At 10:32 PM 9/1/04, John Waller wrote:
Hi,
I have a floating point number, e.g. 45.6200, and I want to be able to 
store the whole number part and the fraction part separately,...

--
Carl West
mailto:[EMAIL PROTECTED]
http://carl.west.home.comcast.net
[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 Getting separate parts of a number

2004-09-02 Thread Carl West
Pedja wrote:

Damn...I've got it now with maths(ish)! 
It's a single liner and works with both positive and negative numbers
correctly.

 pVal = -18267.8932
  splitList = [integer((abs(pVal)-(abs(pVal) - integer(abs(pVal)-0.5)))*
integer(getNormalized(vector(pVal,0,0))[1])),(abs(pVal) -
integer(abs(pVal)-0.5)) * integer(getNormalized(vector(pVal,0,0))[1])]
 put splitList
 -- [-18267, -0.8932]
I've just done a quick test and this approach is 9.5 times faster than
the string approach...I've checked on 200 iterations. 
Without the vector math it gets 15.5 times faster but that was the only
way I could determine if the number is positive or negative without an
if statement:))) If someone knows an easier mathematical method to get
the positive/negative value let me know as this is something that is
bugging me for a long time and I bloody do intend to use it!

Try this, it uses the 'if'-less 'if' of lists*.
splitList = 
[integer([pVal+[.5,-.5][1+(pVal0)],0][1+(pVal=0)]),pVal-integer([pVal+[.5,-.5][1+(pVal0)],0][1+(pVal=0)])]

It would be shorter if I could ignore the special case of zero:
splitList = 
[integer(pVal+[.5,-.5][1+(pVal0)]),pVal-integer(pVal+[.5,-.5][1+(pVal0)])]

* With care you can even make it a 'case'-less 'case'. Ick.
I'd hate to have to de-bug this kind of code.
--
Carl West
mailto:[EMAIL PROTECTED]
http://carl.west.home.comcast.net
[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 Drawing curves on the fly

2004-08-29 Thread Carl West
Diego Landro wrote:
...  i have two maps, onw with roads and onw without and i thought Director
should have some sort of masking like after effects, but the only mask
effect i could find was mask ink which i cant vary through time.
You want to work with the alpha channel of whichever map is on top.
Use copy pixels to paint in the roads if they're on top or paint out the 
plain map if it is on top.

If this is just a straight animation you could just chop up the art work 
and do it in the score. It bypasses a lot of elegant Lingo, and makes it 
hard to edit, but if you KNOW for sure what the animation will look like 
you can do it that way. The roots of MacroMind Director lie in frame 
animation. Sometimes it's easiest to go back to the roots.


--
Carl West
mailto:[EMAIL PROTECTED]
http://carl.west.home.comcast.net
[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 D5-7 help files

2004-07-31 Thread Carl West
Bertil Flink wrote:
You may want the Dir 4 help file too.
Quite a change btw D4  D5 with the introduction of behaviors (as I recall).
Want it?
If you really want historical, I may be able to dig out whatever there 
was for D3. But that'll mean digging out the old IIci I ran it on.

Oh, I also have:
Director 7.0 Help
and
Director 7.0 Help.1
another 15.9MB
--
Carl West
mailto:[EMAIL PROTECTED]
http://carl.west.home.comcast.net
[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 excluding duplicates from a list

2004-07-12 Thread Carl West
Brennan wrote:
On 11/7/04 at 19:43, Matt Wells [EMAIL PROTECTED] wrote:
 

 repeat with x = aa to ab
   boldListC.add(x)
 end repeat

Why not check to see if the value is already in the list BEFORE you add
it.
  repeat with x = aa to ab
  
if boldListC.getPos(x) then
  next repeat
end if

boldListC.add(x)

  end repeat
What the heck, shorten it to:
repeat with x = aa to ab
  if not boldListC.getPos(x) then boldListC.add(x)
end repeat
--
Carl West
mailto:[EMAIL PROTECTED]
http://carl.west.home.comcast.net
[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 SIL again

2004-04-19 Thread Carl West
Kurt Griffin wrote:

...
 t = script(MoveObject_Behavior).new(sprite(1))
sprite(1).scriptInstanceList.add(t)
Or, if you know that this is the only behaviour you want on the sprite:

sprite(1).scriptInstanceList = [t]

--

Carl West
mailto:[EMAIL PROTECTED]
http://carl.west.home.comcast.net
[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 error messages

2003-06-18 Thread Carl West
Howdy-Tzi wrote:
 
... Also note that parents which have not
 been cleared from memory can have the same effect, so if you happen to
 load one file at the beginning of the day with an alertHook or similar
 setting, then ext file you load, if you don't quit Director, will have
 that resident still.

I've had instances of parent scripts hang around from one project to the next in a 
Director session. Weird errors, very confusing. Just issuing clearGlobals() in the 
message window has always solved it. 

-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 easing equations

2003-06-11 Thread Carl West
Colin Holgate wrote:
 
 Hmm, no problem with this procedure here:
 W2K, DMX.
 
 Not sure why the File Open way didn't work, but a way that does work
 is to type this in the message window:
 
 go movie http://www.evanadelman.com/easing/easingEquations.dir;

Heehee, too slick! Love it.

I simply went to the .dir URL and used File  Save As...  and saved as 'source'

Mac, Netscape 4.78, OS9.2
-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 Write in order

2003-06-08 Thread Carl West
Teo Petralia wrote:
 
 Hello!
 Another question for the day. I'm trying to write in a field on the
 fly information about products. I would like to write this product in
 a decent format, I mean in line like:
 
 Bla Bla Bla Bla Bla Bla Bla
 Paris   NO  Why Not That's fine
 RomeOK  So SO   Maybe
 Vancouver   NNN DSD K
 
 How can I get something like this. I tried to calculate the spaces
 between a row and another and then add the missing spaces but I don't
 know why it doesn't work.

It depends on the font the information is being displayed in. Most fonts are what's 
called 'proportional', that is each letter gets the amount of space on the line 
(setwidth) that it needs to look good. For example, the 'M' will get much more space 
than the 'i'. Each letter has been adjusted to look its best and the quanta are 
generally very small for these adjustments ( 1/1000 of a letter). A few fonts 
('courier' for example) are what's called 'monospace', each letter has the same 
setwidth as every other. Doing what you want with a monospace font should be 
relatively easy, with a proportional font it is likely to be impossible to do by 
simply adding spaces.

(I was a type designer at Bitstream for four years, every now and then I get to use a 
little bit of what I learned there)

This is probably a place for imaging lingo. Or multiple fields, arranged dynamically.

-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 transparency in Mac OS X icons

2003-06-08 Thread Carl West
Slava Paperno wrote:
 
 ... In OS 9 I used to be able to
 paste a PNG image into the Get Info Icon, and what was transparent in the
 PNG remained transparent in the icon.

Hmmm. Where were you _copying_ the image from? 
All I've managed to get is rectangles with white where I wanted transparency.
-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 Projectors for WinXP affected by custom icons?

2003-06-06 Thread Carl West

The D8.5 projectors I'm sending to my client are being 'rejected' by his system as, 
not valid win32 application. They work on Win 98. He's running XP. 

Is XP more sensitive to the layout of custom icons? 
Could someone point me to a projector that is known to work on XP so I can look at the 
icon layout?
-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 Projectors for WinXP affected by custom icons? Addendum

2003-06-06 Thread Carl West
I wrote:

The D8.5 projectors I'm sending to my client are being 'rejected' by his system as, 
not valid win32 application. They work on Win 98. He's running XP. 

He's got DMX, I tried to tell him how to make his own stub projector, making sure that 
FileIO was included, but apparently the ModifyMovieXtras dialog is different in MX 
from 8.5 so I couldn't help him there. So I've told him to copy the Xtras folder from 
his Director into the folder of my stuff. Maybe that'll work. 

What're my chances? 

What've I missed?



--
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 GetPixel() to compare colors

2003-06-05 Thread Carl West
Howdy-Tzi wrote:
 
 On Wednesday, Jun 4, 2003, at 08:53 America/Chicago, Rodrigo Peres
 wrote:
 
  There's a way to compare if colors are
  greater than or darker than???
 
 Try using color objects and palette index conversions:
 
 oColor = color(#rgb, 255,255,255)
 oColor2 = color(#rgb, 0,0,0)
 put oColor.paletteIndex  oColor2.paletteIndex
 -- 0
 put oColor.paletteIndex  oColor2.paletteIndex
 -- 1

Works in the extreme case, but it gets shaky in the middle values unless you're using 
the greyscale palette:

cyan = color(#rgb, 0, 255, 255)
dkcyan = color(#rgb, 0, 204, 255)
dkbrn = color(#rgb, 51, 0, 0)

-- System - Win palette
put cyan.paletteIndex 
-- 1
put dkbrn.paletteIndex
-- 179
put dkcyan.paletteIndex
-- 184

-- System - Mac palette
put cyan.paletteIndex 
-- 180
put dkbrn.paletteIndex
-- 179
put dkcyan.paletteIndex
-- 186


-- Greyscale palette
put cyan.paletteIndex 
-- 85
put dkbrn.paletteIndex
-- 238
put dkcyan.paletteIndex
-- 102

-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 GetPixel() to compare colors

2003-06-05 Thread Carl West
Colin Holgate wrote:
 
 Here's a possibly good way to do it (I say possibly, because I didn't
 test it, but it feels like it ought to work). If you're using 8.5 or
 later, you could do this:
 
 c1 = rgb(100,100,100)
 c2 = rgb(123,100,100)
 v1 = vector(c1.red,c1.green,c1.blue)
 v2 = vector(c2.red,c2.green,c2.blue)
 put v1.distanceto(v2)
 -- 23.
 
 You would count colors as being the same if their distance from the
 comparison color is less than a certain amount.

Rodrigo asked:
 There's a way to compare if colors are
 greater than or darker than??? 

To compare lightness/darkness you'd need to get their distances from vector(0,0,0) and 
compare those

Just totaling the r,g, and b values should give a reasonable measure of the lightness 
of a pixel.

-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 Custom icon screwing up Windows projector

2003-06-04 Thread Carl West

I'm using ResHack to change the icon on my standard windows projector.
When I finally succeed, the projector errors saying that it needs the Shockwave Player.

Where do I look for an answer to this?

-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 Custom icon screwing up Windows projector

2003-06-04 Thread Carl West
Carl West wrote:
 
 I'm using ResHack to change the icon on my standard windows projector.
 When I finally succeed, the projector errors saying that it needs the Shockwave 
 Player.

Worked it out. Fortunately I'm using D8.5. 
The trick was getting ResHacker to look at the .skl file (All Files [*.*], doh. Hey, 
I'm a Mac user, I forget that stuff sometimes), 
Save out the existing icons as a .ico file,
Use that file as a guide to building a new .ico file in Icon Edit
Save _that_ .ico file
Use ResHacker to put it into a copy of Projec32.skl (save the old one) and keep a copy 
of this new one in the project folder for later use.

A bit of jiggering about, but it works.


-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 Dynamic scripts?

2003-06-03 Thread Carl West
Jeremy wrote:
 
 When creating dynamic sprites with puppet = true and setting the member
 and all, is there a way to then assign a script to the sprite so that I
 can give it rollover and mouse behaviors?

Write the rollover and mouse behaviors as parent scripts and apply them thusly:

  sprite(x).scriptinstancelist = 
[new(scriptrolloverParent),new(scriptmouseyStuffParent)]

or

 sprite(x).scriptinstancelist.add(new(scriptrolloverParent)
 sprite(x).scriptinstancelist.add(new(scriptmouseyStuffParent)

Same result, the latter's more flexible, the former's more exact.
Watch you don't apply a script twice if you use .add, it can lead to very weird 
behaviour and it's hard to find.

G'night.

-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 masking out video background

2003-05-31 Thread Carl West
[EMAIL PROTECTED] wrote:
 
 So you basically want to chromakey out the background, only showing the
 video foreground - the 3d animation.
 
 Could I ask, since it's a 3d generated fire thing, why can't you render
 out a number of png/alpha'd files and create an animtion from that either
 using lingo (thereby having no directToStage problems) or bringing the
 sequence into flash and thereby retaining your alpha'd background?

He's on the right track, I'd say. You can get away with a very few frames of fire, 
say, 12 or so and show them randomly or psuedo-randomly whilst varying the amount 
they're squashed, squeezed and flipped.
Hmm... playtime.



-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 Making fire was:masking out video background

2003-05-31 Thread Carl West
Carl West wrote:
 ...
 He's on the right track, I'd say. You can get away with a very few frames of fire, 
 say, 12 or so and show them randomly or psuedo-randomly whilst varying the amount 
 they're squashed, squeezed and flipped.
 Hmm... playtime.

Playtime is over. Spent too much time on the pot. Oh well.

http://h00050207be9f.ne.client2.attbi.com/fire/index.html

-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 Why do fonts change appearance when embedded?

2003-04-03 Thread Carl West
Daniel Plaenitz wrote:
 
 On Monday, Mar 17, 2003, at 23:42 America/Chicago, Alan Neilsen wrote:
 
 Why does text appear to lose quality of appearance when I change the font
 from say Arial to embedded Arial *. 
 ...
 This was discussed when director got font embedding (d6 ? d7) and there
 should be a technote about his at www.macromedia.com (The last time I
 checked it /support was accessible with unsupported browsers like opera)

There should be, perhaps, but I can't find it, I've got a project with an embedded 
font whose letterspacing is so bad it's considered a bug. I've gotta do something.

I'm left to wonder if Director's 'goofing' of the font on import is the same every 
time or can I try again and again until I get a useful version?

The project doesn't have a huge amount of text. I'm toying with writing a processor 
that goes through and fixes the charspacing on the offensive characters.
-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 Cross-tool question: alphaThreshold

2003-03-30 Thread Carl West
Does Authorware have an equivalent to Director's alphaThreshold property for bitmaps 
with alpha channels?

-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 wait

2003-03-27 Thread Carl West
Irv Kalb wrote:
 
 The best way to achieve something like this is to do move the sprite
 at every frame event...

If you know how far you want it to go and how long you want it to take to get there, 
at each enter/exitframe you can check the current time/tick/millisecond and compare 
that to the start and end times, get a factor out of that and apply it to the loc of 
the sprite taking into account the start and end locations. 

Hmm... where should the sprite be _now_?

The motion will be as smooth as the speed of the machine will allow and still end when 
and where you want it to.

-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 Apple Menu/Clipboard Persistence?

2003-03-18 Thread Carl West

I've written a little piece that takes the text from the clipboard, processes it and 
writes the result back to the clipboard.

In general, it works fine. I select and copy the text I want processed, double-click 
my projector, it pops up, does the thing and quits. When I paste again, I get the 
processed text.

BUT! If I put the projector or an alias of it into the Apple Menu Items folder and 
actually access it through the Apple Menu... It works the first time. After that, 
regardless of the text I've selected (and pasted again just to be sure it's in the 
clipboard) I get that same text from the first time, re-processed. If I run the 
projector directly again, it works. If I run it from the Apple Menu again, I get the 
text from the most recent directly-launched run, re-processed.

I'm missing something here.
How is it holding onto this information?
And more importantly, what can I do to stop it?

MacOS 9.2.2, Dir 8.5, standard projector, minimal Xtras included.


-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 Re: Apple Menu/Clipboard Persistence?

2003-03-18 Thread Carl West
Brennan wrote:
 
 On 18/03/2003 at 12:01 PM, [EMAIL PROTECTED]
 wrote:
 
 Carl West [EMAIL PROTECTED] wrote:
 
 
  I've written a little piece that takes the text from the
  clipboard, processes it and writes the result back to the
  clipboard.
 ...
  BUT! If I put the projector or an alias of it into the Apple
  Menu Items folder and actually access it through the Apple
  Menu... 


... I've observed - especially
 in more recent versions of OS9 - that 'old' clipboard text sometimes hangs
 around on a per-app basis. 

Yeah, come to think of it, I've seen that.


... I use a neat little utility called OSA Menu which
 allows me to run scripts from the menu bar at any time. Interestingly, all
 clipboard operations run from this menu fail. It's a known issue, and may be
 related in some way to what you are seeing.
 
 ... (Maybe you should
 switch to Applescript, which is arguably more suitable for tweaking strings
 than launching a whole multimedia engine).

There's that. I'm swatting a mosquito with a shovel, but, hey, I'm pretty good with a 
shovel.

 
 Sorry I can't be of more help.

Pointing out to me that I'm not actually missing something and that it really is a 
wall that I'm beating my head against is a huge help. I'm just going to leave my 
shovel on the desktop. It's not quite as convenient, but it _works_ from there.

-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 line break

2003-03-17 Thread Carl West
DT-Rene Vazquez wrote:
 
 Hi, how can I insert with lingo in a string expression a line break
 after a word and then another word

thisText = some amount of text  return  Another line of text

-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 was comparing 2 images

2003-03-10 Thread Carl West
Take Seb's plan and modify it slightly:

Have a list of rects, one for each checkbox on the form. Be sure each rect is big 
enough to handle variations in the printing and scanning of the form. If you can, be 
sure the form is designed with these problems in  mind (lots of white space around the 
check boxes).

Cycle through the list of rects and use them in place of 'startImg.rect' in line 2 of 
the second section of Seb's averaging technique (below) to look at each rect and see 
if it is dark enough to be considered marked. 

It would be a very good idea to have a portion (or two or three) of the form that is 
supposed to be white, then you can check those first and use the result for a 
reference. If someone copies the form on a crappy copier or colored paper, you want to 
be able to handle it.

- Carl


Sebastien Portebois wrote:
 
 Hi rodrigo,
 
  I don't need to compare two images but confirm if the checkbox is
  filled or
  not. For example, someone fill a test and then I scan the page and check
  throw the checkboxes for it answers and returns that was filled, so I can
  compute if the answer is right or not.
 
 if your working from scans, then checking for identical images would return
 wrong values, as two scans of the same image might differ.
 
 IMHO an other approach would be to test the average value of this checkbox :
 if it's still withe/light gray (e.g. it's not ckecked), the value will be
 very different from a checked box (darker color)
 
 the idea then is to read the average color of the image, and then compare
 with a threshold.
 
 To set this threshold, the best thing is to choose a set of various scans,
 then read all the average values, and see where unfilled values are
 situated, as well as checked ones.
 
 at last, here comes a little handler to return you a 1x1 image filled with
 the average colo of the input image. you just have to getPixel this single
 pixel to know the avergae color of the whole image you've send to this
 function
 
 hope that make sensen
 seb
 
 on average (startImg) 
   -- ACTION :
   --   return a image which color is the average of the whole pixel
   --   panel of the startImg given.
   --
   -- INPUT  :
   --   startImg #image : the image to parse
   --
   -- RETURN :
   --   VOID : startImg is not an image
   --   #image : the resulting image
   ---
 
   -- 1 - check input
   if (ilk(startImg)  #image) then return VOID
 
   -- 2 - do the average stuffs
   average   = image(1,1,startImg.depth)
   average.copyPixels(startImg, average.rect, startImg.rect)
   returnImg = image(startImg.width, startImg.height, startImg.depth)
   returnImg.copyPixels(average, returnImg.rect, average.rect)
 
   -- 3 - return the result
   return returnImg
 end -- average method




-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 Is this an error?

2003-03-06 Thread Carl West
Kurt Griffin wrote:
 
  on prepareMovie
  on keyDown
  --yada yada
  end keyDown
  end prepareMovie
 
 And, by the way, which event triggered --yada yada?

If all the previous discussion is correct, 'keyDown'.
The 'on keyDown' would end the 'prepareMovie' handler and the 'end prepareMovie' would 
be superfluous.

Works that way for me, I can throw in as many 'end's as I like.
Mac D8.5
-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 object / stopmovie question.

2003-03-06 Thread Carl West
[EMAIL PROTECTED] wrote:
 
 If I create a script object -- you know, the whole 'me' thang - would  the
 object receive a 'stopmovie' call?

A quick test says no. 

The movie script 'on stopMovie' would have to call the object's 'stopMovie' handler. 
Or more manageable: it calls the 'stopMovie' in an object that's been kept apprised of 
the births of the objects...


in the Objects' parent scripts:

global Census -- the instance of the tracking object

on new me
Census.newBirth(me)
end

on stopMovie me
  Yadda Yadda
end



in the Census object:

property censusList
on new me
  censusList =[]
end

on newbirth me, newbornName
  censusList.add(newbornName)
end

on stopMovie me
  repeat with x = 1 to censuslist.count
censusList[x].stopmovie()
  end repeat
end




in the moviescript:

on stopMovie
  Census.stopMovie()
end

 
Seat of the pants code. Untested. Good luck. Many possible error conditions not tested 
or accounted for.
-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 LDM and Child Script Objects

2003-02-08 Thread Carl West
Eric Greene wrote:
 
 I'm trying to import a Director file by using 'Link to External File',
 but am not having any success. The behavior scripts in the LDM won't
 run. I've made sure 'Enabled Scripts' is on in the property inspector.
 
 The LDM is a Director movie that has two simple Parent Scripts and some
 sprites. When the mouse activates the 'on mouseEnter' or 'on mouseUp'
 handlers, the sprites call new child objects that attach themselves to
 the sprites and de-attach themselves once they are done. Everything
 works fine in the original movie, but when I put it as an LDM in another
 movie the behaviors do not run.
 
 Is it not possible to do this?

In my experience, you're going to have to find a way to make whatever you want to have 
happen in the LDM, happen in terms of members or objects, not sprites. When it's an 
LDM, _everything_ in it has just the one sprite number that the LDM has on the stage.
-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 Creating a cuepointing tool

2003-02-01 Thread Carl West
[EMAIL PROTECTED] wrote:
 
 Unfortunately I think that's the only way you'll be able to do it
 (applescript).
 
 I've been wanting direct hooks into qt editting for a while - ie copying
 from one video and creating a new one, or taking bits and pieces of an mp3
 and making a new file with all those sequenced bits.

To do it from Director, you'd probably have to use Glen Picher's BinIO Xtra and bury 
yourself fairly deeply in the QuickTime file spec for a long time to pull it off.

Neat and fun to do? Yes, in a perversely geekish way.
Commercially worth the time spent? I'm dubious.

There's a supposedly cross-platform scripting language/tool like unto AppleScript that 
might be useful. I've never messed with it and I've forgotten it's name at the moment, 
but it is regularly mentioned on the various AppleScript lists.

Good luck Kurt.

-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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: AW: lingo-l create a mask of an image

2003-01-22 Thread Carl West
Andreas* Gaunitz* wrote:
 
 http://lumpymuffins.home.attbi.com/masking
 
 It's a little bit rude, it's on a tight repeat loop, but it listens
 at the end of a cycle.
 
 --
 Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com
 
 Looks nice! It closed it's own window immediately and then froze
 explorer. My comp crashed. :-/  In Opera it looked pretty though.

Ooh. sorry about that. I've made it more polite now.
-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 content of the TextMember2

2003-01-22 Thread Carl West
universal2001 wrote:
 
 ...
 but I have 4 cast libabries and the one that I want is the first word of the
 first member of the 4th castLib
 


This worked for me:

firstWord = (member text of castlib 2).text.word[1]


-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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: AW: lingo-l create a mask of an image

2003-01-21 Thread Carl West
Michael von Aichberger wrote:
 
  'Massage' the 24-bit image first, thinking out loud:
  Make another image object the same size that is some appropriate shade of
 grey
  Copy the second image onto the first using an appropriate ink (probably
 blend, lighten or darken)
  Copy the resulting image into a 1-bit image
 
 Hi Carl,
 
 thanks for your answer, I have played a lot with these inks, but I just
 don't get it.
 If you or someone else could be a little more specific, I'd really
 appreciate it.

Works on my machine:

on makemask mem, thresh
-- thresh is the threshhold value where the mask changes from black to white (0..256)
  original = member(mem)
  hite = original.height
  wdth = original.width
  thresh = thresh + 4  -- fudge factor, dunno why, but it works
  amount = abs(128 - thresh)
  theInk = [33,35][1 + (thresh  128)]   -- either Add Pin or Subtract Pin
  
  tempImage = image(wdth, hite, 32)
  tempImage = original.image.duplicate()
  
  greyImage = image(wdth, hite, 32)
  greyimage.fill(original.rect, rgb(amount,amount,amount))
  
  
  tempImage.copypixels(greyImage, original.rect, original.rect, [#ink:theInk])
  
  maskmem = new(#bitmap)
  maskmem.Image = image(wdth, hite, 1)
  maskmem.image.copyPixels(tempimage, original.rect, original.rect)
 
  tempImage = void
  greyimage = void
  
end

You could even skew the mask toward different colors by messing with the rgb value 
greyImage gets filled with.

-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
[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: AW: lingo-l create a mask of an image

2003-01-21 Thread Carl West

I had some fun with it at
http://lumpymuffins.home.attbi.com/masking

It's a little bit rude, it's on a tight repeat loop, but it listens at the end of a 
cycle.

-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
-
[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 create a mask of an image

2003-01-20 Thread Carl West
Michael von Aichberger wrote:
...
 Imagine a 24-bit color image.
 
 If I copyPixel this image into a 1-bit image, then I get kind of a mask,
 some pixels are white, others are black. 
...
 Now to my question: How can I achieve the same effect, but define another
 threshold for the separation, lets say a very bright grey?


'Massage' the 24-bit image first, thinking out loud:


Copy your image into an object

Make another image object the same size that is some appropriate shade of grey

Copy the second image onto the first using an appropriate ink (probably blend, lighten 
or darken)

Copy the resulting image into a 1-bit image



-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
[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 [OT]Exporting sound from mpg file.

2003-01-20 Thread Carl West
Brennan wrote:
 
 Andreas Gaunitz  wrote:
 
  Elvin Certeza wrote:
  Hello list, I have been trying to export  sound  from my mpg movie... using
  premier 6, ...

  1) Try to export the whole movie + sound as a quicktime (standard
  procedure). Re-import the quicktime, then export sound.
 
 This wont work. QuickTime can't demux these files when exporting so you always
 lose the sound.
 
 If you're using a Mac, try using a utility like bbDEMUX
 
 http://sourceforge.net/projects/macbbdemux


 Andre's procedure worked for me in Premiere 6 with Quicktime 5 on Win 98 in fact, 
it's not clear I even had to do the double export. (It was a quick test, not an 
exhaustive survey)

macbbdemux is not working for me on my G3 running 9.2.2 with QT 5.02.
Any idea what the system requirements are for it? I can't find any documentation.


-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
[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 Director/Authorware/Other Question

2003-01-15 Thread Carl West

I'm writing an article for a graphics magazine that'll have a title something like: 
How to make buttons that will keep your programmer happy. I know that the techniques 
I plan to describe work in Director, I'd like to find out how they'll play in 
Authorware or for that matter other multimedia authoring tools.

Director handles images with alpha channels and lets you set the Alpha Click Threshold.
What about Authorware? Other tools?

Off-list replies are probably appropriate. Up to you.

TIA.

-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
[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 FindingNotWantedFonts

2003-01-14 Thread Carl West
Bruce Powell wrote:
...
 QUESTION: Is there some way for me to locate all font typefaces used by
 castmember? It could even be a space with a not wanted font on it.


I was unable to put the font of a particular character in a field so I took this route
(tested in 8.5 Mac):


on findfont cLib, soughtFont
  mems = the number of castmembers of castLib cLIb 
  put soughtFont  found in:
  
  repeat with x = 1 to mems
if getpos([#field, #text, #richtext, #button], member(x).type) then
  testmem = duplicate(member(x, cLib))
  
  charCount = member(testmem).text.char.count
  repeat with y = 1 to charCount
if member(testmem).font = soughtFont then
  put member(x, cLib)  character  y
end if
delete member(testmem).char[1]
  end repeat
  
  erase member(testmem)
end if
  end repeat
end


example call:

findfont(1,Arial)

It's pretty verbose, but it's pretty thorough too.

Have a ball.

-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
[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 Percentage calculations

2003-01-11 Thread Carl West
Brad Hile wrote:
 
 Just wondering if anyone has a better way to work out percentage values.
...
 I've tried
 set the floatprecision=2
 eq=PercentAddition)/100
 
 but it always returns 0.00

To avoid getting an integer result you need to introduce a non-integer. 

You could use:

eq=PercentAddition/100.0

or 

eq=PercentAddition/float(100)

or

eq=float(PercentAddition)/100



But this won't work because the result is already an integer before you take the 
'float' of it:

eq=float(PercentAddition/100)

-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.
   - Isabella, Measure for Measure, Act 3 Scene 1
[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 Writing sound members

2003-01-08 Thread Carl West
Evan Adelman wrote:
 
 ... gotta love
 email misunderstandings. i was curious about what the original poster,
 Carl, was trying to do. i should have stated more clearly: all true.
 now, Carl, you've got my curiosity going
 ... though -- if you're not
  providing samples, where is the origination of the sound? through
  different clips the user supplies? just tones? .?

In fairly close succession I did a project that assembled audio clips into sentences, 
and I built a tool that reads in an AIFF file of say a vocabulary list being read and 
writes out the individual words to individual AIFF files.

In the process of learning to write AIFF files at all, I was generating samples by 
formula (mostly sine waves), saving them to external files and playing them back to 
make sure they worked.

With those two concepts floating in my head I started to think about stringing 
phonemes together, trying to find formulae for phoneme waveforms, and maybe, just 
maybe, synthesizing speech (or music). 

All idle thoughts really, pie-in-the-sky stuff. 

A slightly more down to earth use might be the ability to produce sound effects as 
needed and appropriate to changing situations.

Yeah, it would be a lot like imaging lingo, but for sound.

-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.

   - Isabella, Measure for Measure, Act 3 Scene 1
[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 Writing sound members

2003-01-07 Thread Carl West
Andreas Gaunitz P11 wrote:
 
 This is a matter of curiosity right now.
 
 In the past, I've used Glen Picher's BinIO Xtra to read and write
 external .aif files and have since been intrigued by the idea of
 using lingo to create or modify a sound member directly in the cast.
 
 Possible? Where would I start? Is there an Xtra?


 First I want to say is I don't know. But I can do some reasoning:
 Changing something in the cast means that you will have to either a)
 change the projector binary on the disk (not what you want) or b)
 Find the audio file representation in RAM and write to that RAM spot.

That's what I was suspecting.

 AFAIK there are no inbuilt methods and no Xtras for altering an audio
 file/ RAM chunk, like eg imaging lingo does with an image.

And that's what I feared.

-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.

   - Isabella, Measure for Measure, Act 3 Scene 1
[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 Trying to recreate this in Lingo

2003-01-07 Thread Carl West
[EMAIL PROTECTED] wrote:
 
 Hi. I'm currently trying to use Lingo to recreate this interactive piece that I 
found on the internet a while ago -
 
 http://www.bbc.co.uk/arts/digital/yourwork/a_anthony.shtml
 
 Anyway, I'm wondering if anyone could help me with creating this, any example code 
or files would be greatly appreciated (and I'll be forever in your debt!). So far, my 
attempts have been fairly unsuccessful.

I've got a start at it here:
http://lumpymuffins.home.attbi.com/squares/sensitiveSquares.html

I didn't deal with sound.  You could write an object to keep track of the sounds or 
you could kick a global around to keep track of which channel has the oldest sound in 
it, either to interrupt or to see if it's done. Eight sounds should be more than 
enough to play at one time.

-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.

   - Isabella, Measure for Measure, Act 3 Scene 1
[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 how to get the brows window open?

2003-01-06 Thread Carl West
Evan Adelman wrote:
 
 ahhh - that would make so much more sense. lewis, to get a file open
 dialog box i've used the mui xtra, w/ code
 something around:
 
 g=new(xtra mui)
 filename = FileOpen(g,C:\)

Or filextra3
but neither seems to be shockwave-save. 
And therefor no help here.



-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.

   - Isabella, Measure for Measure, Act 3 Scene 1
[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 Writing sound members

2003-01-06 Thread Carl West

This is a matter of curiosity right now.

In the past, I've used Glen Picher's BinIO Xtra to read and write external .aif files 
and have since been intrigued by the idea of using lingo to create or modify a sound 
member directly in the cast. 

Possible? Where would I start? Is there an Xtra?


-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.

   - Isabella, Measure for Measure, Act 3 Scene 1
[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 pointToChar with centered text members

2003-01-04 Thread Carl West
Jim Schwartz wrote:
 
 I'm having a problem with pointToChar when the user clicks to the left of
 the text in a one word text member sprite. It returns 1 just as if the user
 has clicked on the first letter.
 
 The contents of the member change dynamically, but always consists of one word.
 
 The text is center justified, so there's empty space both to its left and
 right.
...
 Any ideas?

Lead the word with a space (and follow it with one too to keep the balance) and offset 
your character counting by one.

-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.

   - Isabella, Measure for Measure, Act 3 Scene 1
[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 randomize

2003-01-03 Thread Carl West
Roland wrote:
 
 Hello all
 
 I do have 4 text labels and 4 small graphics (which do belong together) that
 I would like to place on the stage at random. Could someone give me a
 pointer on how to approach this?

seat-of-the-pants code, possibly full of syntax errors:

locList = [a list of at least four points]
textOffset = point(how far from the graphic the text label should be)
repeat with x = 1 to 4
  randNum = random(locList.count)
  sprite(x).loc = locList[randNum] -- place the graphic
  sprite(x + 4).loc = locList[randNum] + textOffset  -- place the text label
  locList.deleteAt(randNum)
end repeat

This will place the graphics with their labels at a random four of the locations in 
the list in random order.


-- 
Carl West   [EMAIL PROTECTED]   http://eisen.home.attbi.com

I have no superfluous leisure; my stay must be stolen out
of other affairs; but I will attend you awhile.

   - Isabella, Measure for Measure, Act 3 Scene 1
[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 Message BOX ?

2002-12-31 Thread Carl West
Or maybe, depending on what you want, a text or field member whose text 
gets changed by code.

something happens, either an event or a calculation
member(MessageBox).text = Hey! Something happened

the message will stay there until you change it.

[EMAIL PROTECTED] wrote:

Sure. Alert Whatever

Or if you want more control, look at either:
1) Buddy Api xtra (baMsgBox())
2) Mui xtra (really great control but a bit complicated)
3) using a movie in a window.

On Tue, 31 Dec 2002, Meiky - wrote:

 

Hi,
any ideas how to make message box in director?

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 script errors

2002-12-30 Thread Carl West
kevin pyatt wrote:



Below is the sample code. Part 1 works, part 2 does not.When i run 
part 2 i get the Script error: object expected 
member(Eqnm1box).text=gquestion. Any ideas. I greatly appreciate 
your time.


It doesn't look like gquestion is actually being declared as a global or 
a property. Without that 'gquestion[rnum3]' is probably void. Try 
putting this in  before the offending line:

put gquestion[rnum3], gquestion, rnum3

And watch the mesage window.


then put :

global gquestion
global comboquestion
global decompquestion
global rnum1, rnum2, rnum3

in at the tops of the scripts involved and see if it works any better.

- Carl


[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 1000 sprites - there must be another solution

2002-03-09 Thread Carl West

Michael von Aichberger wrote:
 
 Hi list!
 
 I want to create a form that enables the user to edit database entries. For
 that I have a grid of 25 rows and 40 lines. Gives you 1000 cells. If I use 1
 editable text sprite per cell, I need all possible 1000 sprite channels and
 I haven't any left for background and title graphics. There must be another
 solution to this - can anyone help?

You'd have to do a little more keeping track of your data and probably
disallow the use of the Return character, but you could do it with 25
text members of 40 lines each.

-- 
Carl West
mailto:[EMAIL PROTECTED]
http://people.ne.mediaone.net/eisen

Wann ich aufhöre zu lernen, begrabe mich.
[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!]