# Filename.swf?122 instead of filename.swf?file=122?

**URL:** <https://forum.kirupa.com/t/filename-swf-122-instead-of-filename-swf-file-122/24479>\
**Category:** Uncategorized\
**Created:** [July 1, 2003, 8:27am UTC](https://forum.kirupa.com/t/filename-swf-122-instead-of-filename-swf-file-122/24479 "2003-07-01T08:27:28Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![keitai](https://avatars.discourse-cdn.com/v4/letter/k/73ab20/32.png) [@keitai](https://forum.kirupa.com/u/keitai)\
**Post date:** [July 1, 2003, 8:27am UTC](https://forum.kirupa.com/t/filename-swf-122-instead-of-filename-swf-file-122/24479/1 "2003-07-01T08:27:28Z")

</div>

HI,

Can i use filename.swf?122 instead of filename.swf?file=122 and somehow program actionscript to “listen” for external variables and if it detects one is automatically the value of “file”?

And is it also possible to use something like filename.swf?122&33&44  
And again use AS to “listen” for 3 variables values?

Grtz,

---

<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 1, 2003, 8:39am UTC](https://forum.kirupa.com/t/filename-swf-122-instead-of-filename-swf-file-122/24479/2 "2003-07-01T08:39:55Z")

</div>

You can do it with some javascript, but you’d be limited to one variable if you don’t want to specify the variable name in the url. In the html file your movie sits in you need to replace the flash object definition tags with this:

\<script language=“javascript”\>  
href=document.location.href;  
params=href.substr(href.indexOf(’?’) + 1);  
document.writeln (’\<OBJECT classid=“clsid:D27CDB6E-AE6D-11cf-96B8-444553540000”’);  
document.writeln (’ codebase=“[http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0](http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0)” WIDTH=620 HEIGHT=220\>’);  
document.writeln (’ \<PARAM NAME=movie VALUE=“YoiurMovie.swf?Filename=’ + params + '”\> \<PARAM NAME=quality VALUE=high\> \<PARAM NAME=bgcolor VALUE=#FFFFFF\>’);  
document.writeln (’ \<EMBED src=“YourMovie.swf?Filename=’ + params + '” quality=high bgcolor=#FFFFFF WIDTH=620 HEIGHT=220 TYPE=“application/x-shockwave-flash” PLUGINSPAGE=“[http://www.macromedia.com/shockwave/download/index.cgi?P1\_Prod\_Version=ShockwaveFlash](http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash)”\>\</EMBED\>\</OBJECT\>’);  
\</script\>

the javascript captures the parameter and passes it on to the flash object. If you decided you don’t mind passing in the variable names too then you can pass as many variables as you heart desires with almost the same code:

\<script language=“javascript”\>  
href=document.location.href;  
params=href.substr(href.indexOf(’?’));  
document.writeln (’\<OBJECT classid=“clsid:D27CDB6E-AE6D-11cf-96B8-444553540000”’);  
document.writeln (’ codebase=“[http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0](http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0)” WIDTH=620 HEIGHT=220\>’);  
document.writeln (’ \<PARAM NAME=movie VALUE=“YoiurMovie.swf’ + params + '”\> \<PARAM NAME=quality VALUE=high\> \<PARAM NAME=bgcolor VALUE=#FFFFFF\>’);  
document.writeln (’ \<EMBED src=“YourMovie.swf’ + params + '” quality=high bgcolor=#FFFFFF WIDTH=620 HEIGHT=220 TYPE=“application/x-shockwave-flash” PLUGINSPAGE=“[http://www.macromedia.com/shockwave/download/index.cgi?P1\_Prod\_Version=ShockwaveFlash](http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash)”\>\</EMBED\>\</OBJECT\>’);  
\</script\>

Let me know if you have any trouble gettin it working 😛

---

<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 1, 2003, 9:04am UTC](https://forum.kirupa.com/t/filename-swf-122-instead-of-filename-swf-file-122/24479/3 "2003-07-01T09:04:50Z")

</div>

thnks,

But  
1 i can’t see your code if any was provided.  
2 right now i use ?variableName=value

Q.  
1 So i can use ?variableName=value&variableName2=value etc.

Grtz

---

<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 1, 2003, 9:06am UTC](https://forum.kirupa.com/t/filename-swf-122-instead-of-filename-swf-file-122/24479/4 "2003-07-01T09:06:21Z")

</div>

\*\*\*\* my code dissappeared! This forum doesn’t seem to like html tags in posts 2 secs and I’ll find a tutorial for ya

---

<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 1, 2003, 9:27am UTC](https://forum.kirupa.com/t/filename-swf-122-instead-of-filename-swf-file-122/24479/5 "2003-07-01T09:27:07Z")

</div>

hey I didn’t swear?! well d\*mn wasn’t a swear word when I was a lad, maybe I’m gettin old…

okay the tutorial I was thinking of doesn’t exist anymore ☹ but not to worry I’ve attached an example for you to look at. Hope this helps. Unfortunatly this version won’t work if you open the page without passing in a parameter in the url

---

<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 1, 2003, 9:46am UTC](https://forum.kirupa.com/t/filename-swf-122-instead-of-filename-swf-file-122/24479/6 "2003-07-01T09:46:55Z")

</div>

aight thnks,

gonna delve into your code 😉

---

<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 1, 2003, 10:23am UTC](https://forum.kirupa.com/t/filename-swf-122-instead-of-filename-swf-file-122/24479/7 "2003-07-01T10:23:09Z")

</div>

> _Originally posted by m\_andrews808_  
> \*\*\*\*\*\* my code dissappeared!\*\*

use [php\*\*\*\*][/php\*\*\*\*] tags to show your code.

---

<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 1, 2003, 10:24am UTC](https://forum.kirupa.com/t/filename-swf-122-instead-of-filename-swf-file-122/24479/8 "2003-07-01T10:24:27Z")

</div>

cool thanks for the tip

---

<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 1, 2003, 10:25am UTC](https://forum.kirupa.com/t/filename-swf-122-instead-of-filename-swf-file-122/24479/9 "2003-07-01T10:25:18Z")

</div>

😉
