Re: lingo-l excluding duplicates from a list

2004-07-12 Thread Brennan
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


Brennan

[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 Attempting to change a cast member that has original data for editing... hundreds of times

2004-07-09 Thread Brennan
One REALLY irritating thing about recent versions of Director is that when
you try to modify imported graphics files, you get the dialog box which
begins with 

Attempting to change a cast member that has original data for editing.

Worst of all, you get this even if you haven't selected 'Include original
data for editing' in the import dialog. (That's a bug, right?)

This would be ok if you only ever attempt to modify a single cast member,
but it's almost sisyphian if you have done Modify-Transform Bitmap on a
couple of hundred members. 

You have to click 'Continue' for each and every member, and of course the
dialog doesn't tell you which cast member it is you are clicking
'Continue' for, neither is there a checkbox for 'same for all'.

Anyone else end up pulling out hairs over this?

OK, well if you are running OSX Panther (or later) you can use system
events (via Applescript) to click the 'Continue' button repeatedly while
you can do something more useful with your time.

tell application System Events

 tell process Director MX
  
  repeat while true
   
   set dlogTxt to (value of (static text of window 1)) as string
   
   if dlogTxt begins with Attempting to change a cast member then
   
if name of buttons of window 1 contains Continue then

 try
 
  click button Continue of window 1
  
 on error
  exit repeat
 end try
 
end if

   else
exit repeat
   end if
   
  end repeat
  
 end tell
 
end tell

After you run the script it will hang, you then have to switch to Director
manually, and the script will do the right thing. Unfortunately Director
ignores the 'activate' Apple Event when there is a modal dialog open (or
something. Duh).

Brennan

[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 The Xtras

2004-06-21 Thread Brennan
On 20/6/04 at 23:33, Roy Crisman
[EMAIL PROTECTED] wrote:

 this may not apply any more, but it was once recommended to
 NOT include Xtras that you don't need.  Maybe with today's
 processors it isn't that big a deal, but if you're not using
 PNG's, why have all that code at the ready.

It's always worth making your software nimble if you have the opportunity!

Unless the deadline is really tight, I usually take the time to make the
Xtras folder as small as possible near the start of the project, so I can
always test from the Projector engine.

Projector launch times still suffer from bloated Xtras folders on
'average' hardware. The more there is to load, the longer it takes.

No matter how fast your computer is, it's never fast enough, right? 

(Or as Nikolas Wirth put it Software gets slower faster than hardware
gets faster.)

In the future we'll be launching Director projectors (running in XP and
OSX emulators) while our machines render cinema quality 3D animations and
decompress streamed music in the background.

Excellent thread. I hope some up-to-date table of 'necessary' Xtras comes
out of this. (As a start, a tool which gathers all the Xtras whose names
don't contain Agent, Dialog, Options etc. and copies them to a new
Xtras folder located beside your current movie would be handy).

