Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 659
  • Last Modified:

using a director shell to control multiple flash swf files

Hello all,

I am attempting to use a director shell to control multiple flash swf files.

the director shell > has imported swf files in place already.

when one swf ends I want it jump to another frame.
however the director shell does not know when the swf has completed.
Director just sits there at the end of a non-repeating swf.

I am trying to avoid calling the next movie from the flash file because I need to have the same swf link to different movies depending on user choices.
I want the next movie to be decided by where playhead is in director and the user decisions.

How do I allow director to know when the swf has ended? Then proceed to the marker I specify in director?
0
matzofast
Asked:
matzofast
  • 2
1 Solution
 
LingoMasterCommented:
Here's a score script that loops on the director frame until the flash sprite reaches the last frame.

on exitFrame
  if sprite(5).frame <  sprite(5).member.frameCount then
       go to the frame
    end if
end

-------

Be aware some flash movies have their own frame loops that prevent them from ever reaching the last frame.

for special cases you could just hard code a minimum flash frame value

 if sprite(5).frame <  123 then go to the frame

--------

If there is not a flash sprite there (in channel 5), the Frame test may return an error, to make things more bulletproof you can validate that a Flash sprite is being examined.

sprite(1).member.type


on exitFrame
if sprite(5).member.type = #Flash then -- **** added validation
    if sprite(5).frame <  sprite(5).member.frameCount then
       go to the frame
    end if
  else
   put "Wait for flash, non flash sprite, frame "& the frame
 end if  
end

0
 
matzofastAuthor Commented:
the first part is working.
the score loops on the director frame until the flash sprite reaches the last frame.

how can I direct it to markers rather than just going to the next frame?
0
 
matzofastAuthor Commented:
I want the play head to jump rather than play until it reaches the next hold frame script
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now