lingo-l XML, fileIO, encoding

2006-09-28 Thread Mendelsohn, Michael
Hi list...

I'm reading in an XML file with fileIO and in the original test file I
made, I got a few extra weird characters before the ?xml? tag. They're
not there now, after I've created a new .txt file and renamed it .xml.
But, other people will be editing this xml file, so how can I be sure
those characters won't creep in again?  I suspect it had something to do
with encoding.  Aren't' there some bits that either appear or don't
appear at the beginning of a file depending on encoding?  I'm not sure,
anyone have some thoughts?

Thanks,
- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l CDPRO xtra question: eject()

2006-06-27 Thread Mendelsohn, Michael
Hi list...

Does anyone use the CDPRO xtra?  I have a routine that finds the correct
drive and ejects the disc, but after doing this, if you display My
Computer, the icon for that disc persists, even though it's ejected.  It
won't change upon refreshing, and it will only change if you put in
another disc in that drive.  Anyone experience this problem?  Below is
my code.

Thanks,
- Michael M.


on mQuit()
  -- decide to eject the disk...
  if _player.runmode = Projector then
-- figure out all the available hard drives
theDrives = baDiskList()
theHardDrives = []
-- build a list of hard drives...
repeat with i = 1 to theDrives.count
  theLetter = theDrives[i].char[1]
  theType = baDiskInfo(theLetter, type)
  if theType = Hard then
theHardDrives.add(theLetter)
  end if
end repeat
theProjectorLetter = (_movie.path).char[1]
theShouldEject = theHardDrives.getOne(theProjectorLetter) -- is the
projector letter a hard drive, 0 if it's not
if (theShouldEject = 0) then
  -- figure if the movie is on (one of) the CD drive(s)
  theOnDisc = baDiskInfo(theProjectorLetter, type)
  if (theOnDisc = CD-ROM) then -- not on hard drive, is it in a CD
drive?
theDrives = pData.pXtras.pCD.getCDdrive() -- figures how many
external drives, if 2+, returns list
if listP(theDrives) then
  -- more than one CD drive is available, determine which one to
eject
  repeat with i = 1 to theDrives.count
if theDrives[i].char[1] = theProjectorLetter then
  pData.pXtras.pCD.selectDrive(i)
  exit repeat
end if
  end repeat
end if
pData.pXtras.pCD.eject() -- make sure to eject correct door!
  end if
end if
clearglobals
quit
  else -- author
clearglobals
halt
  end if
end


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l In lieu of no arguments.caller?

2006-06-02 Thread Mendelsohn, Michael
Hi list...

I have a Flash sprite that's calling a lingo function from two places:
either within the Flash sprite itself, or from a MUI callback.  Called
from within the swf sprite, whichClip is a valid reference to the
movieclip within the swf, but when called from the MUI, it's void.  

The problem is this line:
theClip = sprite(whichSprite)[whichClip]

The swf sprite sees it, but from the MUI, it's void.  However, if I
alter it to:
theClip = sprite(whichSprite)[whichClip]._target
Then the MUI sees it, but the swf sprite doesn't.  It's as if I need an
arguments.caller function, which as far as I know, doesn't exist in
lingo.

Any advice is greatly appreciated.
- Michael M.



on mCustomizer(me, whichSprite, whichClip, whatItem)
  case whatItem of
hotLine:
  theClip = sprite(whichSprite)[whichClip]
  case pData.pLocality of
ENA:
  theClip._alpha = 0 -- add ._target param because flash object
ref was being passed, not the path???
otherwise:
  theClip._alpha = 100
  end case
  end case
end


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l Is not OK to attach?

2006-02-24 Thread Mendelsohn, Michael
Hi list...

I'm dabbling in the js syntax and I've found that adding the below to a
behavior won't allow it to attach to anything.  Am I missing something?

- MM



function isOKToAttach(spriteType, spriteNum){
switch (spriteType) {
case symbol(graphic):
return true;
case symbol(script):
return false;
}
}


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l Is not OK to attach?

2006-02-24 Thread Mendelsohn, Michael
Sorry Tom, that didn't work.  For some reason, when I add that handler,
the behavior won't attach to anything.

- MM

In contrast to what you state, there's no scriptReference param passed??
From the documentation:
// JavaScript syntax
function isOKToAttach(aSpriteType, aSpriteNum) {
switch (aSpriteType) {
case symbol(graphic): // any graphic sprite type
return sprite(aSpriteNum).member.type !=
symbol(shape);
// works for everything but shape cast members
case symbol(script): // the frame script channel
return false; // doesn't work as a frame script
}
}



 Yes, the first parameter passed to the isOKToAttach is a reference to
