# Retrieve things from database to flash via asp?

**URL:** <https://forum.kirupa.com/t/retrieve-things-from-database-to-flash-via-asp/28847>\
**Category:** Uncategorized\
**Created:** [August 19, 2003, 10:02am UTC](https://forum.kirupa.com/t/retrieve-things-from-database-to-flash-via-asp/28847 "2003-08-19T10:02:08Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![SBUH](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@SBUH](https://forum.kirupa.com/u/SBUH)\
**Post date:** [August 19, 2003, 10:02am UTC](https://forum.kirupa.com/t/retrieve-things-from-database-to-flash-via-asp/28847/1 "2003-08-19T10:02:08Z")

</div>

Hello, I have flashpage to retrieve the information for asp page.

Now I can show the things from database on the asp page like  
&imageF=004&galleryimageF=2.jpg&fronts\_text=hello,dear&frontsx=432&frontsy=76.5&fronts\_color=16711680&fronts\_font=Arial Black&frontsscalex=161.051&frontsscaley=161.051&

How should I record them to show the things on the flash page then?

I knew myData=new LoadVars();  
myData.source=“cart.asp”  
myData.onload=function() {  
…  
}

Then what should I write inside{} to make all the things shown. Or is it unessary to put all the things inside() to get them load? how should I do?

imageF and galleryimageF are two images’ names. they are located at image/ on the server folder. Fronts\_text is the content of the textfield. frontsx and frontsy is the \_x and \_y of the textfield.fronts\_color is the color of the text and fronts\_font is the font face of the text. frontsscalex and frontsscaley are the x, y scale of the text

Thanks very much in advance!

---

<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:** [August 19, 2003, 10:34am UTC](https://forum.kirupa.com/t/retrieve-things-from-database-to-flash-via-asp/28847/2 "2003-08-19T10:34:51Z")

</div>

Hoi

in the onLoad function you can call them with this.varName and out side (when they are loaded) yourLoadVarsName.varName  
for example…

```auto

myData=new LoadVars();
myData.source="cart.asp"
myData.onload=function() {
_root.fronts_mc._y = this.frontsy
}
if(myData.loaded){
_root.fronts_mc._x = myData.frontsx
}

```

😉

---

<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:** [August 19, 2003, 10:51am UTC](https://forum.kirupa.com/t/retrieve-things-from-database-to-flash-via-asp/28847/3 "2003-08-19T10:51:41Z")

</div>

hello, friend. how about the images and the color and font face of the textfield then? I am confused at this point! Thanks

---

<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:** [August 19, 2003, 11:07am UTC](https://forum.kirupa.com/t/retrieve-things-from-database-to-flash-via-asp/28847/4 "2003-08-19T11:07:27Z")

</div>

[AS]  
myData=new LoadVars();  
myData.source="cart.asp"  
myData.onload=function() {  
/\* Create a textformat for the textfield and assign it to the textfield\*/  
frontformat = new TextFormat();  
frontformat.font = this.fronts\_font;  
frontformat.color = this.fronts\_color;  
\_root.fronts.setTextFormat(frontformat);

/_Load the two images in movieclips with the instance names holder1 and holder2_/  
\_root.holder1.loadMovie(this.imageF)  
\_root.holder2.loadMovie(this.galleryimageF)

/_Set the properties of the textfield_/  
\_root.fronts.\_y = this.frontsy  
\_root.fronts.\_x = this.frontsx  
\_root.fronts.\_xscale = this.frontsscalex  
\_root.fronts.\_yscale = this.frontsscaley  
}  
[/AS]

… I think. Never worked with ASP though.

The imageF variable from the asp file is 004, with no extension. You might wanna take a look at that. And also at the color variable from the asp file, it’s 16711680., while it should be something like 0xFF0000.

What master64 was mentioning is that loadVars is an object, which means that you can always access the vars using myData.variable. For example, myData.frontsscaley =)

---

<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:** [August 19, 2003, 11:20am UTC](https://forum.kirupa.com/t/retrieve-things-from-database-to-flash-via-asp/28847/5 "2003-08-19T11:20:16Z")

</div>

Sorry about that i thought you wanted to know about how the loadvar worked :-\

oh and Voetsjoeba you have a type0

```auto

/*Load the two images in movieclips with the instance names holder1 and holder2*/
        _root.holder1.loadMovie(this.imageF)
        _root.holder **2**.loadMovie(this.galleryimageF)// there was a 1 and not a 2

```

---

<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:** [August 19, 2003, 12:12pm UTC](https://forum.kirupa.com/t/retrieve-things-from-database-to-flash-via-asp/28847/6 "2003-08-19T12:12:22Z")

</div>

Oh, right 🙂 Thanks for pointing that out meester64 😉

---

<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:** [August 19, 2003, 1:53pm UTC](https://forum.kirupa.com/t/retrieve-things-from-database-to-flash-via-asp/28847/7 "2003-08-19T13:53:37Z")

</div>

Hello, thanks for both of you indeed. Now it is working. And I correct my mistake so that now the imageF and galleryimageF are both ended with .jpg

But because my pictures are all in the folder uploadedimage on the server

I tried to use  
\_root.imagemc.loadMovie("/uploadedimage/"+this.imageF)  
\_root.gallery.loadMovie("/uploadedimage/"+this.galleryimageF)

But nothing loaded. Do u have any suggestion about this then? thanks again!

---

<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:** [August 19, 2003, 2:03pm UTC](https://forum.kirupa.com/t/retrieve-things-from-database-to-flash-via-asp/28847/8 "2003-08-19T14:03:44Z")

</div>

[AS]  
myData=new LoadVars();  
myData.source="cart.asp"  
myData.onload=function() {  
/\* Create a textformat for the textfield and assign it to the textfield\*/  
frontformat = new TextFormat();  
frontformat.font = this.fronts\_font;  
frontformat.color = this.fronts\_color;  
\_root.fronts.setTextFormat(frontformat);

```
    /*Load the two images in movieclips with the instance names holder1 and holder2*/

```

imF = “uploadedimage/”+this.imageF  
imgaF = “uploadedimage/”+this.galleryimageF  
\_root.imagemc.loadMovie(imF)  
\_root.gallery.loadMovie(imgaF)

```
    /*Set the properties of the textfield*/
    _root.fronts._y = this.frontsy
    _root.fronts._x = this.frontsx
    _root.fronts._xscale = this.frontsscalex
    _root.fronts._yscale = this.frontsscaley

```

}  
[/AS]

If this swf is in the same folder in which the folder uploadedimage is and if imagemc and gallery are on the main timeline.

---

<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:** [August 19, 2003, 2:20pm UTC](https://forum.kirupa.com/t/retrieve-things-from-database-to-flash-via-asp/28847/9 "2003-08-19T14:20:33Z")

</div>

Yes, exactly right now. Thanks very much for your help!! Best Regard!!!

---

<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:** [August 19, 2003, 2:34pm UTC](https://forum.kirupa.com/t/retrieve-things-from-database-to-flash-via-asp/28847/10 "2003-08-19T14:34:13Z")

</div>

You’re welcome 🙂
