|
MIAW using cast member from parent?
At 15:29 23/06/99 -0500, WthM wrote:
>Geek Culture wrote:
>
>> I'm trying to get a MIAW to use a cast member from the main movie.
>
>You almost have it. But the MIAW, unless it is using an external cast
>linked to the main movie, has no direct access to the main cast file. So
>try this instead:
>
>MIAW button script:
>
>on mouseup
> tell the stage to "dothememberthing"
>end
>
>
>
>In my Main Movie script:
>
>on dothememberthing
> copyToClipBoard cast 18
> tell window "Window1"
> pasteClipBoardInto <some blank slot>
> set the member of sprite 10 to member <some blank slot>
> end tell
>end
>
>
>That's off the cuff of course but probably a lot more like what you have
>in mind.
>
>And of course you could just create an external cast file, put all of
>the main movie's members into that, and link your MIAW to it.
>
And then, as this is director and you can do most of the tasks in a lot of
different ways, you could use 'member.media'. Below is a clipping from a
Behavior script:
on getMemberFromStage me,dMbr
-- dMbr is a member reference which is valid in the stage's context
tell the stage
if ilk(dMbr) = #member then
if the number of dMbr > 0 then
dmedia = dMbr.media
Found=TRUE
end if
end if
end tell
-- we 're back in the MIAW now
if found then
sprite (spriteNum).member.media = dMedia
end if
end
Best regards
Daniel Plaenitz
|