# Difference between JPG and SWF w/ XML

**URL:** <https://forum.kirupa.com/t/difference-between-jpg-and-swf-w-xml/138871>\
**Category:** Uncategorized\
**Created:** [February 26, 2005, 1:13am UTC](https://forum.kirupa.com/t/difference-between-jpg-and-swf-w-xml/138871 "2005-02-26T01:13:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![misterpatrick](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@misterpatrick](https://forum.kirupa.com/u/misterpatrick)\
**Post date:** [February 26, 2005, 1:13am UTC](https://forum.kirupa.com/t/difference-between-jpg-and-swf-w-xml/138871/1 "2005-02-26T01:13:41Z")

</div>

Hello all,

I am trying to figure something out. I am trying to load random external SWF’s using XML. I’m not having any problems loading JPG files, but the SWF’s just won’t load. Is there a difference between JPG’s and SWF’s when loading using loadMovie? Pointers to tutorials or pages in the manual would be great.

Here’s a snippet of the code:

[AS]  
function firstImage() {  
if (p\<(total-1)) {  
p=random(total);  
if (loaded == filesize) {  
\_root.picture.loadMovie(image[p], 1);  
\_root.picture.play();  
}  
}  
}[/AS]

The XML calls etc are based on the XML Gallery source.

Thanks!
