BTW if In the XHTML I call CDC_Ortho_Banner.swf without the loader it
plays; however I want the loader as the swf are large and do not
perform well otherwise.

On Sep 10, 10:14 am, CanuckFlyFisher <[email protected]> wrote:
> Hi
>
> I am trying to use SWFObject 2.2. with Flash CS3.
>
> I have 3 movies: loader.swf, CDC_Ortho_Banner.swf,
> CDC_Ortho_Pictures.swf.
>
> The loader uses the following script on the first frame (triggered by
> an Enter Frame):
>
> var clips:Array = ["CDC_Ortho_Banner.swf", "CDC_Ortho_Pictures.swf"];
> var index:int = 0;
>
> var thisLoader:Loader = new Loader();
> thisLoader.contentLoaderInfo.addEventListener(Event.INIT,
> doneLoading);
>
> var thisMC:MovieClip = new MovieClip();
> stage.addChild(thisMC);
>
> function nextClip():void {
>         thisLoader.load( new URLRequest(clips[index]) );
>
> }
>
> function doneLoading(e:Event):void {
>         stage.removeChild(thisMC);
>         thisMC = MovieClip(thisLoader.content);
>         thisLoader.unload();
>         thisMC.addEventListener(Event.ENTER_FRAME, runOnce);
>         stage.addChild(thisMC);
>         thisMC.gotoAndPlay(1);
>
> }
>
> function runOnce(e:Event):void {
>         if (thisMC.currentFrame == thisMC.totalFrames) {
>                 thisMC.removeEventListener(Event.ENTER_FRAME, runOnce);
>                 index = (index + 1)%(clips.length);
>                 nextClip();
>         }
>
> }
>
> The SWFObject scripts are set like this:
>
> <head>
>          <script type="text/javascript" src="/templates/cdc_ortho/
> scripts/swfobject.js">
>           </script>
> </head>
> </body>
> <div id='fl'>
>                 <img src="/templates/cdc_ortho/images/header/building.jpg" 
> alt=""
>                  height="200" width="100%" border="0" />
>                         </div>
>                         <script type="text/javascript">
>                                 var mymovie ="test"
>                                 var flashvars = false;
>                                 var params = {
>                                 allowfullscreen: "false",
>                                 allowscriptaccess: "always",
>                                 wmode: "transparent",
>                                 bufferlength: "1",
>                                 autostart: "true"
>                                 };
>                                 var attributes = {
>                                  id: "fl",
>                                  name: "FlashDynamicContent"
>                                 };
>
>                                 
> swfobject.embedSWF("/templates/cdc_ortho/images/loader.swf",
> "fl",
>                                "960", "200",
> "9.0.0","expressInstall.swf", flashvars, params,
>                                attributes);
>                         </script>
> </body>
>
> The loader.swf loads and plays each movie in sequence. Once all movies
> have finished playing then it returns to the first movie.
>
> This script works when running the loader.swf on the webserver
> directly; meaning you double click the loader.swf and it works
> properly; however when loading in using the swfobject it does not seem
> to execute the code and sits at the one and only frame of the
> loader.swf movie.
>
> You can view this athttp://www.cdcorthomobility.com- the flash is at
> the top of the home page.
>
> Can you provide any thoughts as to why the actionscript 3 code isn't
> run when using the swfobject?
>
> Regards,
> Steve
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to