# If

**URL:** <https://forum.kirupa.com/t/if/26579>\
**Category:** Uncategorized\
**Created:** [July 24, 2003, 11:45am UTC](https://forum.kirupa.com/t/if/26579 "2003-07-24T11:45:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amerifax](https://avatars.discourse-cdn.com/v4/letter/a/839c29/32.png) [@amerifax](https://forum.kirupa.com/u/amerifax)\
**Post date:** [July 24, 2003, 11:45am UTC](https://forum.kirupa.com/t/if/26579/1 "2003-07-24T11:45:33Z")

</div>

I’am loading a movie with the following:

on (release) {  
\_root.product.loadMovie(“Pad\_Lead.swf”);  
}

Is there a way load only if there is an internet commection? I would like to show a movie that is on my site if there is a connection. If no connection I would like to inform the user that he will need to connect for best results.

Bob

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2003, 12:23pm UTC](https://forum.kirupa.com/t/if/26579/2 "2003-07-24T12:23:32Z")

</div>

I guess you could use the LoadVars object…  
[AS]myLoadVars = new LoadVars();  
myLoadVars.onLoad = function(success) {  
if (success) {  
// there’s an internet connection  
} else {  
// there’s no internet connection  
}  
};  
myLoadVars.load(“[http://www.domain.com/Pad\_Lead.swf](http://www.domain.com/Pad_Lead.swf)”);[/AS]
