# Flashvar Question

**URL:** <https://forum.kirupa.com/t/flashvar-question/256285>\
**Category:** flash\
**Created:** [April 1, 2008, 4:57pm UTC](https://forum.kirupa.com/t/flashvar-question/256285 "2008-04-01T16:57:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kidg](https://avatars.discourse-cdn.com/v4/letter/k/85e7bf/32.png) [@kidg](https://forum.kirupa.com/u/kidg)\
**Post date:** [April 1, 2008, 4:57pm UTC](https://forum.kirupa.com/t/flashvar-question/256285/1 "2008-04-01T16:57:42Z")

</div>

I am using flashvars to pass a URL that Flash uses to load XML data.

In Flash, my Actionscript says:

```auto
var flashVar = root.loaderInfo.parameters.flashVar;
if (flashVar != undefined) {
    flashVar = flashVar;
// Loads data into XML object and away we go //

```

So far, so good so what’s my problem?

Well, I want to create a method to use in case the URL is entered into the flashvar incorrectly. In such a case, the argument would still hold true as the value is not undefined…just incorrect.

I am able to add an argument that detects whether the flashvar is empty:

```auto
} else if (flashVar == "") {
// Display an error message or use a default URL //

```

So my question is, what argument would I use to detect when an INVALID value is passed to the flashVar variable?

I appreciate any help that I can get. Thanks.
