# Loading AVI movie from Mysql

**URL:** <https://forum.kirupa.com/t/loading-avi-movie-from-mysql/120556>\
**Category:** flash\
**Created:** [August 25, 2004, 11:53am UTC](https://forum.kirupa.com/t/loading-avi-movie-from-mysql/120556 "2004-08-25T11:53:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bjory](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@bjory](https://forum.kirupa.com/u/bjory)\
**Post date:** [August 25, 2004, 11:53am UTC](https://forum.kirupa.com/t/loading-avi-movie-from-mysql/120556/1 "2004-08-25T11:53:47Z")

</div>

How do I load an AVI movie from Mysql database? Say if the database contains the location of the AVI movie which is going on my Flash.

And what should I do in Flash so that I can display the AVI movie on the stage? Do I put a new movieclip and link the movieclip to Mysql database which in turns point it to the location?

---

<div class="post-metadata">

**Author:** ![shack](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@shack](https://forum.kirupa.com/u/shack)\
**Post date:** [August 25, 2004, 12:15pm UTC](https://forum.kirupa.com/t/loading-avi-movie-from-mysql/120556/2 "2004-08-25T12:15:45Z")

</div>

Storing the location of the file is a good start, but I don’t think that you can load an external .avi file (maybe in 2004 I don’t know) to flash, you do have one option wich is saving in .swf format (the .avi movie) and then being able to load it with the function loadMovie. Good luck!

---

<div class="post-metadata">

**Author:** ![amitgeorge](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@amitgeorge](https://forum.kirupa.com/u/amitgeorge)\
**Post date:** [August 25, 2004, 12:17pm UTC](https://forum.kirupa.com/t/loading-avi-movie-from-mysql/120556/3 "2004-08-25T12:17:34Z")

</div>

1. write a php script. from it connect to the mysql database and  
echo the name and path to the avi file.  
like  
\<?php echo “avifilename=” . $row[“avifilename”]; ?\>

2. use loadvars in flash to access this php  
oLoadvars = new LoadVars();  
oLoadvars.load(“http://…file.php”);

now you have

oLoadvars.avifilename with filename in flash.

1. use this in loadmovie  
movEmptyMovieClip.loadMovie(oLoadvars.avifilename);

---

<div class="post-metadata">

**Author:** ![bjory](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@bjory](https://forum.kirupa.com/u/bjory)\
**Post date:** [August 25, 2004, 12:25pm UTC](https://forum.kirupa.com/t/loading-avi-movie-from-mysql/120556/4 "2004-08-25T12:25:23Z")

</div>

thanks guys! so how do I control the size of the movie? Because it gonna be like 3 avi movies running at the same time on the same stage. Just like front angle, left angle, right angle this stuffs.
