FMProjector/FMPlayer Tutorial > ASP Interface
Back link
 

Home
FMProjetor
FMPlayer

Sample & Tutorial
 

Fundamental
- FSCommand Fundamental
- FMProjector Howto
- FMPlayer Howto
- Smartclips Howto
FSCommand Samples
- FSCommand Tutorial
- 1. Play video in Flash
- 2. Streaming&Overlap
- 3. Full screen video
- 4. Fast forward/backward
- 5. Synchronization
- 6. Embed PDF
- 7. Embed RealPlayer object
- 8. ASP interface
Smartclip Samples

- 9. Video w/ slider
-10. Read/write registry w/ sc
FSCommand Reference

- FAQ
- FSCommand Tutorial
- FSCommand fast track
Showcases
Support Forum
Submit yours
Anything done by you that can inspire and do help to others. It has better to be short, clear, and self-explained.

Contact
  Technical Support
  support@flashants.com
Marketing & Sales
  sales@flashants.com
Feedback & Suggestion
  feedback@flashants.com

 

Video on demand - Download this sample files


This sample shows you how Flash can interface with other server-side script languages like ASP, PHP, or Perl CGI etc. In this sample, we use Flash fscommand loadvariablesNum to read the text file generated by
the ASP program.

  1. At Frame 1, add the following fscommand to read the text file generated by ASP program. We append a random number parameter to the file name to force reloading the text file.
    randomNum = Math.round(Math.random()*9999999999);
    loadVariablesNum ("../tutor/aspInterface/info.txt?"+randomNum, 0);
  2. At frame 2, add the following code to wait until the file is completely loaded.
    Note: done is the last variable in the text file.
    if (done == "1") {
          done="0"
    	gotoAndPlay (5);
    } else {
    	gotoAndPlay (2);
    }
  3. At frame 5, load the video file to playback.
    Note: filename is the variable read from text file.

    fscommand ("fas.avclip.unload");
    fscommand ("fas.avclip.xy", "8,8");
    fscommand ("fas.avclip.Autosize", "TRUE");
    fscommand ("fas.avclip.load", filename);
    stop ();

  4. The server side script language response to get the input from users and save the variables to text file for Flash to retrieve.