A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Variable question...

  1. #1

    Is there a way to call a variable within the URL field of the "loadVariables" action.

    Example:
    I've got a Cold Fusion page that loads info into my movie, but you need to enter in a user ID number to interact with the ColdFusion page. Here is what I've got so far:

    loadVariablesNum ("flash_artistdiscography.cfm?albumid=(artist_numb er)", 0, "POST");

    When I hard code a number instead of the "artist_number" it generates the MC like I want.

    Does anyone know the snytax or the proper way to call that "artist_number" variable so it plugs into the URL...

    Any help or thoughts would be extremely helpful...

    Thanks
    Darb

  2. #2
    the traveler
    Join Date
    Aug 2000
    Location
    West Hartford, CT
    Posts
    638
    no problem.. i do that very thing on my site so it knows which photos to load.

    you want artist_number to be passed to the CF page as an URL variable, yes? here is what you do:

    Code:
    theURL = "flash_artistdiscography.cfm?albumid="+artist_number;
    loadVariablesNum(theURL, 0, "post");
    you have to concatenate the variable with the URL of the CF action page. if you don't, it will explicity load "flash_artistdiscography.cfm?albumid=(artist_numbe r)" which means nothing because your CF page will think that the variable "albumid" = "(artist_number)" when really you want it to be equal to something like "15" -- the actual value of "artist_number".

    hope that helps you out.

  3. #3
    Gracias!!

    You rock. Now I'll be able to implement this in all the places that I use Cold Fusion!! Rad...

    Darb

  4. #4
    the traveler
    Join Date
    Aug 2000
    Location
    West Hartford, CT
    Posts
    638
    no problem, glad i could help

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center