the script cast member itself (note that it is _not_ a reference to the
instanced script for it hasn't been instanced yet), the second is your
spriteType. So change your isOKToAttach handler to be like this:

function isOKToAttach (scriptRef, spriteType, spriteNum) {
 ...
}

Please note that this is true in both Lingo and JS syntax.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l buddy api xcopyprogress without dialog problem

2006-02-23 Thread Mendelsohn, Michael
Hi Julian...

If you'd like, post the code you've got.  I'm curious to see what's
going on.  I am skeptical that it's an SP2 problem.  That's what I have
too.

Have you tried:

On baCopyProgressUpdate pct, fileName
put pct
put fileName
End

Is it getting the right values there?

- MM



 yeah, sorry - I'd altered it back to 16 to get on with the job.
It all works fine apart from adding CP_NODIALOG/8 to my flag total.
i wonder if it's xp sp2 related. I've mailed gary budapi to see if he 
can get to the bottom of 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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l Sprite(-5) stealing the show

2006-02-23 Thread Mendelsohn, Michael
Hi list...

I have a frame script that's interrupting the flow of code.  I suspect a
bubbling issue.  A swf sprite, on mouseUp, calls a parent script.  When
debugging, I can see it gets to the parent handler, but this always
occurs on a frame that has a frame script on it.

In that frame script, I have a handler:

on mouseUp(me)
  if pHandler = mouseUp then
do(pDoWhat)
  end if
end

on exitFrame(me)
  if pHandler = exitFrame then
  -- here, pDoWhat = _movie.go(_movie.frame)
do(pDoWhat)
  end if
end

The mouseUp handler grabs the code out of the parent script and
automatically into the frame script, after one step.  I think it's a
combination of a bubbling issue and the on enterFrame handler, so how
can I prevent the code from being diverted from its intended flow?

Thanks,
- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l Passing {} to a swf sprite

2006-02-17 Thread Mendelsohn, Michael
Hi list...

The following line of lingo works, but the params object gets ignored: 

sprite(2)._root.attachMovie(clip, clip, 50, {_x:40, _y:85})

The clip MC shows up at point(0,0).  Could this be some wacky syntax
issue I'm missing?

Thanks,
- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l code

2006-02-17 Thread Mendelsohn, Michael
Great for the fundamentals...
http://www.jmckell.com/



 Anybody know of some good new sites where I can take lingo code
examples for 
games and interesting effects for free?


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l Umm...gee...can I ask this question?

2006-02-17 Thread Mendelsohn, Michael
Hi list...ahem...Tom...

I have a project that could benefit greatly by using the On2 video
encoder for Flash 8 instead of the Spark for 7.  Just curious, when will
the Flash 8 xtra be available?

Humbly asking, but not expecting specifics, just semantics,
- Michael M.



[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l Reg entry reliability

2006-02-09 Thread Mendelsohn, Michael
Hi list...

I'm using the following reg entry to retrieve the three letter language
 locality (using buddyAPI):

HKEY_CURRENT_USER\Control Panel\International\sLanguage

I'm wondering if this reg entry is available on all the various versions
of Windows, or somehow if this entry could appear in different places on
some machines?  I'm error checking for it in my code with a default to
English, but I'd like to get others' opinions.  I guess in a nutshell,
I'm asking if the Windows registry varies, or is it always universally
structurally the same.

Thanks,
- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l Smoothly animating maximizing a MIAW

2006-01-26 Thread Mendelsohn, Michael
Hi list...

I'm working on a handler for a window with a maximize button where
clicking it stretches out the rect and drawRect of the MIAW to fit the
screen.  It works, but it's really choppy.  Is there anything I can do
to the math here that will help to smooth out my transition?

Thanks,
- Michael M.



on resizeMIAW()
  gData.pViewPref = not gData.pViewPref -- boolean, toggles in normal
size or full screen
  case gData.pViewPref of
FALSE:
  -- make sure maximized projector's drawrect is same aspect ratio
as original 800x600 (1.333:1)
 -- values on next line are based on baScreenInfo(width and
height)
  if gData.pScreenInfo.pWidth = gData.pScreenInfo.pHeight then
-- not done yet
  else
startValue = gData.pScreenInfo.pHeight
repeat with newHeight = startValue down to 1
  newWidth = integer(newHeight * 1.333) -- 1.333 is aspect ratio
of the stage   
  if (newWidth  gData.pScreenInfo.pWidth) then exit repeat
end repeat
-- stretch as full screen as possible
coeff = 1.4
repeat with incrementHeight = (the stage).rect.height to
newHeight--(the stage).rect.height to newHeight
  incrementWidth = integer(incrementHeight * 1.333)
  theL = integer(float(gData.pScreenInfo.pWidth -
incrementWidth)/2)
  theT = integer(float(gData.pScreenInfo.pHeight -
incrementHeight)/2)
  theR = integer((float(gData.pScreenInfo.pWidth -
incrementWidth)/2) + incrementWidth)
  theB = integer((float(gData.pScreenInfo.pHeight -
incrementHeight)/2) + incrementHeight)
  (the stage).rect = rect(theL, theT, theR, theB)
  (the stage).drawRect = rect(0,0,(the stage).rect.width, (the
stage).rect.height)
  incrementHeight = incrementHeight * coeff
  coeff = coeff * .9
  if (incrementHeight  newHeight) then
incrementHeight = newHeight
  end if
end repeat  
  end if
  -- end if
TRUE:
  nothing -- yet
  end case
end


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l scriptInstanceList

2006-01-17 Thread Mendelsohn, Michael
Hi Rob...

Thanks for responding.  I have no idea why it returned [].  Anyway, I
switched the code to reference the scriptList instead, and I'm able to
do what I want that way.  It's a mystery why scriptInstanceList isn't
working there, because it works everywhere else I use it.  Perhaps
you're right in that I've done something somewhere else to erase it.

Regards,
- MM



 I don't think that should be happening. You should still get a list, I

just did a quick test to confirm on Win XP D10.1

Having a behaviour with no params gives me

-- [offspring test 1 3731674]

Any way you might be clearing out the scriptInstanceList via code? Even 
earlier on in another part of the score?

What if you put sprite(2).scriptList?


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l scriptInstanceList

2006-01-17 Thread Mendelsohn, Michael
Thanks, Tom and Rob for responding.  I do appreciate it.

- MM





 Agreed, do check your code as any behaviors found in the scriptList
should get instanced at run-time and then be found in the
scriptInstanceList, unless you do something to change that. I too can
confirm on my end that all seems to function as expected (I see a
param-free behavior instance in a sprite's scriptInstanceList).


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l js syntax weirdness

2005-12-23 Thread Mendelsohn, Michael
Hi list...

In js syntax, I can't get the following to work:

if(pVidSprite.member.type == symbol(VisibleLightOnStageMedia)){
 //do stuff
}


When I trace(pVidSprite.member.type);
// #VisibleLightOnStageMedia 

pVidSprite is always correctly sprite(21). 

The result I am experiencing when debugging is that it steps out of the
entire behavior without error.

Any ideas?
Thanks,
- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l getPropertyDescriptionList: js syntax

2005-12-20 Thread Mendelsohn, Michael
Thanks for answering all the questions, Tom.  You da man!

I wouldn't have ever guessed that proplist() is the constructor for a
new [:] in js syntax.  I would have thought it would be 
Mylist = new propList();
or
myObj = {};

I guess there's going to be a lot of trial and error in learning what I
think is some uniqueness in the implementation of js in Director.  But,
I'm one day hoping to use one syntax everywhere.  Let the laughing
begin.


- MM






Bingo! Valentin hit the nail on the head. You must (a) make a
_property_list_ (not an Array with named entries), and (b) use
symbol(someString) as the # character is not supported within JS scripts
(although the symbol data type is via the symbol() function).


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l getPropertyDescriptionList: js syntax

2005-12-19 Thread Mendelsohn, Michael
Hi list...

I'm trying to convert a GPDL handler from lingo syntax to js syntax.  I
keep getting illegal character errors.  I've tried many different
combinations of quotemarks and pound signs denoting symbols as lingo
symbols or strings, but I can't figure this out.  Anyone done this
before?

Thanks,
- Michael M.


// goodness, gracious.

function getPropertyDescriptionList(){
  var theList = new Array();//[:];
  theList[#pFile] = [:];
  theList[#pFile][#comment] = What file to open?;
  theList[#pFile][#format] = #string;
  theList[#pFile][#default] = ; 
  theList[#pFile] = listy;
  return theList;
}


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l Missing formal parameter

2005-12-16 Thread Mendelsohn, Michael
Hi Adobe friends...

I'm taking a stab at converting my lingo scripts to javascript syntax.
I started with a very easy one. My question is why does on
beginSprite(me) NOT translate to function beginSprite(this){}.  That
returns an error of missing formal parameter, and function
beginSprite(){} compiles when omitting the this.

Thanks,
- Michael M.




-- lingo:
property pSp

on beginSprite(me)
  pSp = sprite(me.spriteNum)
end

on exitFrame(me)
  theNumber = random(1701336, 888)
 pSp.member.text = string(theNumber)
end

--
//javascript:
var pSp;

function beginSprite(this){
  pSp = sprite(this.spriteNum);
}

function exitFrame(){
  var theNumber = Math.round(Math.random() * (888 - 1701336) +
1701336);
  pSp.member.text = theNumber.toString();
}


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l Missing formal parameter

2005-12-16 Thread Mendelsohn, Michael
Thanks for the response Tom.  Score one for Adobe customer service.  :-)
I think I mostly understood that.  But, I don't understand: you *don't*
have to declare your script's properties at the beginning of a js
script?  And how do you distinguish between declaring a global and a
property at the beginning of a js script?  Isn't the scope equivalent
where you have to declare them?  After all, in an AS2 external class, I
declare those props at the beginning.  Isn't it similar here?

- MM






In JS syntax this is implicitly available and so you don't need to
include it as a passed parameter to the creator (beginSprite) function
in your script, doing so causes the compiler to obviously choke
(producing the formal parameter error you are citing). Just rename it or
exclude it, but keep in mind that something akin to the 'me' parameter
will be passed to beginSprite and any method calls made off the sprite,
but in your scripts you can always implicitly use 'this' without ever
having to declare it (and also without declaring your properties at the
top of your script like you did).


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l Missing formal parameter

2005-12-16 Thread Mendelsohn, Michael
Thanks, Tom, it makes sense.  I never imagined you could emulate public
and private variables within a behavior that simply.  It has sunk in,
but getting it to stick in my brain is a different story...

Going forward, I may have more questions on js syntax.  A recent project
I just completed made extensive use of Flash--Director communication,
and I am just pondering the notion that it might be easier to stay
within one syntax between the two programs, even though I was raised on
lingo.  I think it might make it easier in the long run for me.  One
thing I'd like to suggest, is that in the script window, the js syntax
doesn't seem to auto-indent when, in my case, I actually get it correct.
:-)

- MM


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l Missing formal parameter

2005-12-16 Thread Mendelsohn, Michael
See, Tom?  I knew it wouldn't be long before I had another js question.

Say I declare a global variable called gData in a movie script written
in Lingo syntax.  I want to access gData in a behavior written in js
syntax.

Is it declared at the beginning of the js behavior?
_global.gData

And how would it be referenced within a function within that behavior?
function readData(){
if(_global.gData == true){
// or if(gData){}what's best?
}
}


Slightly perplexed,
- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l PDF - searching

2005-12-01 Thread Mendelsohn, Michael
Below is a handler utilizing buddyAPI that opens pdfs to a specific
spot, so long as your audience has Acrobat version 6, which is the
minimum version that handles opening parameters.  Hopefully it will work
for you.

- MM 



on mOpenPDFwithParams(me, whichOne, theFolder, openingParams)
  -- USAGE (Acrobat version = 6):
gTools.mOpenOperatingStandards(thePdf,  /A page=137 )
  thePath = string(pData.pMoviePath  articles  pData.pDelim 
theFolder  pData.pDelim  whichOne) -- my path to a PDF
  sprite(pData.pSprites.pMenu).menuMember = member(theLogoMenu,
assets) -- reset to the info member
thePath = baShortFileName(thePath)
if thePath   then -- found this pdf doc, so open it
theApp = baShortFileName(baFindApp(pdf))
theAppString = theApp  openingParams  thePath-- openingParams
must be surrounded by spaces, possibly within its quotes!
-- open theAppString
theResult = baRunProgram(theAppString, Normal, FALSE)
if theResult  32 then
  baMsgBox(string(Error Code  theResult  .  Document
failed to open.), Error, OK, Stop, 1)
end if
else -- pdf doc doesn't exist, so alert and leave
  baMsgBox(It appears that you don't have Acrobat on your
computer., Open error!, OK, Stop, 1)
  exit
end if
end


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l PDF - searching

2005-12-01 Thread Mendelsohn, Michael
Also...there's a great document available on the Adobe web site:
PDF Open Parameters
Technical Note #5428

There's some really cool stuff there.

- MM


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l lastIndexOf lingo equivalent

2005-11-22 Thread Mendelsohn, Michael
 is it the # of the last element in a list?

Sorry, Buzz.  I should've been clearer.  I'm looking for a quick way to
take a path (string) and chop it down to just the file name.  I came up
with this:

on reduceToFileName(thePath)
  -- chops off all slashes (char 92) and returns just the file name.
  repeat with i = thePath.length down to 1
if(charToNum(thePath.char[i]) = 92) then
  return thePath.char[(i+1)..(thePath.length)]
  exit repeat
end if
  end repeat
End

-- example:
fileName = reduceToFileName(C:\Documents and
Settings\currentUser\Desktop\web.html)
put fileName
-- web.html

I figured simply getting the last index of the \ would work easier.  I
could have sworn that at one time, Tom Higgins posted one line of MX2004
syntax to do this, and I just can't remember what it was, and that
dastardly lingo-L list yields no results.  :-)

Thanks,
- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l Determining the language and regional version

2005-11-08 Thread Mendelsohn, Michael
Hi list...

I need to determine the (Windows) UI language and further, which
geographic version of that language.  For instance, are they using
English (en), but is it American English or UK English...or French or
Canadian French?  Creating a Flash Object on the fly and using
System.capabilities.language works, but only returns the language, not
any local version.  

I'm therefore thinking of using Buddy API to find this info.  Has anyone
used the registry keys in HKEY_CURRENT_USER\Control Panel\International?
Is it safe to assume that I could use something there through many
versions of Windows aside from XP?

Thanks,
- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l Determining the language and regional version

2005-11-08 Thread Mendelsohn, Michael
Hi list...

I figured it out.  Read the reg entry for HKEY_CURRENT_USER\Control
Panel\International\sLanguage which retrieves a three letter code of the
ISO language two letters + one letter for the region.  The values are
here:
http://www.microsoft.com/resources/documentation/Windows/2000/server/res
kit/en-us/Default.asp?url=/resources/documentation/Windows/2000/server/r
eskit/en-us/regentry/LanguageIDTable.asp

Hope it's reliable enough worldwide.  :)

- MM


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l Projector expiration date

2005-10-26 Thread Mendelsohn, Michael
Thanks everyone for the responses, I appreciate them.  

I think with the circumstances I have to work with, Tim's response is
most suitable.  I'm not sure I can rely on the users having internet
access with Slava's or Ben's ideas, and I've been using buddyAPI all
throughout the project anyway.

Regards,
- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l Projector expiration date

2005-10-26 Thread Mendelsohn, Michael
Slick idea Kurt.  That is indeed an extra curve ball I just might
implement.

- MM


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l Emailing with baOpenURL

2005-10-07 Thread Mendelsohn, Michael
Hi list...

Is it possible to send an attachment with an email message generated out
of baOpenURL?

baOpenURL(mailto:[EMAIL PROTECTED],Normal) -- works

baOpenURL(mailto:[EMAIL PROTECTED]attachment=abc.doc,Normal)
-- ??

Thanks,
- Michael M.





[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l on activate/deactivate application

2005-10-05 Thread Mendelsohn, Michael
Hi list...

In my movie script, I have on activeApplication and on
deactivateApplication handlers.  I have one MIAW running, and the stage
is closed (not forgotten).  These handlers work fine if I do the
following: 

on activateApplication
  put a
end

on deactivateApplication
  put d
end

I get the appropriate two a or two d puts, corresponding each to the
stage and the MIAW.  However, if I add in any other lines of code like
below, the message window gets to a puts immediately after two d
puts, meaning the application automatically gives itself focus after
blur.

on activateApplication
  put a
  window(theTOC).blend = 255
end

on deactivateApplication
  put d
  window(theTOC).blend = 128
End

Any ideas how the projector gives itself back focus?

Thanks,
- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l Passing strings from XML attributes

2005-10-05 Thread Mendelsohn, Michael
Hi list...

I have a projector that's told what to do via XML.  Each node has a
command parameter like so:

theNode command=gTools.mMethod(want_a_string_here)/

...where my main engine reads the value of the command attribute and
does a do(whatsInsideCommandQuotes).  The question is, I'd like to pass
a string there, but that breaks the XML.  Escaping quotes won't work
(\), and neither will single quotes.  Must I resort to passing
integers?

Thanks,
- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: Re[3]: lingo-l Dir -- Flash communication (static)

2005-09-20 Thread Mendelsohn, Michael
Seems very interesting, but can you change the value of a prop of an
uninstantiated script?



 So for example, instances of a script can each refer to
'me.script.propertyName', and they all therefore have access to that
same property, essentially a 'static variable'-esque property.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l Dir -- Flash communication (static)

2005-09-19 Thread Mendelsohn, Michael
Hi list...

It seems to me that if you have a static variable in an external class
in a Flash swf, that property is not recognized by Director.  Can anyone
else confirm?

For instance, I have a swf with a variable _root.gTools (an instance of
class theTools with a static property pTrack).  

In Director's object inspector, sprite(swfSprite).gTools, when expanded,
doesn't show pTrack.

Thanks,
- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l Dir -- Flash communication (static)

2005-09-19 Thread Mendelsohn, Michael
Hi Tom...

 Ok, but can you use Lingo/JS to access pTrack regardless of the OI
issue? I'm just trying to sort out if this is a OI display bug or if
this is something more generic that's preventing even code-based access
as well.

Thanks for replying.  Seemingly not.  I'm testing this scenario in my
projector (debugPlaybackEnabled = true):


-- gTools instanced on _root, (external class)

put window(plantTour).movie.sprite(1).gTools
-- Object flashObject 1 941054

-- pTrack is a public static var object

put window(plantTour).movie.sprite(1).gTools.pTrack
-- Void

-- pSomethingZoomed is a public var boolean (no static property)

put window(plantTour).movie.sprite(1).gTools.pSomethingZoomed
-- 1

-- the following should be 3:

put window(plantTour).movie.sprite(1).gTools.pTrack.count
-- 0



[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: RE: lingo-l Dir -- Flash communication (static)

2005-09-19 Thread Mendelsohn, Michael
Yes, Buzz.  That's how static things operate.  I read the AS2.0 book
by Colin Moock that explains it.  Actually, I really, really like the
static attribute and hope it may find its way into lingo at some point.
I've found it to be quite useful.  In that book, it explains that
referencing a static prop is class.prop, not instance.prop, so you're
right, it's just that I forgot that point when I was trying to reference
it from my MIAW.  Mark Jonkman reminded me...thankfully!  :-)

- MM


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l OT: javascript/CSS question

2005-09-09 Thread Mendelsohn, Michael
Thanks Chuck. That link doesn't seem to work.  Oh well.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l OT: javascript/CSS question

2005-09-09 Thread Mendelsohn, Michael
Thanks for the resource, Tom.  I just can't wait for the day when all
the browsers have the same code.  :-)  I'm not holding my breath though.

- MM


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l Getting folders...

2005-07-27 Thread Mendelsohn, Michael
Hi list...

[WinXP]
I use the below buddy command to get a safe place to store data for the
projector.  I'm wondering if this registry key has been the same in
previous versions of Windows, and will likely stay the same with Windows
Vista, that is, if anyone has a crystal ball.  (And if you do have a
crystal ball, I have many more questions for you off list.)

baReadRegString(Software\Microsoft\Windows\CurrentVersion\Explorer\Shel
l Folders,AppData,Error,HKEY_CURRENT_USER)


Thanks,
- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l Getting folders...

2005-07-27 Thread Mendelsohn, Michael
Thanks Daniel and Valentin.

I noticed in Buddy Help under baSysFolder, there's a list of
corresponding numbers/folders in the Windows Platform SDK.  Where's that
list available?  

Also, I'm wondering if there's a web page somewhere that lists common
environment variables you can use in baEnvironment.  I have no knowledge
in that area, and I'd like to read up.

Thanks for the answers!
- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l Getting folders...

2005-07-27 Thread Mendelsohn, Michael
Excellent, Stephen.  Thanks for the tip.

- MM


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l xtra mui - #layoutStyle (#left, #centerH, #right) question

2005-06-24 Thread Mendelsohn, Michael
Hi Cole...

I've seen what you're talking about where all the widgets align to the
left.  I've had plenty of success when the window #mode is set to
#dialogUnit.

- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l set/getpref in projector on locked down Windows systems?

2005-06-10 Thread Mendelsohn, Michael
Hi Cole...

Our machines are as locked down as you can get, and I've been writing to
this spot with a projector:

-- XP, returns a path ALWAYS available to write to: C:\Documents and
Settings\LocalService\Application Data
  theAppData =
baReadRegString(Software\Microsoft\Windows\CurrentVersion\Explorer\Shel
l Folders,AppData,Error,HKEY_CURRENT_USER)

From there, I use FileIO to write all my data.


- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l baOpenFile quirk

2005-06-09 Thread Mendelsohn, Michael
Man, I'm stumped on this one.  I made sure that the whole length of the
paths and file names are about 80 characters in length, but some
machines still get this file not found error.  As baOpenFile is
successfully opening the pdf document, I'm not quite sure what else to
do besides suppress the error alert.  :-(

- MM





-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Christopher
L Philips
Sent: Thursday, June 09, 2005 12:06 PM
To: Lingo programming discussion list
Subject: RE: lingo-l baOpenFile quirk


could it be the length of the path? buddy had some issues with long file
paths in the past.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l baOpenFile quirk

2005-06-09 Thread Mendelsohn, Michael
Thanks for the idea, Neil.  I tried it, and unfortunately, the error
still came up.  The pdf isn't used anywhere else.  Maybe if I use Acme
Error-B-Gone, It'll go away.

- MM





 Did you try this?
f = your filepath
baOpenFile( baShortFileName( f ) , normal )

Or maybe it's the PDF. Is it being used somewhere else? Is it marked as 
read only? If not maybe switch it to 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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l GPDL not holding values

2005-05-26 Thread Mendelsohn, Michael
Hi Buzz and Kraig...

As always, thanks for responding.  I figured it out.  Something happened
that I've never experienced before.  In my GPDL, I had a #format of
#string and instead of setting the #default value to , I set it to
void.  That ended up erasing all values throughout the GPDL dialog.
I've never seen that happen before, but that's what happened.  Once I
set the default to , the GPDL held the values.  I don't remember that
ever being a problem before, and I'm pretty sure that in the past, I've
had  set as a #default for #string props in a GPDL.

Regards,
- Michael M.



[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l GPDL not holding values

2005-05-25 Thread Mendelsohn, Michael
Hi list...

I'm stumped - my getPropertyDescriptionList values aren't being held.  I
drop the behavior on the sprite, set my values in the GPDL, and then in
the behavior panel, the values are gone.  I've looked over the code
again and again.  What silly obvious thing am I overlooking?

Thanks,
- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l Open pdf to specific page

2005-05-19 Thread Mendelsohn, Michael
Forgive me list, I figured it out.  I had the params coming after the
file, but the params need to come after the app.

RIGHT: theApp  /A page=8  thePath
WRONG: theApp  thePath  /A page=8

I would have checked the archives, but it seems like Lingo-L search
archives isn't working.  Oh well.

Have a great day all you lingo Darths,
- MM


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l Member.erase()

2005-04-19 Thread Mendelsohn, Michael
Hi all you Adobe Director fans...

Documentation under erase() method states:
For best results, use this method during authoring and not in
projectors. Using this method in projectors may cause memory problems.

My question is, what kind of memory problems in the projector, and is it
always fatal?  Will it crash the projector?

Regards,
- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l Member.erase()

2005-04-19 Thread Mendelsohn, Michael
Thanks, Buzz (and Alexx).  That's sort of what I've decided to.  I've
got a placeholder bitmap that I'm just changing the image of.

 If you really need to do it, working within an external castLib  
using saveCastLib periodically may clean up the issues.

Regards, 
- Michael M.






[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l Member.erase()

2005-04-19 Thread Mendelsohn, Michael
Thanks, Buzz!  That's a great tip.

- MM




 If you use importFileInto repeatedly, that will chew up memory in the
same way.
use 'set the filename' (or the modern syntax) for better memory
management




[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l RE: Buddy API Help!

2005-04-13 Thread Mendelsohn, Michael
Side note to this post: I recently did a project that sounds similar to
this.  One caveat: the users of my DVD-ROM that copies files sometimes
copy a PowerPoint file with linked videos.  In a nutshell, be sure that
files with linked assets that are copied from the disc, whatever type of
files they are, don't break their links once they are in the new
location on their hard drive.

- Michael M.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dan Sheridan
Sent: Wednesday, April 13, 2005 11:20 AM
To: lingo-l@lists.fcgnetworks.net
Subject: lingo-l RE: Buddy API Help!


Actaully solved it - being an idiot I omitted some code!

set OK = baXCopy( the moviePath boo, 
thomasboo\, *.*, Always, true )


works!

Cheers,

Dan ;)

-- 
Spinningaweb:- Inspiration Through Expression
Web: http://www.spinningaweb.co.uk
Tel: (+44) 07974977627
Fax: (+44) 08717333988
[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
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]).
Lingo-L is for learning and helping with programming Lingo.  Thanks!]



[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l SES 10 questions

2005-04-08 Thread Mendelsohn, Michael
Hi all...

I'm updating a project to (scriptExecutionStyle = 10), and I'm wondering
a few things:

1. Why has (the floatPrecision) not been updated to
(_movie.floatPrecision)?

2. Does any subtle difference exist between (the stage) and
_movie.stage?

3. Is there an SES10 equivalent to (the systemdate), where I can be
certain that the month/day/year values aren't flipped around when
dealing with international machines?  And why is (the systemdate)
seemingly undocumented?

4. Is it OK to mix syntax styles?
set the foreColor of line(_mouse.mouseLine) of member(someText) to 4
tell (_movie.stage) to halt -- even though tell is now obsolete

Thanks as always,
- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l newObject and mouse wheel

2005-04-06 Thread Mendelsohn, Michael
 unfortunately mouseWheel didn't work at all.

Oh well.  Thanks anyway, Valentin.  I think I'll note that on the wish
list...

- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l newObject and mouse wheel

2005-04-05 Thread Mendelsohn, Michael
Hi list...

How's everyone?

[PC: Dir  Flash MX2004]  In Flash, there's a Mouse object, where you
can attach a mouse listener with an onMouseWheel handler to do something
when the user moves the mousewheel.  Nifty, so I thought I'd try to
apply that through lingo using a global newObject.

  global gWheel
  global gWheelListener
  gWheel = newObject(Mouse)
  gWheelListener = newObject(Object)
  gWheelListener.onMouseWheel = trace(moved wheel)
  gWheel.addListener(gWheelListener)

The problem is that gWheelListener inits, but gWheel doesn't.  Is there
a way you can get a reference to Flash's Mouse object through Lingo
using newObject?

I know about Magic Modules wheelMouse xtra, but I thought there could be
many, many applications to use this if it's not limited to fields off
the side of the stage.

thanks,
- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l Achieving luminosity mode with inks SOLVED

2005-03-17 Thread Mendelsohn, Michael
Hi Arthur...


 I have tried and tried to make this work and I cannot. Do you have a
small director file that does this that you can send me so that I can
study it.



Luckily, I caught your email to me, as it got filtered into Lingo-L!
The entire behavior is below, and it gets attached to a 1-bit 1x1 pixel
image on the stage, so there really isn't a file I can send you per se,
but I'm posting all my code, for the benefit of others as well.  I'll
try to explain, line by line, what I'm doing, with lots of comments.  If
you have any questions, let me know.

First, make a movie with two images in it, one a 1x1 pixel black image,
and put it on the stage.  Next, have some photo in your cast that you
want to extract the luminosity out of, but don't put it on the stage.
The following lingo is taken out of the whole behavior.  Alternately,
you could make a behavior and use a getPropertyDescritpionList dropdown
menu to choose the image you want as the source photo.

-- create a black and white buffer image with same dimensions as the
photo, not the 1x1 pixel on the stage.
theBW = image(120, 180, 8)
theBW.paletteRef = #grayscale -- make sure it's grayscale (because 8-bit
could still be 256 *color*)
-- the buffer image is grayscale so that you don't have to desaturate
any colors: you're just dealing with brightness.  In effect, when you
copy the color photo into the #grayscale image, you're converting it to
black and white.
-- SIDE NOTE -- This is NOT the best way to convert a color photo to
grayscale, but it's my Lingo way. 
-- The REAL way to do it is with HSL in Photoshop, going through each of
the channels!
-- copy a color image into the 8-bit #grayscale image forces it to
convert it to BW on the following line...
theBW.copypixels(member(photo).image,
member(photo).image.rect,member(photo).image.rect)
-- next, I colorize a background buffer image for the newly bw photo
(like taking a red piece of construction paper, and running it through a
laser printer to print a photo).
-- create the color buffer image, same dimensions as BW buffer image
theColorized = image(120, 180, 32) 
-- here, I chose green as the color of the construction paper, so to
speak.
theColorized.fill(theColorized.rect, rgb(0,0,255))
-- then apply the BW photo into the color photo
theColorized.copyPixels(theBW, theColorized.rect,
theColorized.rect,[#ink:39])
-- by adding [#ink:39], what I did was transfer the darkness info out
of the photo and onto the solid field of color.  If you think about it,
if the grayscale photo has values that go from black to white, only the
values darker than the substrate get copied over to the green.  And, any
white in the grayscale image will not overwrite the green pixels.

Hope this is clearer for you.
- Michael M.



-- the whole behavior, timeouts and all
==
-- This behavior creates an image on the stage that is a collage of two
rows of four colorized,smaller bw images, picked randomly out of an
external cast, and fades them in, quite nicely, I might add.  :-)

property pSp
property pBackupImage
property pRecentPhotosPicked
property pColors
property pData
property pRectList -- list (master), and duplicate list (to pull from)
used to position copyPixel calls

on beginSprite(me) -- initialize image
  pSp = sprite(me.spriteNum)
  pColors = [rgb(114,39,80), rgb(101,87,135), rgb(159,27,41),
rgb(43,109,115), rgb(0,69,132),
rgb(211,88,0),rgb(151,148,44),rgb(110,99,88)] -- our corporate colors
  theRectSet = [[rect(0,0,120,180), VOID], [rect(120,0,240,180), VOID],
[rect(240,0,360,180), VOID], [rect(360,0,480,180), VOID],
[rect(0,180,120,360), VOID], [rect(120,180,240,360), VOID],
[rect(240,180,360,360), VOID], [rect(360,180,480,360), VOID]]
  pRectList = [theRectSet, duplicate(theRectSet), duplicate(theRectSet)]
-- [the rect, the associated image, the second backup used to go to the
next round]
  pData = [#pIncrement:0, #pCastNum:VOID, #pRect:VOID] -- shared data
between timeouts
  pBackupImage = pSp.member.image.duplicate()
  -- pick 8 initial previously used images to ensure no doubling from
the outset
  pRecentPhotosPicked = [] -- [castnumber, 8 positions] no double images
should show up 
  repeat while (TRUE)
w = random(castLib(thumbs).member.count) -- I have a separate cast
filled just with my thumbnail images
if (pRecentPhotosPicked.getOne(w) = 0) then -- ensures no double
occurances within this list
  pRecentPhotosPicked.add(w)
  pRectList[2][pRecentPhotosPicked.count][2] = w
end if
if pRecentPhotosPicked.count = 8 then
  exit repeat
end if
  end repeat
  -- create initial image of the thumbs cast, 4 columns, 2 rows, all are
120 x 180
  initImg = image(480, 360, 32)
  imageIndex = 1
  theT = 0
  theB = 180
  repeat with r = 1 to 2
theL = 0
theR = 120
repeat with c = 1 to 4
  -- colorized photo
  theThumbImage = pRectList[2][imageIndex][2]
  imageIndex = imageIndex + 1
  theBW = image(120, 

RE: lingo-l baOpenFile and baFindDrive

2005-03-09 Thread Mendelsohn, Michael
Thanks for the idea Stephen.  I might have to go with that because I
can't seem to get baFindDrive working.

- MM





what does a bafileexist() return I wonder...


Stephen


Mendelsohn, Michael wrote the following on 3/9/2005 8:55 AM:

Hi list...

I'm opening PDFs from a CD using baOpenFile.  Simple enough, but 
occasionally, the file isn't found, returning error code 2.  I 
*suspect* it's because the CD has spun down, as it seems to happen only

once per running the CD (according to the tester) and then PDFs open
without
error.   

I was thinking that a solution would be to put before baOpenFile a 
baFindDrive command, forcing the disc to spin prior to opening the PDF.

Might this be an appropriate solution?  Below is my code.

Thanks as always,
- Michael M.



on mOpenDoc(me) -- open correct PDF from documents folder
-- *** Spin CD here? ***
-- baFindDrive(_movie.path.char[1], pData.pDocQueue) -- (drive 
letter, file name)
-- *
theFile = string( _movie.path  documents  pData.pDelim 
pData.pDocQueue) -- build path to PDF
theResult = baOpenFile(theFile, Normal)
if (theResult  32) then
  put theResult -- occasionally puts 2.
end if
end


[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 lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]).

Lingo-L is for learning and helping with programming Lingo.  Thanks!]


  


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]).
Lingo-L is for learning and helping with programming Lingo.  Thanks!]



[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l baOpenFile and baFindDrive

2005-03-09 Thread Mendelsohn, Michael
 One other thought- are you using baShortFileName?

No.  Just opening the file directly.  It's probably wrong, but I'm
assuming they all have Acrobat Reader.  It's a business audience.  But,
I should probably check.  I think I'll go do that.

- MM




Thanks for the idea Stephen.  I might have to go with that because I 
can't seem to get baFindDrive working.

- MM





what does a bafileexist() return I wonder...


Stephen


Mendelsohn, Michael wrote the following on 3/9/2005 8:55 AM:

  

Hi list...

I'm opening PDFs from a CD using baOpenFile.  Simple enough, but
occasionally, the file isn't found, returning error code 2.  I 
*suspect* it's because the CD has spun down, as it seems to happen
only



  

once per running the CD (according to the tester) and then PDFs open


without
  

error.   

I was thinking that a solution would be to put before baOpenFile a
baFindDrive command, forcing the disc to spin prior to opening the
PDF.



  

Might this be an appropriate solution?  Below is my code.

Thanks as always,
- Michael M.



on mOpenDoc(me) -- open correct PDF from documents folder
   -- *** Spin CD here? ***
   -- baFindDrive(_movie.path.char[1], pData.pDocQueue) -- (drive
letter, file name)
   -- *
   theFile = string( _movie.path  documents  pData.pDelim 
pData.pDocQueue) -- build path to PDF
   theResult = baOpenFile(theFile, Normal)
   if (theResult  32) then
 put theResult -- occasionally puts 2.
   end if
end


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l OT: Flashcoders post

2005-02-25 Thread Mendelsohn, Michael
It seems the Yahoo toolbar isn't popular with the Flashers either (as
seen in a post: RE: [Flashcoders] [off-topic] Yahoo Toolbar bundle with
Flash).

- MM

[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l Simple MUI question

2005-01-07 Thread Mendelsohn, Michael
Hi list...

Just curious, what is the purpose of the MUI xtra's #windowBegin and
#windowEnd widgets?  They don't seem necessary.

thanks,
Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l Simple MUI question

2005-01-07 Thread Mendelsohn, Michael
Thanks for responding Sean.  I've got that chapter in a three-ring
binder myself.  Despite what Bruce wrote, I have created plenty of MUIs
before *without* those two widgets, and the dialogs have always worked
fine anyway.  So I was just wondering what the deal was.

- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l Achieving luminosity mode with inks

2004-12-29 Thread Mendelsohn, Michael
Hi list...

I'm working on some imaging lingo where I'm trying to convert a normal
RGB/32 bit full color image into a colorized monochromatic version of it
where only the photo's brightness values are preserved.  Below are two
ways I've been able to approach the effect I want, but neither is truly
monochromatic.  I'm wondering if anyone has ideas.

-- on the stage:

Sprite(1) is a solid color, copy ink.
Sprite(2) above it is a full color photo, darkest ink.

-- through code:

theThumbImage = random(cast(thumbs).count)
colorized = image(120,180,32) -- create image
colorized.fill(colorized.rect, rgb(0,0,255)) -- fill with solid blue
xtraColorized = colorized.duplicate()
colorized.copyPixels(member(photo).image, colorized.rect,
member(photo).image.rect, [#ink:33])--add pin
colorized.copyPixels(xtraColorized, colorized.rect, xtraColorized.rect,
[#ink:39, #blend:36]) -- darkest
sprite(me.spriteNum).member.image.copyPixels(colorized,
sprite(me.spriteNum).member.rect, colorized.rect)

Thanks and happy new year,
Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l Re: Achieving luminosity mode with inks

2004-12-29 Thread Mendelsohn, Michael
Hi Whit...

Looks nice.  One thing I'm a little iffy about in your code is that I
understand setPixel and getPixel to be slow, so I usually avoid them.
When you do a repeat within a repeat of each pixel going across each
row, and then down, I'd think that would be slow on some machines, and
the updatestage calls slow things down to.  You could avoid that by
running the process on exitframe.

I was trying to use inks because they're simple and can be done in just
a few steps.  For instance, you can get a cool emboss effect by putting
the same picture on top of itself, then offset it one or two pixels, and
the top is addpin and the bottom is subtract pin.  Just a tidbit of
info.

The wetlands diorama is cool!!

- Michael M.


[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 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


lingo-l MUI #label attributes

2004-12-08 Thread Mendelsohn, Michael
Hi all...

WINXP, MX2004

I'm putting together a MUI with a label (snippet of code below) that
should have some bold larger text, but I can't get the attributes
settings to take effect.  Is it being hindered by Windows?  My MUI's
#mode is #dialogUnit -- does that make a difference?

Also, the attributes calls for a #justification prop, but in the
Macromedia MUI documentation (page 13), it isn't even listed, but it's
there when you put interface.  Should it be #textAlign or
#justification?

Thanks,
- Michael M.


  widget = getItemPropList(gMUI)
  widget.type = #label
  widget.value = Welcome!
  widget.locH = 20
  widget.locV = 10
  widget.height = 60
  widget.width = 200
  widget.attributes = [#textSize:#large, #textStyle:[#bold],
#layoutStyle:[#left], #justification: #left]
  theList.add(widget)


[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]


RE: lingo-l OT: up one level

2004-12-03 Thread Mendelsohn, Michael
BRILLIANT -- THAT WORKED!  INGENIOUS!!  God bless this list.

 backspace?



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