Examples TOCexamples

Preload Shockwave Flash object

$Date: 2004/08/10 18:12:56 $

 Table of contents

Introduction

This example requires :

Be aware that:


This example will display a basic progress bar while retrieving a large file.

We have created a Request/Listener class HTTP_Request_DownloadListener on lines 18 to 104. In this Listener, a progress bar was integrated on lines 78 to 84. It's a basic progress bar with only one render option changed (animation speed).

On lines 90 and 92 the progress bar is updated depending of the data size already received.

Media file is identify by URL defined at line 106.

When the shockwave flash object is fully loaded, page sw4p.html is shown on lines 115 to 117.

[Top]

 Render options

Animation speed is set to 10 (see source at line 79).

[Top]

 PHP source syntax highlight

Open source listing in a new window.

[Top]

 Play demo

Run the script.

[Top]