1

I have a horizontal site that has multiple swf files in different "areas". Since the horizontal site is one html page, the browser wants to load all swfs at the get go. This slows the loading of the flash in the initial area to a snail's pace.

What I want to do is be able with javascript to control the initiation of the loading of the various swf files, having it connected to something like an onClick event. I'd like certain buttons when clicked to pause the loading process and yet be able to resume the loading process (not start over) with another event.

Not sure how to approach this. Do I use the id of the containing div of the swf (or the id of the flash itself) and then create a function using getElementById and then control this function with another function using setTimeOut?

I'm at a loss on approach to this. Could use some suggestions and direction.

Thanks, Adriana

2 Answers 2

1

Html:

<object width="1200" height="1200">
      <param name="movie" value="mod-1.swf">
      <embed  swliveconnect="true" src="mod-1.swf" id="mod1" width="1200" height="1200">
      </embed>
  </object>

JS:

    var flashObj = document.getElementById("mod1");
    flashObj.GotoFrame('1');
    flashObj.StopPlay();
Sign up to request clarification or add additional context in comments.

Comments

0

You can't pause the loading of a swf. It is either loading or it isn't. Using swfobject along with the ExternalInterface class (inside of Flash), will let you load one swf at a time.

Of course, if you don't have access to the FLA or Flex project, ExternalInterface won't help, and you'll need to simply use swfobject on a delay.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.