Need to dynamically choose images / SWF files

Results 1 to 2 of 2

Thread: Need to dynamically choose images / SWF files

  1. #1
    Join Date
    Dec 1969

    Default Need to dynamically choose images / SWF files

    I have a form that the user makes a series of choices. When they click submit I need to dynamically choose an image and place it at the top of the page and put a Flash SWF file below it.<BR><BR>All combinations of choices will result in the same configuration, just different files.<BR><BR>Can I do this?<BR><BR>I feel like it would be just a variable that would be changed for each filename (image and SWF) and used in the img and flash tag.<BR><BR>Am I on the right track? If so, could you please point me in the right direction. If not then put me on the right track?<BR><BR>I really appreciate your time and help.<BR><BR>Ron.

  2. #2
    Join Date
    Dec 1969

    Default You're on the right track..

    Say you have 3 sets of files:<BR>img_top_1.gif<BR>img_bottom_1.gif<BR>fla sh_1.swf<BR>---<BR>img_top_2.gif<BR>img_bottom_2.gif<BR>flash_2.g if<BR>---<BR>img_top_3.gif<BR>img_bottom_3.gif<BR>flash_3.s wf<BR><BR>Then, you just set a variable on your ASP page (assuming it&#039;s passed via the querystring):<BR>[code language="VBScript"]&#060;%sSet = Request.QueryString("set")<BR>If sSet = "" Then sSet = 1<BR>If Not IsNumeric(sSet) Then sSet = 1<BR>%&#062;<BR>&#060;img src="img_top_&#060;%=sSet %&#062;.gif"&#062;&#060;br /&#062;<BR>&#060;object flashfilewhatever="flash_&#060;%=sSet %&#062;.swf"&#062;&#060;br /&#062;<BR>&#060;img src="img_bottom_&#060;%=sSet %&#062;.gif"&#062;<BR>[/code]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts