Discussion:
Communications between moviescript and Enterframe functions?
(too old to reply)
jamai_5
2009-03-27 13:32:49 UTC
Permalink
Here's the problem: I need to print various pages (with Print-o-matic) and the
printing is controlled in moviescript. However, the pages contain 2 frames
each, the first frame for preparing the page using EnterFrame code (showing
"loading" text to the user) and the second frame which is showed after the page
is prepared. I need to print of course that second frame.

If I control the playhead in moviescript to go to the first frame, the
EnterFrame functions are not compiled and the playhead never goes to the second
frame. If I go to the second frame directly, it isn't prepared correctly. How
should I solve this?

Basically I need to put commands to the moviescript like this: go to the first
frame of the page -> do the enterframe functions there -> when the second frame
of the page is reached add the page to the printing list -> go to the first
frame of another page -> etc


Is there any way that I could make those EnterFrame functions communicate with
moviescript?
openspark
2009-03-27 14:52:47 UTC
Permalink
In your first page, do you have any behaviors (on sprites or in the frame
script) which have a handler something like this...

on exitFrame
go the frame
end

...?

If so, then that is what is keeping the playback head on the first page. I'm
guessing that you need something like this (pseudo-code):

on exitFrame
if the page is now prepared then
go to page 2
else
go the frame -- stay here until everything is prepared
end if
end

If what I'm saying makes no sense to you, then could you provide more details
as to what code you are using on the first page?
jamai_5
2009-03-29 12:52:29 UTC
Permalink
The first frame of the page includes the necessary preparing codes (putting
texts into the fields etc), and in the end of the code is "go to frame2". The
second frame includes only "go to frame" on exitFrame.

Everything works correctly when the projector is viewed normally, so there is
nothing wrong with these codes. My problem is that when user wants to print
various pages, the playhead have to move automatically through various pages,
and when the playhead is controlled with moviescript these exitFrame functions
are not compiled at all.
Mike Blaustein
2009-03-29 13:35:04 UTC
Permalink
Then in whatever code you have that is causing the playhead to move, add
something like:

go to frame "part1Setup" --whichever is your setup frame
sendSprite(0,#exitFrame)
go to frame "part2" --the printing frame

sprite(0) is the script channel, and this will cause an error id that
channel does not contain an 'on exitFrame me' command.
jamai_5
2009-03-31 13:05:49 UTC
Permalink
[q][i]Originally posted by: [b][b]Newsgroup User[/b][/b][/i]
Then in whatever code you have that is causing the playhead to move, add
something like:

go to frame "part1Setup" --whichever is your setup frame
sendSprite(0,#exitFrame)
go to frame "part2" --the printing frame

sprite(0) is the script channel, and this will cause an error id that
channel does not contain an 'on exitFrame me' command.
[/q]

Thank you very much, this solved the problem.

Loading...