Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Picture that correspond to the variable

Status
Not open for further replies.

bubu

Programmer
Mar 3, 2002
463
RO
Hello!
I am reading an ASP file in my flash movie and take 3 variables: destination, price, link.

For every destination i have a different picture...how can i choose the right picture for every destination according to the destination variable...

I know that is very simple but i am really dizzy now...i had an exam today and my mind is glowing :)

Regards,
Dragos.


 
Buba - I have developed a web site that uses a Microsoft Access data base to populate each web page.Text and graphics. Here is the code I used for the graphics.


<img src=&quot;URL/<%=(Recordset1.Fields.Item(&quot;GraphicsData&quot;).Value)%>&quot; align=&quot;top&quot;>

The field GraphicsData contains the name of the graphics file. All graphics files are in a folder in the the URL.

Do you use one picture for each of the three variables?

i.e.
destination - associated with one picture, say Pic1
price - associated with one picture, say Pic2
link.- associated with one picture, say Pic3
 
I have one destination that has a price and a link...so i have a different picture for every &quot;destination&quot; variable. Regards,
Dragos.


 
I can thing of two ways to do this.

One Way:
Use the data base to access the graphics - To do this use two fields.
A) Field one is called destination
B) Field two contains the Name of the graphics file

Use ASP to retrieve the correct Graphics file.

Second Way:
This might be the easier of the two. Use IF statements in Flash to access the correct graphics according to the variable name.

Where are you placing the picture ? On the same web page as Flash, or in the Flash movie ?
 
Buba - You could elliminate all this efort by just putting the graphics file name in the data base, and access it when you get the destination.
 
Thanks a lot for the replies Tom. I will try to do it now and i will let you know what i have done.

And Tom: is BUBU not BUBA [peace] Regards,
Dragos.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top