BTW, Petro: the MUI xtra is not needed for projectors unless you
explicitly use it in your code. The UIHelper Xtra is mostly used in
authoring. It has some neat features for 'tool movies' (such as opening a
cast member's default editor or bringing authoring windows to the front).

Squish is used for compressing dcr media, and should not be required at
runtime.

Brennan

[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: OOT: Quicktime (RE: lingo-l playing MPEG from server)

2004-05-12 Thread Brennan
On 12/5/04 at 10:11, Viktor Iwan [EMAIL PROTECTED] wrote:

 Have any of you ever analyze what people in lynda.com do when create
 quicktimes movies... 
 
 Settings I found for DV Shooting(when I open it in Adobe Premier):
 30 fps
 33 seconds
 Sorenson Video 3
 Audio 22.050 Khz-Mono (Qdesign 2)
  only takes 5 Megs !
 Result: good quality, dropped frames, but overall it's ok !

I made it 5fps. How are you getting those files? Try opening this one in
directly QuickTime Player (File-Open URL)

http://movielibrary.lynda.com/demo/learn_dirmx/02.02_sprites.mov

Brennan

[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 Flash components: mouseUp and mouseUp Outside

2004-05-10 Thread Brennan
I am finally getting some time with DMX 2004, and one thing I noticed was
that the old fashioned hypercard pushbutton from the toolpalette has been
replaced by a flash component. 

(You can still get the old hypercard button from the Insert menu).

Onto the nub of my gist:

If you put a lingo script on a flash component push button, say

on mouseUp
  alert mouseUp
end

...and then click down on the button, but release outside it, you still
get the mouseUp event. That's surely not correct. I should get
'mouseUpOutside', and absolutely not 'mouseUp' under those circumstances.
What's up with that?

Worse; I don't get a 'mouseUpOutside' message either. That could be very
problematic. I am inclined to lock all GUI elements while tracking the
mouse. 

The way this is working, you can mouse down on one button, and mouseUp on
another. The one you mouseUp on responds when your mouse enters it, but
it's the one you clicked first that gets the mouseUp message. Ugh!

Presumably a Flash component doesn't have to behave this way, it's just
sloppy design, but can this be fixed by us, or do we have to wait for
macromedia to do it?

BTW 'Hypercard' style buttons behave 'properly' (except that they too
'rollover' when you've clicked something else.

Brennan 

[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 OS X Xtra to call UNIX shell?

2004-04-13 Thread Brennan
On 12/4/04 at 15:22, 2702NET [EMAIL PROTECTED] wrote:

 Yeah, I'm just using text files to pass data back and forth. Not 
 exactly an elegant solution.
 
 I've just purchased zScript and am going to give that a try as well.

zScript is a really terrific Xtra, although it needs better error
reporting. (Failed scripts just bail without a return value). If you've
been faffing around with text files and Applescript applets, you are in
for a good time.

zScript would have been a big hit if it had been cheaper IMNSHO. Now
Applescript studio can do most of the same stuff for free. Director is
still good when you need to escape from the Aqua GUI, though. 

FWIW I'm digging around in the open source MPEG compression tools, LAME,
demuxing, and stuff like that. There are so many free UNIX multimedia
programs it's unbelievable. Loads of good ones for still images too.
Getting that power inside Director opens up some very interesting
possibilities.

 Short of using zScript or doing what I'm doing, I'd say there really is 
 no lightweight/elegant solution.

Too bad. I wish I could get my head around the XDK. 

Being able to invoke shell scripts from lingo would also make it possible
for developers to extend Director with the C language and generic tools,
instead of being forced to learn all the complexities of Macromedia's open
architecture with CodeWarrior and/or Visual Studio (the only two
development tools supported by the XDK). 

It's a whole lot easier to learn to write a UNIX executable from scratch
than it is to ascend the himalayas of Xtra development.

Brennan

[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 OS X Xtra to call UNIX shell?

2004-04-12 Thread Brennan
Hi folks,

Does anyone know if there's an Xtra available which will allow us to make
shell commands under OSX?

This would be extremely handy and powerful, because you can include UNIX
executables in projector bundles, and use Director to build a GUI around
them.

I know I can call 'do shell script' with Bruce Epstein's 'zScript' but
that's overkill (and rather expensive). 

I'm hoping for a simple, lightweight solution.

Does such a beast exist?

Brennan

[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 OS X Xtra to call UNIX shell?

2004-04-12 Thread Brennan
On 12/4/04 at 10:06, 2702NET [EMAIL PROTECTED] wrote:

 How about an apple script executable (containing 'do shell script') 
 which you can launch from your projector?

How would I pass data to the applescript app? Text files? The clipboard?
Ugh.

It's doable, but just too much overhead. I want a lightweight solution. 

I can do much of what I want with Applescript studio, but as soon as I
move away from standard Aqua widgets and into a more custom GUI, it gets
nasty.

Brennan

[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 do I use a text track in a rtsp streamed Quicktime?

2004-03-22 Thread Brennan
On 22/3/04 at 15:39, Rik Green [EMAIL PROTECTED]
wrote:

 Does anyone have any ideas why a rtsp streamed QuickTime no
 longer displays it's enabled text track? When the same
 QuickTime is played via a http progressive download, it
 displays OK!? When I view movie properties and look at the
 format of the streaming track, it displays the media type as
 text, and the compression as text, so I presume it's being
 streamed correctly?
 
 The main reason is that I need to access this track within
 Shockwave so I can sync other media. I could do this with the
 movie time of the movie, but cue points from the text track
 would just make life so much easier.
 
 I've exported as a hinted movie from QuickTime with optimise
 hints for server on, so I presume it's hinted properly.
 
 Any thoughts would be appreciated,

Hmm. It sounds to me there *may* be something awry with your streaming
text track, but in any case, I don't think you can stream chapter tracks.
According to the (excellent) book 'QuickTime for the Web' the reason for
this is that 'they're special'. Right. It does specifically say that you
can stream text tracks, though.

OTOH, I searched the Quicktime talk list and came up with this exchange:

   Hi. I have created a mov of a presentation with a chapter
   track, so that people can jump to particular slides (it is
   also hinted for streaming). The QuickTime Player displays
   the chapters fine, but when I view the mov embedded in a
   Web page, the chapter pull down menu doesn't show up. I was
   under the impression that the QuickTime plugin supported
   chapters. Is there a trick I am unaware of? Thanks. -Paul
 
  From: Kevin_Burton [EMAIL PROTECTED] 
 
  Hi Paul
 
  Had the same thing ... what I did was create the streaming
  file and put it on the streaming server (no text tracks on
  the streaming server).
 
  Then I created a movie with just the text track (chapter
  track). Next I opened the streaming movie using Open URL in
  New Player in the Quick Time player. Then I selected the
  whole streaming movie (CTRL A) and copied it (CTRL C). Then
  I closed the streaming movie. Then I went back to the
  original text movie, select all (CTRL A) and pasted.
 
 That's Add rather than Paste. And I needed to be reminded to
 put the timeline pointer to the beginning of the chapter track
 movie.
 
  Now in the text movie there is a track called STREAMING
  TRACK - set this as the track the chapter track is
  associated with.
 
 I hadn't done this kind of association before...Get Movie
 Properties, select Chapter Track on the left pull-down menu,
 select Make Chapter in the right, and there you Set Chapter
 Owner Track to Streaming Track.
 
  Now save this movie as self-contained. You will now have a
  very small pointer movie that you put on your HTTP server
  and embed in your page. This movie will have the chapter
  tracks and will start playing the streaming movie.
 
  Hope this helps
 
  Kevin

If you get all this working (please let us know, or post some docs with
your results at DirectorWeb or something) then you may not be out of the
woods:

I have no idea whether Director will see the track properly (never tried
it). I know that dynamic text tracks are not seen properly by Director,
which suggests that Director creates a lookup table of all text samples
when it loads a Quicktime movie. This could be problematic. Again, I'd be
very interested to hear what you find out.

Depending on what other content you are syncing, you might find that you
get far better results using Livestage to author your project. That way
you only have to worry about a single plugin, instead of requiring both
shockwave AND quicktime, which is a significant barrier.

Brennan

[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 Midi and Director

2004-03-17 Thread Brennan
On 17/3/04 at 13:24, Valentin Schmidt [EMAIL PROTECTED] wrote:

 - There is unfortunately no easy way to use QT musical instruments
 interactively on windows, although this could be implemented, and in
 fact I'm thinking about trying myself to create a simple scripting xtra
 which can do it.

If you make a wired quicktime movie in livestage pro, you can fire off
individual QTMA events that way. You can build a GUI out of Quicktime
sprites and run it inside Director. In the browser, i would dispense with
shockwave and do the whole thing in Quicktime.

Check this site out for some dynamic QTMA examples:

http://www.smallhands.com/home.htm -particularly the 'toys' section.

Unfortunately, there's no supported way for lingo to communicate with
wired quicktime movies, although there are some hacks which work.

(If anyone is going to make an Xtra, they might consider opening general
wired actions to lingo instead, i.e. so that we could send messages to
wired movies, which would give us MIDI and a whole lot more in one fell
swoop).

Brennan

[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: QuickTime Director

2004-03-17 Thread Brennan
On 17/3/04 at 09:39, macmec [EMAIL PROTECTED] wrote:

 I don't know if this will help or not, but this comes from Sorenson's 
 site
 
 Problem:
 When playing a Sorenson Generated (Sorenson Video 3 or Squeeze) 
 QuickTime file (MOV) on a Windows based computer (running Windows 2000, 
 NT4, or XP) the QuickTime player crashes when a window either in front 
 of or behind the QuickTime player is moved or opened.
 
 Solution:
 When generating the output file, turn off B-frames (Bidirectional 
 Prediction) from the Encode tab of the Sorenson Video 3 codec settings.
 
 It's worth a try.  It's possible too that the codec is too old on QT 5, 
 like you suggested.  If the above suggestion doesn't work, try 
 compressing with Sorenson 2, if that's an option.  When I export from 
 QT I get the option of Sorenson 3 or just Sorenson.  Play around with 
 that a little.

Sorenson3 should work with QT5.x, although i seem to remember there were
teething troubles with some of the very earliest releases. I might be
imagining it. (Colin, does that ring bells?)

BTW, there's an excellent resource here for checking codecs against
QuickTime versions:

http://www.simnet.is/klipklap/quicktime/

I'd like to see more detail in the point releases, but it is still pretty
good if you have to deliver for an older install.

Brennan

[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 'auto distort' screwed up when generating more than 90 bitmaps

2004-03-13 Thread Brennan
On 12/3/04 at 08:49, Colin Holgate [EMAIL PROTECTED] wrote:


 Well, even I don't use the tool, but it was easy to figure out the 
 problem. It's not a bug, it's a rounding issue.

Hmmm. No, still a bug, surely, because it's supposed to map the full
transformation over the desired number of cast members. 

 You'll notice that 91 
 rotations totals about 3/4 worth,because:
 
 put (360/91) * 91
 -- 273

OK, what about skew or perspective? 360 doesn't seem quite so meaningful
in those situations.

 Did you try it with 120 bitmaps? Works fine.

Gretchen MacDowell pointed this out to me too. Well, ok. Given that the
docs on this feature are pretty thin, we can't expect too much. Still, it
doesn't behave as I would have expected. If the docs mentioned rounding
errors or 'trig-friendly' numbers, I might be more amenable to calling it
something other than a bug.

(Anyone remember the 'Noh Tale to Tell' example in 'Learning Director 4'
used auto distort to make the cartwheels turn? Brr!).

Brennan

[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 'auto distort' screwed up when generating more than 90 bitmaps

2004-03-12 Thread Brennan
I just discovered in Dir 8.5 and MX(9) that 'auto distort' is not working
properly when generating more than 90 bitmaps. 

I don't have D7 installed any more, or I would test that. My guess is that
this is an old bug, and that it hasn't been fixed in MX 2004.

Steps to repro:

New bitmap member, draw a circle with a small mark at '12 oclock'
Select all
Click 'rotate 90' four times
Menu - Xtras - Auto Distort
Generate (anything up to) 90 new members

Actual result - Full 360 rotation is represented in the generated
sequence.

Now, try the same again, but this time generate 91 (or more) members

Expected result - the last member should be look almost exactly the same
as the first one - a full 360 degree rotation.

Actual result - Seems to get to about 280 degrees of rotation by the last
member, rather than the full 360. (Rough guess)

Screwing up at 90 hints at some less-than-smooth trigonometry under the
hood, although this issue is not peculiar to bitmap rotation: 'Warp' also
has a similar issue. (Didn't try 'skew' or 'perspective').

Another thing when doing 'auto distort' - if you use 'rotate right' (the
one with the 'clockwise' icon) the generated sequence is
*counterclockwise*. If you use 'rotate left', the generated sequence is
clockwise. (This has been 'broken' for as long as I remember, and remains
counter intuitive).

Workaround (hah!) is to use imaging lingo (slower, and requires coding
experience). Anyone written a tool miaw to make 'auto distort' obsolete?

(I also noticed that 'auto filter' slipped out of MX without a murmur. I
actually had this working at one time, but it was pretty horrible. I think
it's a shame we can't use 'filter bitmap' in imaging lingo.).

You might not think anyone uses 'auto distort', but I do, especially when
I am teaching, because it's a quick way of getting an animated series of
bitmaps together.

Brennan

[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 filmloop issue

2004-02-19 Thread Brennan
I've just discovered an interesting filmloop issue which probably also
applies to LDMs. I'm seeing this in DMX (D9)

As usual, I should mention that this is an undocumented unsupported
feature I am messing with, so I am not expecting things to work entirely
as expected. Luckily there is a workaround.

I sometimes use filmloops as a rectangular 'mask' for simple zoom effects,
rotation etc.. For example, I scale the inner sprites a little bit when
the mouse enters and it gets 'cropped' by the filmloop. I know I could use
imaging lingo and get the exact same effect, but this approach is a bit
easier, because sprites are often easier to manipulate than images.
(IMNSHO).

OK, here's the problem. 

You have a filmloop in frame A and the same filmloop member in the same
channel in frame B, but as a seperate sprite (i.e. not in the same
'span'). 

Here's a crap ascii representation where 'f' represents the filmloop
sprites referring to the same member.

Markers:A  B


a channel   f--f



If you change the rect of one of the filmloop sprites (with the 'tell
sprite' syntax) in frame A and then jump to frame B, the modified rect
hangs around in the new frame. Worse, if other instances of the filmloop
are on stage in both frames, they too will inherit those modifications
made to the rect when entering the new frame!

If two instances of the same filmloop are on stage at the same time,
modifications to the sprites inside do not 'leak' into the other
instances. It is only when moving *directly* to another frame where the
same filmloop members are in the exact same channels that this leakage
occurs.

The workaround is to set the filmloop media to itself before leaving the
frame - for example on endsprite. I use this same trick if I set other
filmloop properties such as loop, crop or center or else they don't update
on stage.

I am curious whether this is also true in DMX2004 with or without the new
syntax for referring to objects inside filmloops-

Here's a behavior to test the issue out. Inside your filmloop, make sure
you have a sprite in channel 1. (I could have included code for hunting
valid sprites inside the filmloop, but that is beside the point).

property dest
property spritenum
property cleanup

on beginsprite me
  tell sprite spritenum
r = sprite(1).rect
sprite(1).rect = inflate(r,10,10)
  end tell  
end

on mouseUp me 
  go dest
end

on endsprite me
  if cleanup then
sprite(spritenum).member.media = sprite(spritenum).member.media
  end if
end

on getPropertyDescriptionList me
  pdlist = [:]
  
  p = [#comment:destination, #format:#marker, #default:one]
  pdlist[#dest] = p
  
  p = [#comment:cleanup, #format:#boolean, #default:false]
  pdlist[#cleanup] = p
  
  return pdlist
end

Brennan

[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 Video in perspective

2004-02-16 Thread Brennan
On 16/2/04 at 12:24, Ross Clutterbuck
[EMAIL PROTECTED] wrote:

 Initially I was thinking about using the VideoSprite Xtra from
 Penworks to do this: as they advertise their xtra to provide a
 true sprite for video, I would assume you can play around
 with the quads of the bounding box and thus distort the video.
 Problem is though the copy I downloaded to have a play with is
 crashing Director so I don't know right now :(
 
 Basically I would like to skew a video sprite to simulate a
 perspective panel for video playback (I'll worry about
 performance issues a bit later). Anybody got any tips or
 pointers on the best way of approaching this?

One thing that springs to mind is to play with the video track matrix in
QuickTime. It's not easy to open this up to Lingo, but there are a couple
of hacks which will give you some measure of control if you wanted to move
the matrix around dynamically.

The best tool for runtime manipulation of QT track matrices is LiveStage
Pro. It has a scripting commmand called 'setMatrixTo', which is a bit
opaque if you are not familiar with matrices. 

It's also possible to get a QuickTime wired sprite to 'adopt' a video
track for its appearance. This gives you a lot more control because wired
sprites can also be stretched in much the same manner as lingo quads. In
other words, you can have the video stretching all over the place.

One problem with this is that Director doesn't know anything about
QuickTime wired sprites, so they behave a bit strangely. In particular,
non Direct-To-Stage sprites don't get idle events unless you move them,
and DTS sprites get idle events even when your Director movie is not
running. (Duh. Macromedia).

Clearly you'll need non-DTS if you want to composite non-rectangular
QuickTime content, but this works ok if you keep turning DTS on and off.
(Horrible idea, but at least you can feed some idle events to your wired
sprites that way).

I can go on at length about this, but if you are interested, contact me
off list and I will send you an example file to play with. It's quite an
interesting effect.

Brennan

[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 Small reproducible bug - is this known?

2004-01-23 Thread Brennan
I sometimes rely on the assumption that 

member()

returns member(-1 of castlib 1)

and/or that

member().type

returns #empty

BUT I have discovered a small bug (or at least inconsistent behavior). If
you delete a cast member's name in the GUI - effectively naming it  then

member()

will return a reference to this now nameless cast member. If there are
more than one cast members whose names have been erased, the first of
these is referenced.

There is no way of telling whether a nameless castmember once had a name,
because cast members that have never had names also have  for the name
property. Director, however, sees a difference in this case.

Is this a known issue? I have seen it in Director 8.5 and MX on both Mac
and Windows. It is easily reproduced (and fairly easy to work around), but
like all such bugs, not knowing about it can cause some hassle or havoc.

I shall be reporting it, because it hints at something messy underneath
the cast member naming/reference resolving mechanism which is not
particularly comforting.

Brennan

[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 Small reproducible bug - is this known?

2004-01-23 Thread Brennan
On Fri, 23 Jan 2004 12:01:51 +0100, Alex da Franca
[EMAIL PROTECTED] wrote:

 I think there is a difference between both names.
 although the output after the automatic string
 conversion yields the same result, the 'value' of the
 name of member, which was not yet specified is void,
 where the other is EMPTY.

Not so:

put ilk(new(#bitmap).name)
-- #string

At least as far as our code is concerned, cast members which have never
had names *appear* to have the same name () as cast members whose name
has been deleted.

Clearly, under the hood, they *can* be distinguished from one another, but
not by us, which is exactly the problem. Presumably the names of unnamed
castmembers are void, and the coercion to string only happens when you
actually *use* the .name property.

 I did not ever notice that, but I wouldn't call it a
 bug at all. if you name a member  and later get back
 this member reference, where is the problem ? it even
 is more accurate than I ever would expect it to be.

The problem is that it's unpredictable and inconsistent. You get different
results depending on whether you've been deleting the names of your cast
members. That's a side effect to be aware of, if not exactly to write home
about.

OK, Now I've answered why it's a problem. Why is it important?

Well, I want to be able to take an arbitrary string and, using a single
test, find out whether I have a member whose name is that string. 

I thought I could rely on:

member(someString).type = #empty

... but this will fail if any cast member has had its name deleted.

The workaround is

(somestring = ) or (member(someString).type = #empty)

If I got a consistent result for member().type, regardless of whether I
had changed the names of any cast members (whatever that result might be),
I would not consider this a bug either, but while it sort of makes sense,
I still regard it as a bug. It's certainly unreasonable to expect that no
single cast member in a large project has had its name deleted.

OK, hardly a showstopper, but I wont accept that this isn't a bug.

Brennan

[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 Panther: Automating publishing dcrs etc.

2004-01-08 Thread Brennan
Here's a neat trick: If you're using Panther, you can take advantage of
this new fangled Applescript feature called 'GUI Scripting'. 

This is essentially the same as many 'macro' utilities such as Keyquencer
and Quickeys, but built into the OS, and not requiring any third party
software. 

For security reasons, it's disabled by default, but you can enable it in
the 'Universal Access' pane of your system prefs - it's the cryptically
named 'Enable Access for assistive devices'.

Once done, you can automate all manner of authoring tasks such as creating
castlibs, projectors and dcrs, which are inaccessible from Lingo. The
following script (for example) will publish a DCR from the frontmost movie
(replacing any existing files if necessary).

You will need to tweak some of the strings for a  non-English OSX.

tell application Director MX
activate
end tell

tell application System Events
tell process Director MX
keystroke s using {shift down, command down} -- 'Publish'

repeat while true

set dlogTxt to (value of (static text of window 1)) as string

if dlogTxt begins with Replace existing then
if name of buttons of window 1 contains OK then
click button OK of window 1
end if
else if dlogTxt begins with Saving files then
-- stay in the loop (no 'next repeat' in Applescript)
else
exit repeat
end if

end repeat

end tell
end tell

You can save scripts such as this in the script menu (an optional gadget
you will find in your Applescript folder) so that they are available from
within Director, you could also save your applescript as an application
and trigger it with Director's 'open' command -e.g. from a tool MIAW -
although there's an overhead involved in starting a new process.

It might be useful to use this kind of script to publish multiple versions
of a dcr in one fell swoop - or even just to increment a counter in the
filename. I think this is possible, but the 'publish settings' dialog box
seems to be constructed very strangely.

You can find out more about this feature at

http://www.apple.com/applescript/uiscripting/

I hope this will be of interest to some of you.

Brennan


[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 os x command line

2003-12-22 Thread Brennan
On Fri, 19 Dec 2003 02:17:11 +, thor
[EMAIL PROTECTED] wrote:

 
 Hi there guys !
 
 I need to start a Java server which I use to
 communicate between Director and a sound application.
 
 I usually start it up by using the Terminal, but if I
 want to distribute the application, then I'd rather
 have this automatic, i.e. the user should not have to
 start up the terminal and do some messy stuff there.
 
 Is it possible to call Java classes from Director?
 
 There might be an xtra, but I'd rather not have to buy
 one.
 
 Would you recommend AppleScript for this perhaps?
 
 Any tips?

Applescript will work, and actually you can call the shell without even
opening the terminal. Check the dictionary for 'standard additions' under
'miscellaneous commands'

do shell script: execute a shell script or command using the sh shell
 do shell script  plain text  -- the command or shell script to execute.
Examples are ls or /bin/ps -auxwww
  [administrator privileges  boolean]  -- execute the command as the
administrator
  [password  plain text]  -- use this administrator password to avoid a
password dialog
  [altering line endings  boolean]  -- change all line endings to
Mac-style and trim a trailing one (default true)
 [Result:   plain text]  -- the command output

The only thing is that you'll have to make the applescript as an
application and launch it with Director's 'open' command, but this is
hardly a big deal I think.

One gotcha is that Applescript uses 'sh', but the terminal uses 'tcsh'.
There are some differences, but you probably wont encounter them in this
case.

I'm wondering why you want to go this way round - if you're going to
launch an app, why not just lauch your server directly?

[So, when is someone going to make a 'do shell script' xtra for OSX?]

Brennan

[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 stereo sound applescript ?

2003-12-16 Thread Brennan
On Tue, 16 Dec 2003 17:59:28 +0100, jean-louis valero
[EMAIL PROTECTED] wrote:

 hello list I need, on mac OS X and 9, to hear  only
 the right or the left portion of a stereo sound in a
 quicktime member. As it seems impossible to do that
 with lingo, may be something exists which can set the
 panning into OS sound system. An applescript ? But I
 have not the syntax. If I had, it would be simple to
 launch the script with budapi. Who could help me ?
 Thank you very much... jean-louis valero

The standard QuickTime Xtra does not expose stereo panning to Lingo, but
you can do it with QuickTime wired actions. Actually, I used exactly this
as an example to demonstrate how to get Lingo to 'talk' to wired actions.

http://brennan.young.net/Comp/LiveStage/Lingo2QT.html

(I did this before Director offered stereo panning from Lingo).

Basically, I have a QuickTime wired action fired on idle which polls the
enabled state of some dummy tracks, and treats these as 'bits'. Eight of
such tracks gives you 256 possible values(!) The wired action then sets
the stereo pan accordingly. 

It's a slow ugly hack, but it works - even with shockwave as you can see.

However it can be optimized in your case: You want to switch between left
and right channels, so you really only need one bit of data to be passed
between lingo and Quicktime - i.e. one additional track. If you also want
to switch both channels on, you will need two bits/tracks. Again, this is
quite doable.

If you can run your project on a writable volume, you can write an XML
file with fileIO and get QuickTime to read it in at regular intervals.
Again, this is slow, but you have massive bandwidth available, and you'd
be passing structured data too, which is a big bonus, contrary the
technique linked above which requires one dummy 'track' per bit of data.

Applescript - quite up to the task of panning the stereo a QuickTime movie
- wouldn't help much here because you'd need to have some kind of
scriptable QuickTime Player running in the background (i.e. QuickTime
Player, or something you cobble together yourself). Then you'd still have
trouble sending messages to it without Bruce Epstein's Xtra. 

In other words, you wouldn't be doing anything at all to a QuickTime
*member*, rather you will be manipulating QuickTime Player (and hoping
that it doesn't go out of synch with your Director stuff). If this is
still desirable, I can help you put together a script.

Brennan
[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 JT (was: accessing the timeoutlist, part II)

2003-12-12 Thread Brennan
On Fri, 12 Dec 2003 00:00:42 -0500, Troy Rollins
[EMAIL PROTECTED] wrote:

 
 DMX was basically just getting Director
 current with modern OSen

Yes, the object inspector has certainly kept Panther users completely up
to date with Macromedia's apparent level of enthusiasm for Director.

(Sorry, couldn't resist).

Brennan
[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 Applescript --

2003-12-08 Thread Brennan
On Sat, 06 Dec 2003 13:36:11 -0500, grimmwerks
[EMAIL PROTECTED] wrote:

 Anyone else have experience with applescript? I know
 Bruce has his xtra, but I'm wondering how difficult it
 would be to create a little applescript listener to
 get applescript functions from director...

These days I am doing about 50/50 Applescript and Director, but never
really use them together. Bruce's Xtra is *really* great, exactly what's
needed, but the price is bound to put off widespread use which is a real
shame. Bruce once complained that sales were 'flat' which doesn't surprise
me in the least. It would be trivial for Macromedia to add this
functionality to Director. Of course they wont, but not because they're
afraid of annoying Bruce. (It just wont sell any more units of Flash).

Nowadays we have Applescript Studio on OSX, which makes Director
unnecessary for a small but significant set of tasks. It certainly reduces
the market for Bruce's Xtra! You should definitely check it out. Consider
that you can embed QuickTime movies in your apps, and (through Cocoa) you
can even call the Quicktime API directly, which means access to
compression and image compositing and all that business.

Panther also introduces something a bit like an embryonic 'imaging lingo'
for scaling, rotating and converting offscreen images. It's not
'copypixels' but it's not half bad for a system-level tool.

http://www.apple.com/applescript/imageevents/

You can certainly set up an Applescript 'listener' (and by this I assume
you mean an application), but talking to it is a bit tricky. There's no
obvious Apple event to use. 

You might be lucky with 'open', but I seem to remember that not working.
IIRC, you have to provide a file as an argument, which is not really the
best thing for just passing data.

One reliable but slow method is to write data to disk, and then have the
Applescript app read it.

Finally you can use the clipboard to pass data between the two apps, which
is quite fast, but pretty ugly.

Getting data back to Director (or Projector) was always a matter of using
'do script'. Alas, Director lost the terminology for this event in about
version 7, but the event remained at least up to 8.5. (I don't have MX,
and don't see any reason to have it either, especially because all the new
features are incompatible with Panther). 

Anyway, you have to code the event using raw or 'chevron' syntax 

event miscdosc

This will almost certainly be mangled before you read it, but it should
look something like this event miscdosc. If you've had more than a
litle bit of Applescript experience, you will recognise this format even
if you don't really grok it.

I don't think you can get a return value from this (try and report back!),
but you can at least invoke the lingo 'do' command that way. I'd be very
interested in whether you can get 'do script' working under MX. Something
tells me it wasn't exactly top of the list of priorities when Director was
ported.

If 'do script' really is gone, you'll have to use the techniques mentioned
above - writing to disk, or using the clipboard. The commands for writing
arbitrary data to disk (Applescript's equivalent to fileIO/propSave) are
to be found in the 'Standard Additions' OSAX. 

If you're using Panther you might also get lucky with the new GUI
scripting feature, but this is pretty ugly too. It reminds me of some of
the system-level GUI macro stuff you see on Windows, or 'QuicKeys'. On one
hand it's the only way to automate tasks in non-scriptable apps, on the
other hand, it provides absolutely no incentive for developers to make
their apps 'properly' scriptable with an object model and all that. How it
works with Director - which has no system-level GUI objects apart from the
buggy installmenu, I have no idea. See what you can find out.

http://www.apple.com/applescript/uiscripting/

IMNSHO Applescript is the best reason to use Mac instead of Windows. Lingo
folks sitting at Macs who don't use it are quite literally wasting their
time. OK, it's got that old fashioned hypertalk syntax, but it's also got
a bunch of other stuff that Lingo can't shake a stick at. (Exception
handling anyone?)

I'm certainly interested in where you're going with this and where you end
up, so feel free to contact me with any questions or comments which would
be off-topic here, and good luck with it!

Brennan
[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 Strange error on XP with MPEG Advance Xtra

2003-12-08 Thread Brennan
I've been debugging a fairly large project on Windows 2000. It uses the
MPEG advance Xtra fairly extensively. There is only ever one MPEG on stage
at once.

When we run the project (or open the movies in Director) on an Acer laptop
under XP professional, we get some strange error messages which appear to
be coming from the OS, rather than Director..

The error message (in Danish) complains that there is no diskette in a
drive which is not specified by DOS letter, but using a more UNIXy
/devices/driveN/ or something like that. This machine has no 'diskette'
drive, and all the media is on the hard disk.

This message comes up every time an MPEG comes up, but only happens once
for each MPEG. There are no 'where is?' messages, and the MPEGs play just
fine when we dismiss the error box. The project plays fine thereafter
until we reboot the machine.

The problem seems to go away if I shift the MPEG one frame forward in the
score (so that the full screen bitmap being used to conceal the hardware
flicker appears first). This leads me to suspect some kind of
incompatibility between MPEG advance and XP, but with the error message
being in the system language, I also assume it is not coming from the
Xtra.

Any ideas?

Brennan
[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 using protected quicktime video in Director.

2003-09-11 Thread Brennan
On Thu, 11 Sep 2003 12:30:27 +0100, Fraser Campbell
[EMAIL PROTECTED] wrote:

 you can't in Director 8.0 - AFAIK Director MX can play QT6 - I think
 Director 8 is good up to QT 4, but others may be able to verify this.

Not true. 

Director 6.5 and up will play QT6, but there are some specific (but as yet
unspecified) bugs which Macromedia claimed to have fixed which makes QT6
'less buggy' in MX than in earlier versions of Director.

This is what Macromedia marketing called 'QuickTime 6 support', without
further elaboration.

If anyone knows which QuickTime bugs got fixed in Director MX, I am sure
everyone would love to hear about it, but right now it's kind of occult.

Brennan
[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 animating scaling of sprites

2003-08-14 Thread Brennan
On Tue, 12 Aug 2003 18:13:56 -0400, Mathew Ray [EMAIL PROTECTED] wrote:

 However, is this what you are talking about Court? From your initial
 posting, I got the feeling that your issue was with the perceived motion
 of the image itself, be it a bitmap or a solid block of color. First of
 all, is my perception correct?

That's how I understood the question too, in particular

 I was expecting to get something 
 closer to video. Is this a pipe dream? Are there any ways around this?


Well, Court, if you get a good video recording (try a DVD) and pause a
frame where something is moving across the screen, you will discover that
the moving object is blurred. This is one of the best ways to fake very
nice motion. 

For moving a sprite, switch to a motion blurred version of the object,
next frame, move it someway to its destination (breaking the 'journey'
into a couple of steps, and in the final frame, switch back to the
original.

The same thing works with scaling of course.

This is only really useful if you know exactly where things are going to
be moving to, so you can prepare a good blurred image, using motion blur
on exactly the right background, going in the correct direction, and so
on, but I often see situations like where this technique can work.

If you include a short 'whoosh' sound, the effect is even more impressive,
but this is not always acceptable/desirable.

Brennan
[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 green and black variables

2003-06-30 Thread Brennan
On Sun, 29 Jun 2003 12:48:15 -0300, Diego Landro
[EMAIL PROTECTED] wrote:

 In a director project i recentely been involved into, i found
 that what to me appear as variables are in green. ie name and i
 can¥t relate the name to any fnction lingo has for name, so i
 wonder if i decide to name a variable name it will appear in
 green instead of the more familiar black? Doen¥t lingo hace
 reserved words like many other languages? is just this or my
 problem is completely different? If more info is require i can
 post the code so you can figure it out better. Maybe is just a
 function i skipped while searching the lingo dictionary but i
 don¥t think so. Thanks guys

'name' is a property of the member object (and possibly certain others
which elude me at the moment).

The syntax colouring in Director is fairly unsophisticated, and does not
appear to have any grammatical awareness. 

Essentially, they just have a look-up table with words in three or four
different categories and a colour to go with them. 

This means that if one of your own variables or symbols appears in green,
then that word is used 'somewhere' for 'something' in Lingo, but not that
it is a 'reserved' word, although if it appears in blue you should be
careful. (Don't use the word 'on' for example).

Another example is this well-formed and fully-functional code:

on test  
  member = member(1)
  return member.name
end

Now, 'member' is usually parsed in a very particular way, but here I'm
using it as a variable name. Nothing breaks and it all works the same as
if I had used any other variable name, but there is certainly room for
confusion later on as complexity increases.

So, for much of the time you can freely use the 'green' words for your own
names, but in some very special cases this *will* cause the lingo parser
to get confused (not to mention the programmer) because it might expect
the wrong thing, which can be a nuisance to debug. I can't think of an
example off-hand, but I have certainly experienced this. 

Yes, I can think of one: If you have a behavior with a property called
'member', and attach that behavior to sprite N, then sprite(N).member may
or may not give you the expected result. (It gives you the *sprite*
member, not the behavior property).

To be absolutely safe, use a slightly different spelling. I usually add,
tweak or remove some vowels, replace 's' with 'z' and various other things
which keep the word phonetically identical to the human reader. For
example 'name' could be 'nayme' or 'nam' or even 'nom' (if you have any
French). 

It's certainly an advantage to be a non-english speaker because you can
use other language words for you own variable and handler names, although
it's best to stay with the roman alphabet if you can help it.

Brennan
[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 QT Authoring advanced question...

2003-06-20 Thread Brennan
On Mon, 16 Jun 2003 20:30:54 -0500 (CDT),
[EMAIL PROTECTED] wrote:

 
 I'm just curious, and would like to bounce the idea off of
 someone more knowledgeable than myself (Colin?) -- would it be
 possible (not by me, but by someone) to create a new QT Xtra
 that director could feed multiple file information, layout,
 timing etc (SMIL?) and generate a new QT file with all these
 media embedded? 


I know Tab replied to this. (Tab, if you've made some Xtras for exporting
as QuickTime we want to hear about it!!!)

Anyway, SMIL is a valid type for any app which supports QuickTime. It's
trivial to make a SMIL editor in Director, and you can go a really long
way with it beyond just having an editable field on stage, but essentially
that's all you need to get going.

The basics are:

Create a well-formed string of SMIL (however you decide to do this)
Write it to disk with fileIO
Use qtMember.filename = SMILdocument to preview on stage

This can be done rapidly enough to almost get realtime updating, although
depending on how you are editing the SMIL source, you might not want to do
that.

You can download a sample movie which does this from here

http://brennan.young.net/Comp/Director/downloads/SMIL_edit.zip

In order to get it working you should have a very simple SMIL document
(with media) on your disk. Click the import button, view the SMIL as
multimedia, click the 'edit' button to change the source, click the 'save'
button to preview it. VERY simple, but it could be much more fancy if you
had an easy way of editing layouts, media links and sync times.

Actually I don't know a better tool for making a SMIL editor. I wanted to
make an OpenSource effort around this, but there was so little interest
that I gave up. Someone made one with RealBasic and it is rather expensive
for what it is.

The step we are missing is to be able to convert to .MOV, but even if you
did this, the external media would still be necessary. (SMIL is
implemented in QuickTime using 'movie tracks' which are very similar to
Director's LDMs). However, if you are running on a Mac you can use
Applescript to perform some of these other steps. I can't remember what
happens if you export a SMIL document as a flattened movie.

It would be more interesting to be able to build QuickTime movies on a per
track basis, but that would require considerably more work by someone with
Xtra-writing ability. I would LOVE to have this, though.

IMNSHO It's absolutely crazy that Director has QuickTime export
functionality, but that this is not scriptable. With imaging lingo, it
would be possible to make a fairly respectable AfterEffects-like
application using Director if only they would open up the export Xtra.

Brennan
[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 OT: 'endianness' and FileIO Reading shorts and longs-

2003-06-10 Thread Brennan
Sorry to ask this here, not really a lingo question. I think I have this
right but I would like to check with some of you guys.

I am sitting on a Mac writing my own conversion tool for a windows-only
non-text file format using fileIO and actually it is going pretty well. I
can read bytes and Cstrings  255 chars without any trouble, but as you
may know, shorts and longs are represented by 2 and 4 bytes respectively,
so there is room for confusion which order the bytes come in. I 

AFAIK this relates to 'endianness' or something.

Now, here's my question. Hopefully with a quick answer:

When I am reading a file byte by byte from the start of the file, and want
to read four bytes as a long or two bytes as a short, is the first byte I
read the high byte or the low byte in these cases?

I presume that because it's a file originating on Wintel - little endian -
I should treat the first byte as the least significant one - right?

Finally, let me know if I have got this right: - Cstrings have the length
of the string at the beginning of the file and have no special termination
char, Pascal strings have no length specifier, but terminate with a null
char. 

I'm pretty impressed with fileIO being able to do this stuff. When I get
my code working I will be happy to share it. I have a parent script
wrapper for fileIO featuring handlers like 'readByte()' 'readCstring()'
and (coming soon with your help) 'readShort()' and 'readLong()'.

Brennan
[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 Re: void and stuff

2003-04-03 Thread brennan
Robert Tweed [EMAIL PROTECTED] wrote

 Actually, I do think it undermines Lingo's credibility,
 to a greater or
 lesser extent, depending on how you look at it. As you
 can probably tell, I
 like to know how things work, so when I write some code
 I know it's going to
 do what I expect it to do. I don't like lots of things
 being left undefined,
 just because the Macromedia engineers are too lazy to
 address what is
 clearly a bug, so they do a Microsoft a re-label it as
 a feature.
 
 Sorry, but in this case it's not acceptable, and it can
 seriously complicate
 what should otherwise be simple code. Scripting
 languages are for exactly
 that - writing simple elegant code that reads easily.
 They are not for
 writing mammoth chunks of code that explicitly work
 around every possible
 bug-causing case - the language itself is by design,
 supposed to negate the
 need for all that.

This kind of issue would be solved if Macromedia gave us decent exception
handling, so that we could stay in the scope of any anticipated errors when and
where they happened without being catapulted into the nebulous world of
alerthook, which pops the entire call stack. (Does anyone ever use the
alertHook?)

Here's how it might look

try

  c = myObject.count()-- type of myObject may be xtra instance

on error e

  if e = handler not found in object then
-- whatever
  end if

end try

This would certainly be faster than taking myObject to string before doing
stuff, because the exception would simply not occur in many cases.

Stick that in your wishlist and smoke it.

Brennan
[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 many sound levels in MX?

2003-03-31 Thread Brennan
On Sun, 30 Mar 2003 22:23:59 +0200, Mats =?iso-8859-1?Q?Leid=F6?= 
[EMAIL PROTECTED] wrote:

 After trying a couple of sound commands in Director MX in OS X I 
 stumbled on something strange. If I have my system sound level 
 cranked up to the max, Director reports the soundLevel=15 instead of 
 7, as I thought it would be. (I tried it in the message window and 
 inside an exitFrame-script on a text member on stage - same result). 
 If I try to set the soundLevel to 15, in the message window with a 
 simple
 set the soundLevel=15
 command, and then check the soundLevel, Director has set it to 7. 
 That seems to be the usual Dir behaviour, supposing that 7 is still 
 the maximum sound level.
 Looking at the system sound level it has now gone down a bit from the 
 max level, to about 3/4:s of maximum. If I then move the system 
 volume slider again up to the max and check Directors¥soundLevel it 
 is back up on 15.
 I am using OS X 10.2.4 and Director MX. Anyone else have this 
 problem? Vhat is happening here?

Very weird, but it rings little bells in my head about QuickTime which can
'overdrive' audio to a little more than 200% of original volume. 

(You can access this feature in the standard controller by shift clicking on
the volume control - alas this is broken 'on stage', but it works in
Director's QuickTime window or in a web browser).

Maybe MX is hooking up with OSX's standard audio features and getting stuck
somewhere. 

In the old days, it was the Mac sound manager, which did not offer
'overdrive', now it's QuickTime. Coincidence?

Brennan
[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 registration point

2003-03-29 Thread Brennan
On Fri, 28 Mar 2003 14:11:18 -0800, Buzz Kettles [EMAIL PROTECTED] wrote:

 At 7:31 PM +0100 3/28/03, you wrote:
 On Thu, 27 Mar 2003 11:21:26 -0800, Buzz Kettles [EMAIL PROTECTED] wrote:
 
   because QT doesn't support changing it
 
 Bzzt! QT *does* support changing it, but Macromedia's QT Xtra does not.
 
 - the question was about Quicktime members within Director -

I'm aware of that. Your reply implied that this is an alien concept to
QuickTime, and I wanted to point out that it is the QuickTime Xtra which is
lacking.

In particular, if a QuickTime movie changes the matrix of one or more of its
own tracks (which might have been a solution to this problem), Director does
not update it properly.

Brennan
[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 registration point

2003-03-28 Thread Brennan
On Thu, 27 Mar 2003 11:21:26 -0800, Buzz Kettles [EMAIL PROTECTED] wrote:

 because QT doesn't support changing it

Bzzt! QT *does* support changing it, but Macromedia's QT Xtra does not.

Every spatial/visual track in a QT movie has its own location relative to 0,0,
but this only becomes obvious when there is more than one spatial/visual
track. (Try playing around with 'Add' in the edit menu and 'size' in the
properties dialog of QuickTime Player). With wired actions, all this can be
changed.

In Director, you can actually 'translate' the QuickTime movie, but the 'view'
is always based on the original matrix - i.e. it is cropped. (Look up
'translation' in the Lingo Dictionary). 

Brennan
[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 Image size

2003-03-26 Thread Brennan
On Wed, 26 Mar 2003 14:17:06 -0800, Buzz Kettles [EMAIL PROTECTED] wrote:

 Note: Director can Import 4-channel (RGB+A) Photoshop files w/o the 
 Photocaster Xtra
 Director has included the Photoshop 3.0 Import Xtra for this since d6.
 It's in the \Xtras\Mix\ folder.

... but this Xtra has an important bug: Photoshop RGB+A images are
premultiplied with white, so any images imported in this way have a soft,
milky halo around them.

http://www.director-online.com/howTo/UD_articles/UD58/images/Fig2_sta.jpg

After Effects offers 'premultiply' as a switchable option. Photoshop does not.
(Stupid, stupid, stupid).

This problem is discussed at length here:

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

Basically these are the steps for doing it 'properly':

1) Make sure you Photoshop file has one layer (with transparency)

2) Load the transparency information (Select-Load Selection)
3) Save the selection in an alpha channel (Select-Save Selection)
   (Ensure that you only have ONE alpha channel)
   
4) Run 'Filter Factory' with settings

R: r
G: g
B: b
A: 255 

... or just download the ready-made plugin from the DOUG article and use that.

5) The image now looks HORRIBLE, but don't despair. It will come out alright.

6) FLATTEN the image (very important)

7) Save and import into Director and wonder at its beauty.



Brennan
[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 Text/Integers?

2003-03-19 Thread Brennan
On Wed, 19 Mar 2003 00:01:36 -0800, Buzz Kettles [EMAIL PROTECTED] wrote:

 somewhere I read that the first (implicit conversion) is faster than 
 the latter (string() function) ?!
 
 that would seem unlikely to me.

Quite likely! As supported by the fact that an object reference (instance)
goes 'to string' differently in each case:

Try making this parent script:

on getRefCount me
  
  toStr1 = me.string
  refCount1 = integer(toStr1.word[3])
  
  toStr2 = string(me)
  refCount2 = integer(toStr2.word[3])
  
  toStr3 =   me
  refCount3 = integer(toStr3.word[3])
  
  toStr4 = 
  put me after toStr4
  refCount4 = integer(toStr4.word[3])
  
  put [refCount1, refCount2, refCount3, refCount4]
end

Name the script 'a', then in the message window;

script(a).new().getRefCount()
-- [4, 3, 2, 2]

In other words, string() and .string seem to create additional references (and
therefore must use more cycles allocating and releasing memory) than implicit
coercion to string. 

Implicit coercion also happens with 'put after'.

.string is clearly the most 'expensive' of the three aparently equivalent
forms. It is also the most recent piece of syntactical sugar in this
discussion, so I wouldn't be surprised if it were implemented as a quick hack.

I discovered all this when experimenting with 'destroy' handlers - finding out
whether an object has more than one reference - whether it was 'safe' to cut
it loose. Of course, to do this, you have to subtract the extra references
which are created for the task, but depending on how you go 'to string' you
have to subtract a different value to get the 'true' reference count.

Also using 'put into', 'put before' and 'put after' is 'cheaper' than using an
assignment operator (with strings at least). 

str1 = str1  str2 -- slower

put str2 after str1 -- faster

Presumably because an assignment operator requires that memory is allocated
for the right side of the operation, while the left side is still in memory.
Additionally, the 'original value' of the left side needs to get garbage
collected.

Using 'put before' or 'put after' only allocates the memory needed to
accomodate the additional string data.

With this in mind, I would also expect 'put into' to use less memory / fewer
cycles than the assignment operator (=) in those cases where a variable
already exists, especially if the variable is a string. 

Strings are passed by value, not by reference, so they are not particularly
efficient. We all know that strings can be very long (as in 'how long is a
piece of...'), so an assignment involving the concatentation of two long
strings must be quite expensive. Using 'put after' or 'put before' should
allow some of this lost efficiency to be regained.

However, I have not done any tests to confirm this. (Any takers?)

Ahh you can't keep that good ol' hypertalk syntax down.

Brennan
[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 Re: Apple Menu/Clipboard Persistence?

2003-03-18 Thread Brennan
On 18/03/2003 at 12:01 PM, [EMAIL PROTECTED]
wrote:

Carl West [EMAIL PROTECTED] wrote:

 [EMAIL PROTECTED] 
 Subject: lingo-l Apple Menu/Clipboard Persistence? 

 
 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.

Interesting issue. I've not seen exactly this, but I've observed - especially
in more recent versions of OS9 - that 'old' clipboard text sometimes hangs
around on a per-app basis. I suspect that CarbonLib has some hand in this - or
rather NON carbonized apps may exhibit this behavior if CarbonLib is
installed. I see it often in my mail client, Barebones' Mailsmith 1.1. (More
recent versions are Carbonized).

In particular, if I copy something to the clipboard that I wish to paste into
an app which is not yet running, then launch the app, the clipboard often
contains some very old clipping - sometimes even from the previous day!. I
haven't isolated this completely yet.

Another similar thing is when manipulating the clipboard with Applescript.
There's a standard scripting addition 'set the clipboard' which ONLY works if
you activate an application. 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.

However, if I make an applescript application which manipulates the clipboard
and run it from the Apple menu, it seems to work perfectly. (Maybe you should
switch to Applescript, which is arguably more suitable for tweaking strings
than launching a whole multimedia engine).

Do you have Director MX? Try making a carbonized projector, run it under OS9
and see if this bug is still present.

Sorry I can't be of more help.

Brennan
[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 deleting framelabels with lingo

2003-03-14 Thread Brennan
On Thu, 13 Mar 2003 18:14:15 -0800, Phil Gross [EMAIL PROTECTED] wrote:

 Interesting, I never tried changing or adding or deleting markers on the
fly.

It's a very useful when rescuing long, unwieldy, inconsistently authored
score-based projects abandoned by the clueless.

 The documentation for frameLabel claims that it can only be set in a Score
generation session. Obviously not true.

Were you further aware that 'the updateLock' works at runtime too (since D7 I
think). - I wonder if this might solve the transition problem mentioned on the
other thread?

Brennan
[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 Re:deleting framelabels with lingo

2003-03-14 Thread Brennan
Colin Holgate [EMAIL PROTECTED] wrote

 the framelabel = 0

Of course! I should have guessed that using a completely different datatype
would work. Actually, I'm sure I knew this once and had forgotten it.

Thanks Colin.
[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 deleting framelabels with lingo

2003-03-13 Thread Brennan
Is it possible to delete framelabels with lingo? 

I just accidentally created loads of frame labels and then had to delete them
all manually. ARRGH!

Note: Setting the frameLabel to  does not work, and it's how I got in a
pickle in the first place.

Brennan
[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 'open file with app' broken?

2003-03-12 Thread Brennan
Trying to get Director to open a path in BBEdit - or anything for that matter.
The app is getting activated, but the file openeth not.

Is this broken? If so, how long has it been so? I also tried in D6.5 with no
joy and, yes I am using full pathnames.

My Director app is not on the same partition as my system. Could this be a
factor?

I can't really believe this is a Director bug or I would surely have heard of
it. Any ideas?

Brennan
[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 - Lingo version

2003-02-04 Thread Brennan
On Mon, 03 Feb 2003 14:47:57 -0500, Kurt Griffin
[EMAIL PROTECTED] wrote:

  Woking on the PC I had this problem many years ago as there
  was no PC software for putting cue points into a QuickTime
  file back then (and still today I think). So I approached it
  from a Lingo level and wrote a behavior that simulates the
  effect of cuepoints by just using counting the amount of time
  the QT sprite has been playing. Works very well and I have
  used it on several CD-ROM projects to great effect. It also
  removes the messy business of having to edit in the QT
  CuePoints in the first place!
 
 Sure, but the problem with that is it only works in Director ;)

I have some cuepoint code which uses ORDINARY text tracks (not the
perverted kind called 'chapter tracks' which are a bit of a nightmare
to get working consistently as cuepoints in Director).

When you drop the behavior onto a QT sprite, it will search the movie
and dump all the 'cuepoints' (i.e. the text samples and their
movietimes) into the QT member's cast member script (not a bad place,
right?). They're stored as script properties, and there are a couple
of handlers for accessing them.

The behavior itself duplicates most/all of the cuepoint functionality
that is supposed to work in Director, but tends not to. It does
'cuepast' callbacks and 'mostrecentcuepoint' and all that.

The good thing here is that you can use the same QT movie with text
track elsewhere if you wish. Converting to a chapter track is trivial
in QT player.

 What I'm trying to do is improve on a clunky production process
 for making QuickTimes with closed-caption tracks that can be
 turned on/off by the end user, as part of an accessible
 package. Those movies may run in Director, but also will exist
 on their own on the web - so I need it all living in the QT.

Have you looked at Applescript? The final step of adding the text
track and converting it to a chapter track can be fully automated.

Apple even have some scripts available for editing text tracks. If you
put them in the 'scriptmenu' (OSX) or OSA menu (OS9) you can run them
from inside QuickTime player. You can also write your own scripts.

Applescript is very much like old-style verbose lingo in a lot of ways
(and quite different in a few important other ways). If your lingo
isn't too shabby you can be up and running with Applescript fairly
quickly. QuickTime Player is one of the best tools to learn it with
because we all know about scripting QuickTime from Director.

 I've tried several tools for creating text tracks to fit the
 bill. The best I'd found was GoLive, surprisingly... and that
 isn't as streamlined as I'd like. So I thought I'd look into
 making a tool that is customized to a very specific job (as
 some monkey will be creating a few hundred of these by hand,
 I'd like to shave as many seconds off the individual creation
 time as possible). Haven't checked LiveStage yet... it's a bit
 pricey for this.

LiveStage is certainly expensive, especially if this is all you want
to do, but if you're planning to deliver interactive Quicktime Content
on the web, or mess around with some of QuickTime's more esoteric
features, it's a must have. VERY Applescriptable too. There's a free
demo which now even allows you to export movies for 30 days. Do check
it out.

Brennan
[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 installing my application and associating files with it

2003-02-04 Thread Brennan
On Tue, 4 Feb 2003 14:03:06 -0600, Kyle Smeby [EMAIL PROTECTED]
wrote:

 Actually the file system in OS X is where Apple has taken a lot
 of flak for not more closely emulating Be OS.  I never used Be,
 but I heard it had a very robust file system where each file
 could hold a very customizable amount of metadata.

This was one of the absolute most fabulous features of BeOS. The file
system was nothing less than a fully fledged database. You could sort
your jpgs by 'mood' or whatever categories you chose to impart to your
files. Makes the MacOS 'labels' feature look primitive. (Not to
mention file/creator). 

Another really fab feature was ALWAYS letting user input take
priority, so your click of the 'cancel' button - when you realised the
frontmost process was going to hog the CPU - was always obeyed
immediately. For this reason BeOS always felt more responsive and,
well just faster than any other OS installed on the exact same
hardware. Actually, it wasn't faster at all, but because they always
let the user's actions have priority, it felt like it was screaming
along. 

On MacOS X and Windows, if you're inside a single process which is
hogging the CPU, you just have to wait. Sure you can switch to another
process, but the option of interrupting the process from the INSIDE
(as opposed to just killing it from the outside) is simply not
available. This is bad design that we all tolerate because most of us
haven't seen anything better.

Interestingly Microsoft is apparently scrambling to include a database
in the forthcoming 'Longhorn' OS, which clearly amuses the folks at
the Register, and the ex-Be Engineers who 'slice and dice' Microsoft's
gambit at this URL

http://www.theregister.co.uk/content/archive/24648.html

Of course, the fact that these engineers are now hired by *Apple*
suggests that Microsoft is not the only company with this plan. 

Those people bemoaning the lack of 'labels' in OSX might find some
comfort in the idea that instead of implementing labels, maybe, just
maybe, Apple is taking the extra time it needs to switch to a proper
database-file system which will make labels more than obsolete. (Why
else would they not have implemented labels already?)

Anyway, do skim the article. While it may be a year old, it's very
interesting.

 It's funny how often I hear of Be as the greatest OS of all
 time.  It's too bad I never had a chance to use it myself.

Truly, especially when you consider that there's not an OS in
existence today that is anywhere near capable of emulating it either.

I await Palm's next OS offering with bated breath...

Brennan
[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-02 Thread Brennan
On Sat, 01 Feb 2003 12:11:24 -0500, Carl West [EMAIL PROTECTED] wrote:

 [EMAIL PROTECTED] wrote:
  
  Unfortunately I think that's the only way you'll be able to
  do it (applescript).

I would agree with this, unless Xtras are involved. Problem with the
Applescript approach is that it requires QuickTime PRO to be in place.
Apart from that, it's very easy to merge media from arbitrary sources
into a new .MOV file.

  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.

Hear hear.
 
 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.

Glu32 would probably be a lot easier, no?

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

If it were only a cuepoint creation tool, I would agree with you, but
being able to manipulate the entire QT api through Glu32 would be a
major big deal for a lot of people. 

Having tried a couple of times to get my head around Glu32, with
Gretchen's blessing and support I can't make head nor tail of it. I'll
probably try again some time because it would be so damn useful.
(Doesn't help that MacOS is such a moving target).

Example; you could create something like 'cleaner', and even improve
on it - allowing different ranges of frames to be compressed with
different codecs - to best suit the content. (Cleaner doesn't do this,
but QT supports it.)

 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.

I can't imagine what this could be. The most commonly mentioned
scripting tools on the applescript lists seem to be PERL, PHP and
Python. I think there are some hooks in Python for accessing
QuickTime.

You might be thinking of tcl, which has had a Quicktime interface for
a while. I don't know if anyone uses it though.

The other possibility is 4D, which has a plugin called Qmedia which
allows you to do loads of funny stuff with QuickTime. Again, this is
way off my radar. (Not least because it's quite expensive).

Note, there's a neat little shareware (freeware?) app called 'Final
Chapter' which does chapter tracks quite painlessly. Check it out.

Brennan
[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-02 Thread Brennan
On Sat, 1 Feb 2003 20:17:04 +0100, fluxus [EMAIL PROTECTED]
wrote:

 there might be another way to do this: you could edit and save
 SMIL-text-files with fileIO-xtra. opened with quicktime they
 get converted to mov on the fly. multiple parallel tracks
 correspond to multiple items inside a par.../par-element.
 As SMIL is XML, you could use the xmlParser-xtra or, in case of
 director MX, the flash-xml-object as well.

True, but... the tracks that get created from SMIL are 'Movie Tracks',
very much like the Flash 'movieclip' abstraction in that they are
recursive containers for other movies (which may in turn include other
movie tracks etc.). They are known as MIAMs in the QuickTime community
(Movie In A Movie).

I don't believe a chapter track would be treated as a cuepoint track
if created in this way.

Still, it's a good approach for some other designs. By setting the
filename of a QuickTime member to the SMIL file you just exported with
(say) fileIO, you get almost realtime feedback. This works quite well.

Brennan
[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 java fun..

2002-12-26 Thread Brennan
On Thu, 26 Dec 2002 09:40:22 +0100, Andreas Gaunitz P11 [EMAIL PROTECTED] wrote:

 Wow! This is great. Director is crawling out of its shell!

If the Register's rumour is to be believed, it might be crawling out of a shell into a 
.net

Brennan
[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 symbol weirdness...

2002-11-25 Thread Brennan
On Sat, 23 Nov 2002 15:57:15 -0500, Tab Julius [EMAIL PROTECTED] wrote:

 HOWEVER, they are regenerated every time you restart Director.  So, if you 
 have changed all your code to say #English, then exit Director, come back 
 in, and you should now see it come up as #English.

Mac users might be interested in a freeware Xtra which dumps the symbol table

http://www.pimz.com/xtras/index.htm

As well as discovering how many junk symbols your movie is dragging around with it 
(for example if you temporarily/accidentally link a cast full of scripts to your 
movie, all the handler names will get added to the symbol table), this is especially 
useful for finding undocumented Lingo commands.

I believe I was the first to discover 'the commandLine' property, thanks to this 
trick. There are a bunch of other undocumented symbols in there. Most of them seem to 
be duds, obsolete/deprecated terms or reserved for future developments, but there may 
still be secrets to be prized out.

Brennan
[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 rid of Internal?

2002-10-24 Thread Brennan
On Wed, 23 Oct 2002 16:00:24 -0500, Howdy-Tzi [EMAIL PROTECTED] wrote:

 On Wednesday, October 23, 2002, at 03:10 PM, Kurt Griffin wrote:
 
  Brennan has been after this kind of thing at a more meta level for a 
  while -
  the ability to script Director. If we could script Director, you could 
  run a
  script on startmovie that would check to see if the activeCastLib 
  (already a
  lingo property that can be tested... but not set) is 1, and then close 
  the
  sucker. One powerful tool can solve a whole lot of It only matters to 
  one
  guy problems.
 
 Yes, that would of course be the most ideal solution. An entire cottage 
 industry could spring up with various folks offering packages that 
 could be used to totally customize and optimize the Director 
 environment to suit anyone's needs.

Right, ditching 'Internal' taken alone would not serve the broader community, or add 
much value to the product, but I certainly believe that making (say) 'publish' or 
'export as quicktime' scriptable would sell a few more units (perhaps special 'server' 
or 'production bundle' licenses could be in order). The more that Director is 
scriptable, the more versatile and useful a tool it becomes to more people as part of 
more (and more varied) production processes. 

Director used to own the market that After Effects now dominates. Clearly, Macromedia 
has no interest in using it to recapture that market today, but there are various 
niches that After Effects does not reach - most obviously the lack of a scripting 
language - and it seems a dreadful waste not to be able to incorporate the immense 
power of imaging lingo into other kinds of automated production (especially 
non-real-time generation of content) for the sake of hooking up already-implemented 
functionality.

Director has repeatedly proved itself a master of versatility, and the various twists 
and turns in its history have often been driven by its unexpected adoption by 
particular communities. (Who in the mid 1990s would ever have expected it to become 
the number one 3d webgame development platform?). Making Director fully scriptable, or 
at least extending its scriptablity, would capitalize on that versatility enormously 
and, who knows, maybe capture a few markets we didn't know existed.

So, in case it is not obvious, the thing is for as many of us as possible to 'wish' 
for this using the ritual which has become sacred to our brotherhood. (And 
sisterhood). The incantation for this particular magickal rite is;

mailto:wish-director;macromedia.com?subject=Scriptable%20Authoring%20Environmentbody=Please%20make%20the%20Director%20authoring%20environment%20fully%20scriptable

Brennan
[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 rid of Internal?

2002-10-24 Thread Brennan
On Thu, 24 Oct 2002 13:58:08 +0200, Andreas Gaunitz P11 [EMAIL PROTECTED] wrote:

 So, in case it is not obvious, the thing is for as many of us as 
 possible to 'wish' for this using the ritual which has become sacred 
 to our brotherhood. (And sisterhood). The incantation for this 
 particular magickal rite is;
 
 
mailto:wish-director;macromedia.com?subject=Scriptable%20Authoring%20Environmentbody=Please%20make%20the%20Director%20authoring%20environment%20fully%20scriptable
 
 Ha ha, cool link!
 
 I'm not sure what the exact benefits of a scriptable director would 
 be though. Isn't every projector or SW we make just a subset of the 
 Director environment, with the chosen functionality included?

Well, crucially, we are missing most of the export functionality. 

I'm not arguing for the need for Projectors to have extra functionality. I can see why 
Macromedia would not want us to generate dcrs from Projectors - it could cannibalize 
Director sales. 

 It can 
 easily be configured (programmed) to generate content using imaging 
 lingo etc... Please give some examples of what a Scriptable Director 
 can do!

Well, Director is partly scriptable, but almost all the scripting is focused on and 
limited to the movie object. 

I'm interested in authoring-only lingo commands which would allow us to generate and 
reorder castlibs, dcrs, dxrs, QuickTime movies and Projectors. I'd also like to see 
lingo callbacks for milestone operations such as app launch, quit, opening, closing, 
saving and exporting movies, the ability to script preferences, the visibility and 
bounds of the various authoring windows, open the editor of a given castmember, 
perhaps even the ability to apply photoshop plugins to bitmaps, plus better and more 
explicit support for tool Xtra MIAWs, so that they can be more integrated into the 
GUI. (Toolbar buttons for tool Xtra MIAWs, or even toolbar buttons for 'global' 
scripts).

We're talking about a handful of hooks to things which are already implemented in 
Director's GUI, but are tantalizingly beyond reach of Lingo. 

Brennan
[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: Wishlist gloom (Was lingo-l Getting rid of Internal?)

2002-10-23 Thread Brennan
On Tue, 22 Oct 2002 09:52:18 -0700, Buzz Kettles [EMAIL PROTECTED] wrote:

 don't hold your breath on it getting removed

 I wouldn't bother with wishlist - there's no way your request would 
 get addressed.

Buzz, this strikes me as rather gloomy, especially coming from an ex-Macromedia guy.

I was (perhaps naively) under the impression that the wishlist is not ignored, but 
that multiple requests from unique users are what really counts.

Maybe it's the specific nature of this request that you think would be taken to be 
'unreasonable'.

Any cats you can let out of the bag to help us manage our expectations?

If macromedia really are ignoring requests and the wishlist, we ought to organize to 
let the management know our dissatisfaction. We've already seen some kind of response 
to complaints about poor developer support.

Brennan
[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 Re: quicktime video

2002-09-04 Thread Brennan

Evan Adelman [EMAIL PROTECTED] wrote
 
 my problem is, it seems that the loaded property returns true before the 
 video is actually loaded into memory, causing a nice blank type 
 appearance while it finishes loading. I've been watching win 2k pro's 
 memory inspector, and it shows the memory climbing (about the size of 
 the movie file size) after loaded returns true.
 
 is there a better way? i've tried checking the streaming property, but 
 it seems from reading d8.5 help that steaming applies to network steaming.

Apart from earlier suggestions, which are worth exploring, what codec are you using? 
Some of the more recent codecs don't 'arrive' on the stage as nicely as some of the 
older ones, particularly on Windows. Consider putting a stretched still image at the 
start of your Quicktime movie in a really easy-to-load format - e.g. something which 
uses run-length-encoding. Make sure the dimensions match the video track.

Use 'Add Scaled' in Quicktime Player to stretch any still image over a selection of 
desired duration on an arbitrary movie, then extract the track you just added. You can 
then copy and paste it at the front of your movie and save. Your QT movie will then 
start with an easy-to-load still image, which might help the white flash problem a bit.

BTW one variant of the 'move onstage after one frame' technique is to have 
'direct-to-stage' set to false, and then set it to true in a beginsprite handler. (Set 
it to false again on end sprite). This will have Director composite the QT for exactly 
one frame and then hand control over to QuickTime. (This is not recommended for QTVR 
which breaks completely if you mess with direct-to-stage at runtime).
[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 shockwave.ini file on OSX?

2002-08-12 Thread Brennan

I'm getting some OSX-only shockwave errors. Does anyone know where to put the 
shockwave.ini file on OSX so that I can get full error text?

Thanks in advance.

Brennan
[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 OT: Get LiveStage 2.1 for free!

2002-07-27 Thread Brennan

FYI:

 Date: Mon, 22 Jul 2002 11:59:09 -0700
 To: [EMAIL PROTECTED]
 From: David Gratton [EMAIL PROTECTED]
 Subject: Re: uk users! livestage free!
 

 At 3:17 PM +0100 7/22/02, jake williamson 28 wrote:
 hey chaps and lass's,
 
 just been to my local newsagents and the august edition of computor arts has
 a fully working FREE copy of livestage pro 2.1 on the cd cover!
 
 worth the 6 pound fee of the mag alone!
 

 There is also a wonderfully detailed tutorial in the Magazine for you 
 to follow.   LiveStage Professional 2.1, will work with QuickTime 3 
 through 6.  However all the interactive features implemented after QT 
 4.1 (Database Connectivity, Full Screen Toggle, Flash 4/5, Skins, and 
 dozens more) require LSP 3.1.  There is an upgrade path available for 
 the Computer Arts LiveStage 2.1 owners.  Details are in the magazine. 
 it should be in North American Stores next month.
 
 
 This is a great way for you to create deployable projects and get 
 your feet wet in Interactive QuickTime.  There is a wealth of 
 resources located at:
 http://www.totallyhip.com/lsdn/ and http://blueabuse.totallyhip.com/

This is a TREMENDOUS bargain. Anyone interested in interactive video, or exploring 
Quicktime's darker corners should snap it up. LSP 2.1 is certainly powerful enough to 
do fab things with as most of the current sprite api is in place in that version. 
These movies can then be brought into Director (etc.). Looking forward to seeing some 
of you on the LiveStage and/or QuickTime list!

(Apologies to all, and especially to Tab for being off topic).
[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 Re: Hacking media out of a projector

2002-07-09 Thread Brennan

Of course, as soon as I sent the script I discovered that my trimming and adjustments 
in order to get it to fit neatly into a narrow-ish email window had introduced a small 
bug. The alert in the 'tell' block should read

event miscdosc Alert \Ready to export castlibs to   out  \


Duh! Hope someone finds it useful/interesting.

Brennan
[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 QuickDraw 3D Xtra not work

2002-05-16 Thread Brennan

Buzz Kettles [EMAIL PROTECTED] wrote

 Conclusion:
 If you are interested in doing 3D in Director, the Shockwave 3D Xtra 
 introduced in Director 8.5 is a MUCH BETTER path to follow (QD3D is a 
 dead end).

Not to mention that QD3D is officially deprecated, indeed Quickdraw itself is being 
replaced by Quartz.

(Although Apple haven't brought OpenGL inside Quicktime yet).

Brennan
[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 Director 8.5.1 in os x environment

2002-04-13 Thread Brennan

Howdy-Tzi [EMAIL PROTECTED] wrote

 So I returned to my Classic extensions manager and started looking 
 for likely culprits.

 And THEN I took a close look at my third-party INITs. There were 
 about a dozen Microsoft extensions, all having to do with OLE.
 
 Oho. Well OLE lets you *drag and drop* objects from one doc to 
 another, embedding code, links, references, etc. -- say, a 
 spreadsheet inside a Word document.
 
 The operative term here is drag and drop.
 
 Aha, thinks I, I'll purge these too. Did it.
 
 While it didn't totally nuke the problems, it does seem to have 
 increased stability considerably.

When I installed OS 9.2 on my X machine (completely clean install of both) I took care 
*not* to install MSIE or MSOE. As you have discovered, while these inits might make 
Microsoft's apps behave the way MS want, they tend to make everybody else's apps run 
dreadfully. If you can afford it, have at least one Mac which is uncontamintated by MS 
extensions. Better still, keep all your MS apps on only one Mac and keep any others 
'clean'. Feel the difference. Those extensions contribute greatly to the instability 
of OS9. 

And the horrors continue; So far, the only time I've had to force-restart OSX was 
because IE went into a dead loop. Every other app responds to a 'force quit' from 
process watcher.

I don't think this is the problem that we are hunting, however. I only just got 8.5 
myself, and my Classic installation is OS 9.2.1, so I can experiment a bit...
[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 Re: How do I learn lingo scripting?

2002-04-10 Thread Brennan

Justin Olmanson [EMAIL PROTECTED] wrote

 Go through Brennan Young's Invadirs game tutorial. Stop when you get lost 
 and finish the project as best you can. Revisit the tutorial very two to 
 three months making a new game each time (noting your progress).
 
 http://brennan.young.net/Edu/Lingvad.html

Wow, that's interesting advice!

I'm always interested in suggestions and comments about the Invadirs tutorial, even if 
I have no time to act on them.

I appreciate your suggestion to 'finish as best you can'. That's exactly the attitude 
I was trying to cultivate. It was the 'revisit every two to three months' that 
surprises me. Are you saying you've been using it as some kind of reference?

...but yes, people do seem to get lost somewhere around lesson 17. (There's a 
screenshot which conflicts with the text in that lesson, or thereabouts. Depending 
which one people take most seriously, they may or may not hit a bug which requires 
thinking outside the box. For some people that's not even conceivable. :)

I've had an update in the works for over a year which ought to make the last lessons a 
bit less heavy-going, but there's only so many hours in the day, and writing a 
smoothly pedagogical bug free tutorial involves a kind of meta-level debugging that is 
not to be undertaken lightly.

I am torn between making the tutorial become a complete game or keeping it as 
primarily as a learning tool. You certainly learn a lot by finishing stuff off, even 
if (or especially if) it's not as good as you know you can make it. Maybe that's the 
most valuable lesson of all.

One thing I've seen with feedback on my tutorial is people who follow the code too 
slavishly, without experimentation, and don't use the effort to understand the main 
body of the text instead. I guess there's no way around that. 

Almost all feedback has been positive though, and I'm confident that it has set a fair 
number of folks on the path of light.

Thanks for mentioning it!
[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 Re: launching authorware from director (is: audio in other apps with director running)

2002-03-03 Thread Brennan

marc real [EMAIL PROTECTED] wrote:

 i have launched authorware from director 8 but there
 wasno audio from authorware.
 how or what lingo will i use to have audio and mpeg
 playing from authorware after being launched or opened
 from director-with audio and no quicktime or .avi

Sounds like a job for 'the soundKeepDevice'. I'm not sure if it will work, but it's 
designed for something like that.
[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 Filename of member (Is:leniency with global properties)

2002-01-19 Thread Brennan

I would have responded sooner, but I couldn't see my computer for about three hours. 

Then I realised someone had moved my chair and I was actually sitting on the floor 
looking at the table legs. Doh!

Bruce Epstein - Zeus Productions [EMAIL PROTECTED] wrote:

 I quote an esteemed colleague talking about XML parsing:
 
 Be strict in what you send, lenient in what you accept.  There's a very
 large chunk of the XML community that thinks their software has done
 its job as soon as it rejects a document for being non-conformant.  If
 networks were built that way, we'd still be talking with tin cans and
 string.
 
 Applying this to Lingo:
 
 1. I will strictly write solid code
 2. I will tolerate poorly behaved code as best I can (see number 1).
 
 Applying this to the argument at hand, I am lenient enough to accept 
 your strict interpretation. ;)

Well, true enough, strictness might be too much to expect from others, but the problem 
with 'looseness' is that everybody has a different idea of what it is.

I think Jakob's point is well made, but the really important thing is not to be 
accountable when someone says My code broke and we lost the gig/contract/bonus 
because your code forgot to reset the itemDelimiter.

Also, if you're operating on a 'black box' prinicple, creating a routine (or if you're 
an OOP type, writing a method) which is going to be called from inside someone else's 
code which may or may not be using the itemDelimiter or the floatPrecision or 
whatever, don't you have some kind of responsibility to save and restore? 

If not, shouldn't you document that the routine/method has side effects?

on brennanscode

  the itemDelimiter = :
  out = 
  str = Macintosh HD:Documents:Porn:GoatLover.jpg
  c = str.item.count
  
  repeat with n = 1 to c
j = jakobsCode(str, n)
out = j.item[n]
  end repeat

end

-Brennan
[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 Shockwave sound channels on Windows

2002-01-16 Thread Brennan

To increase the number of available 'virtual sound channels' from 4 on Windows you 
have to faff around with the Director.ini file.

Anyone know what the story is with Shockwave?

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