This content has been marked as final. Show 3 replies
On ma, 2008-01-14 at 19:41 +0000, Applied CD wrote:
> I?m modifying Spenspark?s vertical scroll bar example
> ( http://nonlinear.openspark.com/tips/oop/scrollBar/index.htm) to
> allow both
> vertical and horizontal scroll bars on the same LDM. Essentially
> these scripts
> cycle through every sprite in the LDM and move them a given
> increment. It works
> well enough but I?m banging my head against the wall thinking there
> must be a
> way to modify the viewport of an LDM in similar fashion to scrolling
> an MIAW
> with drawRect. Does anyone know some tricks or is moving every
> individually really the best way?
I dont have another solution for this.
I have done some experimenting, but can not find a way to "change the
I was hoping something like "tell sprite() to set the rect of the
to rect()" would work, but it sets the rect of the main-stage, not the
rect of the LDM-stage. I think this is one of the shortcomings of
Years ago there was an aticle on one of the Director lingo sites about
linked Director movies, and the tricks you can play with them.
But... you guessed it, I can not remember.
It was something with clocks... maybe google can help?
I even tried to use the Shockwave ActiveX, hoping it would play the
extenal movie with scrollbars. But the only thing I get is an
Director crash. :(
The moving of the sprites is not that bad.
You can make 1 generic behaviour for all the sprites, that moves the
sprite with an extra offset.
on beginSprite me
myStartLoc = the loc of sprite(me.spriteNum)
on prepareFrame me
set the loc of sprite(me.spriteNum) to myStartLoc + gOffset
You can now change the value of gOffset right in the main movie, to
all the sprites with this behaviour.
gOffset should be a rect.
let me know how it goes.
> Years ago there was an aticle on one of the Director lingo sites about
> linked Director movies, and the tricks you can play with them.
> But... you guessed it, I can not remember.
> It was something with clocks...
Thanks Richard, despite the scrolling issue I’m staying with the LDM approach … it just feels like it has fewer drawbacks than the MIAW.
What I’ve got so far is a single behavior that can be attached to the LDM sprite. This one behavior is responsible for moving everything inside the LDM. It’s based on a massive simplification of Openspark’s example. I’ve attached what I’ve got so far, it’s not done (no limit checks, only loops through first 50 sprites in LDM, etc…) but you can see that it relies on tell <LDM sprite> to redirect the command stream to effect sprites inside the LDM rather than the host. It works but I’m a little concerned about the TELL command … I can’t seem to find if it’s depreciated or simply undocumented.
Just for the record here’s a link to the clock tutorial:
and another link to known bugs/workarounds for LDM’s (mostly issues involving rollovers):