Help: Control Playback of Swf in XWD
I have a swf file which plays in a 720x480 frame. When the page loads it takes approx 10secs. Is there any way to show the Web Page while the SWF loads and have a "please wait while video loads" message for the viewer?
Also I am using the Replace Placeholder with flash option which causes the video to run automatically - How do I get the Video Player type view with Play, Stop, Pause type controls? :confused:
Thanks in advance for your help
1 Attachment(s)
Re: Help: Control Playback of Swf in XWD
The 'wait' message can be implemented with a snippet.
The play controls have to be implemented within the flash movie.
Alternatively, you can place the swf on the pop-up layer, so that the button that pops that layer up will work as a play control.
Here's the instructions for the wait message.
1. Create static layer which will contain your message. It has to be placed below all the other layers. Make it lite on graphics so that it loads fast.
2. Place 2 placeholders objects on this layer. Send first one to the bottom (Ctrl+B) and the second one to the top (Ctrl+F).
3. Place following script in the first (bottom) placeholder:
Code:
</div>
<script type="text/javascript">
var my_waitlayer;
var my_woldload=window.onload;
window.onload=my_wload;
function my_wload(e){
if(my_woldload)my_woldload(e);
my_waitlayer.style.display='none';
xr_xr.style.visibility='visible';
};
</script>
<div id="my_waitlayer" style="top:0px;left:0px;position:absolute;">
<script type="text/javascript">
xr_xr.style.visibility='hidden';
my_waitlayer=document.getElementById('my_waitlayer');
my_waitlayer.style.visibility='visible';
</script>
<div>
That's it. :)
note: this script is written for the WD 5.0.1.
The example file attached.
Re: Help: Control Playback of Swf in XWD
Thanks Covoxer - I will try this later today.
You also mentioned embodiment of playback controls in the swf itself - how would I do this (is there a tutorial out there?)
Carrot
Re: Help: Control Playback of Swf in XWD
Covoxer - I assume I enter the snippets using the replace with HTML option under Web Properties? Is the second (Top/Front) placeholder also the one that calls the swf or is this a third placeholder.
Re: Help: Control Playback of Swf in XWD
I have attached the example file to the first message.
This "wait message" snippet has nothing to do with swf. You may have or have not heavy swf's on your main layer.
These two placeholders have to be placed on the separate layer that contains your "please wait" message. It should not contain your swf's.
look at the example file.
Re: Help: Control Playback of Swf in XWD
Hi Covoxer. I have followed the example layers etc. but still seem to be getting a long pause (Entire Window = White Blank Page) for approx 10secs followed then by my Please Wait message and then within two seconds the swf. Any ideas why the Wait Message (Base Page) is taking so long to load.
Interestingly, if I create the page as a stand-alone test page the video runs almost instantaneously (at least in XWD preview mode) yet when the Video page is part of a multipage web and you navigate to it from another page you get the long blank pause explained above.