# SWF's and passing Variables?

**URL:** https://forum.kirupa.com/t/swfs-and-passing-variables/6807
**Category:** flash
**Created:** [October 16, 2002, 9:49pm UTC](https://forum.kirupa.com/t/swfs-and-passing-variables/6807 "2002-10-16T21:49:00Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![sintax321](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@sintax321](https://forum.kirupa.com/u/sintax321)
#### Post date: [October 16, 2002, 9:49pm UTC](https://forum.kirupa.com/t/swfs-and-passing-variables/6807/1 "2002-10-16T21:49:00Z")

</div>

Is there a way to pass variables from one swf to another and not do it using PHP or ASP. Maybe just storing it to a txt file then loading it? :-\

Also is there a way to build a preloader in one swf that checks to see if another swf is loaded?

---

<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: [October 17, 2002, 5:19am UTC](https://forum.kirupa.com/t/swfs-and-passing-variables/6807/2 "2002-10-17T05:19:38Z")

</div>

I’m reworking my preloader again… might be helpful in a couple of days. The first question I have no clue on. I have a feeling that you can’t do that… but in Flash I try never to say never. I’m always finding new ways of doing something I thought wasn’t possible.

---

<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: [October 17, 2002, 5:45am UTC](https://forum.kirupa.com/t/swfs-and-passing-variables/6807/3 "2002-10-17T05:45:54Z")

</div>

Hey sintax321:

If your talking about having one SWF as your main page, then bringing in an external SWF and showing a preloader as the external SWF loads, then i know how to do it, but if thats not what you mean…sorry ☹

😛

---

<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: [October 17, 2002, 5:51am UTC](https://forum.kirupa.com/t/swfs-and-passing-variables/6807/4 "2002-10-17T05:51:33Z")

</div>

i did this stupid sample lat night!

[http://www.geocities.com/d\_dzign](http://www.geocities.com/d_dzign)

Go there and see if this is what u mean???

All those files that load in, they are all external swf’s!!

😛

---

<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: [October 17, 2002, 4:08pm UTC](https://forum.kirupa.com/t/swfs-and-passing-variables/6807/5 "2002-10-17T16:08:18Z")

</div>

Ya its something like that but I want to pass a variable created in one SWF so it can be used in another. It is a little more complicated than just a load movie. If i can acomplish this witout have to use PHP or ASP it will greatly improve the loadmovie FLA I sent you. Your SWF is looking great. Nice to see it is all coming together. I’m glad to see you figured out the preloaders. I was going to put them in the FLA I sent u but I didn’t have time. I hope to have that proper site structure FLA for ypu soon:)

---

<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: [October 17, 2002, 7:39pm UTC](https://forum.kirupa.com/t/swfs-and-passing-variables/6807/6 "2002-10-17T19:39:05Z")

</div>

Do you mean 2 separate swf that are on the same HTML page?

pom :asian:

---

<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: [October 17, 2002, 8:00pm UTC](https://forum.kirupa.com/t/swfs-and-passing-variables/6807/7 "2002-10-17T20:00:43Z")

</div>

Yes.  
And also though between an swf and a externaly loaded swf(loaded in to a main swf).🙂

---

<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: [October 17, 2002, 8:06pm UTC](https://forum.kirupa.com/t/swfs-and-passing-variables/6807/8 "2002-10-17T20:06:20Z")

</div>

For 2 separate swf, check MM’s site and look for the local Connection object.

For a loaded movie, all you have to do is use \_levelN in front. \_level0.yourVar=5;// …

---

<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: [October 17, 2002, 8:19pm UTC](https://forum.kirupa.com/t/swfs-and-passing-variables/6807/9 "2002-10-17T20:19:08Z")

</div>

Duh stupid me. Of course a external SWF loaded into a main SWF could pick up variables defined in the main SWF. Must of had a brain blackout or something. And thaks for the info on the two separate swf’s I’ll check it out. Quick question does the information at MM’s site have any other code (PHP, ASP) that I’ll have to figure out or is it all stuff I would know?

---

<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: [October 17, 2002, 8:28pm UTC](https://forum.kirupa.com/t/swfs-and-passing-variables/6807/10 "2002-10-17T20:28:54Z")

</div>

No backend. The object does the job for you. Nice folks, at MM’s…

---

<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: [October 17, 2002, 8:36pm UTC](https://forum.kirupa.com/t/swfs-and-passing-variables/6807/11 "2002-10-17T20:36:37Z")

</div>

Thanks man your the best!🙂
