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
[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 =)
Sorry about that i thought you wanted to know about how the loadvar worked :-\
oh and Voetsjoeba you have a type0
/*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
[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.