Main Page About Ldoc+ Error Lists Main Index Index Groups

Ldoc+ Lingo Groups:
    FRAMEs / PUPPETs / TRANSITIONs

 info D5/601:
      lastFrame
      updateStage
 6     7  elements new in Director 6.0,
  !    7 contain Dictionary fixes 601 & 501,
   +  21 miss from the 'Appendix' 6.0 for FRAMES.


Frame Properties (8):
       the frame (current frame number)
  !    frameLabel
       framePalette
       frameScript
       frameSound1
       frameSound2
       frameTempo
       frameTransition

Frame Functions (8):
       frame nameOrNumber
 6 +   frameReady()
   +   framesToHMS()
   +   HMStoFrames()
       label("name")
   +   labelList (string)
  !+   lastFrame
       marker(number)

Frame Actions (6):
       delay()         (frame scripts only)
   +   go to (the frame) (looping)
       go...
  !    play / play done
   +   updateLock      (settable)
   +   updateStage     (sends 'stepFrame')

--

Frame Script Events (15):
 6 +   on beginSprite    [me]
 6 +   on cuePassed      [me]
 6 +   on endSprite      [me]
  !    on enterFrame     [me]
       on exitFrame      [me]
   +   on keyDown        [me]
   +   on keyUp          [me]
   +   on mouseDown      [me]
  !+   on mouseUp        [me]
 6     on prepareFrame   [me]
   +   on rightMouseDown [me]
   +   on rightMouseUp   [me]
   +   on timeOut
 6 +   sendAllSprites(#handlerName)
 6 +   sendSprite(#handlerName)
 6     ...in 6.0, NO 'mouseEnter', 'mouseWithIn', 'mouseLeave',
          or 'mouseUpOutside' events are sent to frame scripts!

--

Puppeting (6):
       puppet of sprite
       puppetSprite
       puppetPalette
  !+   puppetSound
  !    puppetTempo
       puppetTransition

--

Transitions (7):
       changeArea     of member
       chunkSize      of member
       duration       of member
       transitionType of member
       frameTransition
       puppetTransition
       zoomBox
       ...see also 'trails of sprite'.

--

601 FRAMES Lingo:
New 'on prepareFrame' handler acts before frame is drawn,
and frame scripts now also receive the 'me' parameter!
Frame scripts get 'beginSprite' and 'endSprite' events.
Sprite and castMember scripts get 'enterFrame' and
'exitFrame' events, including the 'me' parameter!
In updated movies from 5.0, sprite cells can be
cross-linked to strange scripts and other castMembers!
Watch out: Use Director's "Update Movies..." function to
update 5.0 movies to 6.0. First update 4.0 movies to 5.0.
Check ALL sprites + puppets after updating old movies!

601 PUPPETS Lingo:
Only reduced puppeting possible in 'prepareMovie',
'prepareFrame', 'beginSprite', and 'endSprite' handlers!
A behavior's auto-puppetting differs from 'puppetSprite':
auto-puppeting consists across the life span of a sprite,
'puppetSprite' persists longer. Setting 'puppetSprite'
to FALSE also releases auto-puppets.
See info from the '6.0 ReadMe' at 'puppet of sprite'!

Outdated FRAME Lingo (6):
 5              on stepMovie -> on enterFrame [me]
 5              perFrameHook -> none
 5               when...then -> on event (handlers in frame scripts)
 6                  continue -> go to (the frame + 1)
 6                     pause -> go to (the frame)
 6               pausedState -> none





[index] _ D5/601 _ 971201:


changeArea

transition member property

1. TIP: The default setting for the 'changeArea of member' is TRUE, if you haven't changed this setting for that specific transition member in Director's Cast Member Properties dialog box to a setting of 'Affects: Entire Stage'.

2. TIP: Remember: Transitions wipe away any leftover 'trails' on screen in their changing area. You can use this side-effect to clear away any leftover trails from 'directToStage' playing videos . If you set 'the changeArea of member' to FALSE and the whole screen updates, you lose all left-over trails on the whole screen.

3. TIP: Some types of transition will cover and change the whole screen at once, if they find that nothing at all has changed on the screen. I remember transition types of 'Cover', 'Reveal', and 'Push' to behave like that, when their 'changeArea' was actually set to FALSE ('Affects: Changing Area Only'). Quite annoying, when this suddenly happens right in the middle of your program, and you don't have the slightest idea why, or even worse -- right at the end of one of your 'all-nighters' of game testings... ;)






[index] _ D5/601 _ 971212:


frameLabel

score frame name property

6.0 Dictionary Errors, same in 5.0:

"When the current frame has no label...the frameLabel property is 0."
= Not correct; should read:
"When the current frame has no MARKER...the frameLabel property is 0;
 if there is a marker without a name, the frameLabel returns
 an EMPTY string ("").
 In Director 4, the frameLabel used to return EMPTY in both cases."

"It can also be set during a Score generation session."
= Works anytime; should read:
"It can be tested and set."

= Missing:
"See Also: ... label(), EMPTY"
 --

From the '601 ReadMe':
  Using 'set gSaveScore = the score' now also stores frame markers in
  gSaveScore, and 'set the score = gSaveScore' restores them to the score.
  --

1. TIP: You can change and create new label markers by setting 'the frameLabel' to a string expression (not only during score recording), but it needs saving to persist across movies. Remember: The 'frameLabel' is a STRING property, on which string und chunk expressions can be used: 'put word 1 of the frameLabel'.

2. TIP: To totally delete a label with its marker in the current frame, use: 'set the frameLabel = 0'. If you 'set the frameLabel = EMPTY', you either just change the frame's label name to EMPTY, or you create a new marker ("") in the current frame.






[index] _ D5/601 _ 971201:


frameTransition

score frame transition property

1. TIP: You can ONLY test 'the frameTransition', it returns the integer number of the member in the transition channel of the tested frame, or 0 if the transition channel is empty. But you can set 'the frameTransition' during score recording (as mentioned).

2. TIP: For more info, see 'puppetTransition', 'trails of sprite', and 'updateStage'.






[index] _ D5/601 _ 971206:


lastFrame

movie frame property

From the '6.0 ReadMe':
...in the last frame, there are extra events before the endsprite message.
Single Frame movie: extra 'prepareFrame' and 'enterFrame'
Two Frames or more: extra 'enterFrame'
John Dowdell from Macromedia Tech Support 8/97:
" ...the first and final frames of the Score must perform other tasks that other frames do not have to contend with. For instance, the first frame would be drawn before the 'startMovie' handler executes. Other frames don't have to contend with this. If you tween out a simple looping animation then you'll see a little pause at the final frame, while Director goes "hmm, are there any more frames in this movie? No? Okay, then I'll go back..."
Most people never notice this type of effect, but if you're seeing something unexpected happening in the first or final frame of the movie, then you may wish to move the action in a frame, to see whether your chosen command is interacting with the startup or cleanup costs of the first or final frames. "

TIP: To avoid updating the last frame of a movie, add a dummy frame (which you'll never go to) with just one sprite in it after the last frame in all your movies. To avoid the stage getting updated a second time on the first frame of a movie, when its 'on startMovie' handler is executing, have a 'go to (the frame + 1)' for a stage update, to get away from that first frame. Also avoid having a tempo setting, a palette, a transition and a sound all together in the first frame (but you should have a palette in the first frame, and a tempo setting in the second frame).






[index] _ D5/601 _ 971206:


on enterFrame [me]

movie frame event

From the '501 ReadMe':
You CANNOT use score recording ('beginRecording .. endRecording') in an 'on enterFrame' handler.
From the '6.0 ReadMe':
Score scripts used in the graphic sprite channels now receive 'exitframe' and 'enterframe' messages. In addition, all score scripts are now instanced and thus receive a 'new' message. If you are finding scripts executing unexpectedly, then it is recommended that you check your score for scripts containing handlers 'on new', 'on exitframe', and/or 'on enterframe'. These handlers would not have been called when playing in Director 5, but will be called when playing in Director 6.0.

The shockwave plugin will prevent exitframe and enterframe messages from being sent to the graphics channels if the movie being played is of pre-version 6 format. It cannot prevent "new" from being sent, however.
From the '601 ReadMe':
When Director 5.0 movies which contain 'on enterFrame' or 'on exitFrame' handlers in graphic sprite channels are opened, a warning is issued. Those handlers were not executed in Director 5, but are executed in Director 6.0.

1. TIP: Although the 'enterFrame' event sounds like you could do something before the frame is shown, it's NOT that way. Instead the sprites in that frame are all composited and shown on screen, before the 'enterFrame' event happens. Actually it's only there to let you do things BEFORE any user actions like mouse clicks are accepted, but remember: On Windows, early clicks are queued. In 6.0, you can use the new 'on prepareFrame' handler before Director draws the frame. In Director 6 movies, 'enterFrame' and 'exitFrame' events are sent to sprite and castMember scripts too, and they include the 'me' parameter!

2. TIP: Remember that 'enterFrame', 'mouseDown' and such Director events CANNOT pass any arguments along with the event.

3. TIP: Remember: If you have an 'on enterFrame' handler in a score script that also contains a frame loop ('on exitFrame .. go the frame .. end'), your 'on enterFrame' handler is also repeatedly executed.

4. TIP: It's best to avoid having an 'on enterFrame' handler (and possibly an 'on exitFrame') in the first frame of your movie, because the first frame is problematic, and also the movie's 'on startMovie' handler is already executed there automatically. This also applies to all frames, which you know you're going to jump into coming from other movies. It has been mentioned that this is especially problematic for Shockwave files. For problems on the first and last frame, see 'the lastFrame'.






[index] _ D5/601 _ 971201:


puppetPalette

palette controlling command

1. TIP: Issuing 'puppetPalette paletteNameOrNumber/memberNameOrNumber, speedInTicks, numberOfFrames' needs a stage update to take effect.

2. TIP: PuppetPalettes will only stay in effect until a different palette occures in the palette channel of a frame, or a 'go to...' command takes the playhead into a new/old palette area.

3. TIP: 5.0 workaround for palette changes that System dialog boxes can create in Director movies: Use 'pause .. updateStage .. continue' to reset the movie to its own palette after the dialog box has been closed. In 6.0, 'pause' and 'continue' are outdated, and no workaround known for this case.

4. TIP: You can also experiment with the '[Palette]' section in the .INI file for your projector. This is not the LINGO.INI, but a file with your projector's name and the extension .INI; just copy the file DIRECTR.INI and rework it. If you set 'Animation=0', you can avoid palette problems, but this might impact display performance.

5. TIP: Remember: When you place a bitmap or pict into the score that has a different palette than the one the score is using, Director automatically generates a palette transition and puts it into the palette-channel of the frame.






[index] _ 601 in 1/97:


puppetTransition

transition controlling command

5.0 Dictionary Error:
" Transitions marked with an asterisk (*) in the table will not work on monitors that are set to 32 bits. "
But the Using Director handbook on page 86:
" bit and pixel dissolves do not work in 16-, 24-, and 32-bit environments. "
...my own cross-platform experiences show that bit and pixel dissolves do work on 16-bit monitors.

1. TIP: The 'puppetTransition' command needs a stage update to take effect, and it overruns a transition in the frame.

2. TIP: If you use 'puppetTransition typeNumber' without arguments, the default value for its duration time is 1, which in this case is 1/4 second (one quarter) -- opposed to the 1/20 second units of the 'Frame: Transition' dialog box from the score!

3. TIP: Funny enough (but luckily), 'puppetTransition' does NOT puppetize the transition channel of the score, as the "Learning Lingo" handbook mentions on page 75: 'The puppetTransition command applies only to the frame in which you issue the command'. So you actually never need a 'puppetTransition 0'.

4. TIP: Sometimes the user can interrupt an ongoing transition by pressing a key or the mouse. To avoid this, temporarily set Director's primary event handlers like 'the mouseDownScript' to 'dontPassEvent', before you do your transition, and reset them to EMPTY (or to a predefined variable) when done.

5. TIP: When you have a 'frameTransition' in a frame, any stage update will repeat that transition. To avoid this when exchanging castMembers (e.g. for a clicked button), have a 'puppetTransition 9, 0, 256' before the new stage update to override the 'frameTransition' with a forced quick and not noticeable transition. Or you can exit the (button) script by testing 'if (the frameTransition) then exit'. See 'the scoreColor' for another technique.

6. TIP: Transition types of 'Push', 'Cover', and 'Reveal' will most likely cover a part of the stage between the changing area and the screen border. To avoid this, change the castMember you want to transition to a single dot pixel in the desired change area (and 'updateStage'), before doing one of those transitions.

7. TIP: Gretchen Macdowall mentions that if you bring a QT video onto the stage for a first time, together with a transition, the video can appear in the top left corner of the stage for a short instance. You might want to put the QT already in the frame prior, but above the menu bar, or remove the transition.

8. TIP: Remember: Transitions wipe away any 'trails' left on screen in their changing area.

--

EXAMPLE:

To block out interactivity in frames (e.g. that have a 'frameTransition'), you can color the whole frame in a score color like red (integer value of 5), and then test 'the scoreColor of sprite' and exit any handler when it returns 5 (red). The following could be your sprite's script:

on mouseDown
  --
  if (the scoreColor of sprite (the clickOn) = 5) then
    exit
  else if (the frameTransition) then
    puppetTransition 9, 0, 256
  end if
  --
  --> do something here...
  --
  updateStage
  --
end mouseDown





[index] _ D5/601 _ 971201:


updateLock

score recording property

1. TIP: You can test AND set 'the updateLock', and its default is FALSE, which means that stage updates are always visible, also during score recording.

2. TIP: You can also use 'the updateLock' while not score recording: 'set the updateLock = TRUE' at any time will immediately 'freeze' the current screen and prevent the normal playing of your movie from showing any changes on stage. This can be useful when you need to change things on stage or need to change 'the fileName of castLib' without making it visible, before you set 'the updateLock' back to FALSE. But take into consideration that text fields on stage are not affected by turning 'the updateLock' on: a field will immediately update as soon as you change its text content or appearance. To keep a field from updating, you need to set its 'trails' to TRUE (see 'field').

3. TIP: By setting 'the updateLock' to TRUE and then starting a 'passive' score recording session, you can let Lingo secretly look around and retrieve any information from any channel in any frame of the active movie at any time. But don't forget to set 'the updateLock' back to its old setting, otherwise your stage will stay 'freezed'... ;)

4. TIP: Like with other properties, it's best to store the active setting of 'the updateLock' into a variable before changing it, and then setting 'the updateLock' back to that variable when done.

--

EXAMPLEs:

This lines will compare the rectangle of sprite 5 in the current frame to its rectangle in the following frame:
set thisSpriteRect = the rect of sprite 5
set backToTheFrame = the frame
set  oldUpdateLock = the updateLock
set the updateLock = TRUE
--
beginRecording
  --
  --> go to some frame or label, and retrieve
  --> some informations on some sprites there:
  --
  go (the frame + 1)
  --
  set nextSpriteRect = the rect of sprite 5
  --
endRecording
--
go (backToTheFrame)
--
set the updateLock = oldUpdateLock
--
put (thisSpriteRect = nextSpriteRect)
-- 1





[index] _ D5/601 _ 971212:


updateStage

stage redraw command

From the '6.0 ReadMe':
  The 'go to...', 'play...', 'puppetPalette', and 'updateStage'
  commands are disabled in the following handlers: 'on prepareMovie',
  'on prepareFrame', 'on beginSprite', 'on endSprite', 'on stepFrame'.
  Executing 'updateStage' can also cause problems, and should not be
  necessary since all these events are issued immediately before
  the current frame is drawn.
  --

1. TIP: Everytime you use 'updateStage' or 'go to (the frame)' for a screen redraw, a transition in that frame will be executed once more. Instead, you can 'set the stageColor = the stageColor' to get the stage updated. This is also useful for removing 'trails of sprite', or leftover parts after a 'forget window' for a movie-in-a-window (MIAW). And it will NOT trigger a 'stepFrame' event, which 'updateStage' normally does, thus triggering 'the actorList'.

2. TIP: You do NOT need to get the stage updated (or sprite puppeting) when changing properties of a castMember, because the changes will stick to that MEMBER and immediately show in all SPRITE appearances of it on stage. Remember: Changes to members (like fields) will be saved with your movie, unless you reset the member manually or in your 'on stopMovie' handler.

3. TIP: 3.0-601: You CANNOT use 'updateStage' to make 'puppetSprite x, FALSE' work: The puppet will still stick to the sprite across multiple 'updateStage' commands, and even across a moving playback head. It needs a 'go to (the frame)' or 'go someFrame' to immediately get rid of the sprite's puppet.

4. TIP: Avoid using 'updateStage' or a 'go to (the frame)' looping command in the first frame, as well as in the very last frame of a movie, see 'the lastFrame' for details.

5. TIP: Remember to get the stage updated after using 'puppetSound soundName' (as opposed to 'puppetSound channel1to8, memberNumberOrName').





(Top)

URL = "http://www.a3w.de/Lingo/Ldoc_Frames.html"  (971212)

 Top [Main Page] [About...] [Error Lists] [Ldoc+ Index] [Lingo Groups]
The Ldoc+ © Copyright 97-98 by Denis Wieger Online since June 1, 1997. All rights reserved.
<mailto:Denis@a3w.de
 Top