change instance color from database query?

  • wgardens
  • Born
  • Born
  • wgardens
  • Posts: 1

Post 3+ Months Ago

I want to change the color of a button on a page by reading in a database entry, and also have the button call a particular URL using it's instance name as part of the URL

my starting file is at: http://mbliving.com/WP/testLotPrice.html

I'm starting to create an interactive map for a client which I want to accomplish several things. The client has a cold fusion site which allows him to enter lot numbers for sale, the price, and whether that lot has sold or not. currently the community has 341 lots - about 30 are available.
I'm planning on making each lot a button, with an instance name consisting of the lot number itself. I have a cfm page created which gives me the following output from the database:

&LotNumber=#getinfo.lotnumber#&Price=#thecost#&TotalRecords=#count.recordcount#&soldyesno=#getinfo.soldyesno#

I have the folling code attached to each button:
on (release)
{
loadVariables ("http://mbliving.com/WP/flash.cfm?lotnumber=248", this);
}

where "248" is replaced by the actual lot number. Can I change that dynamically based on the instance name? Also, if the "getinfo.soldyesno" returns a "Yes," I want to be able to change the color of the button to red to indicate visually that it's sold.

Can anybody help?
TIA

For reference, the following script on my main timeline:

onClipEvent(load)
{
CurrentRecord = 0;
loadVariables ("http://mbliving.com/WP/flash.cfm?lotnumber=248", this);
}
onClipEvent(data)
{
strLotPrice = Price;
strLotNumber = LotNumber;
strPosition = "Record " add String(CurrentRecord+1) add " of " add String(TotalRecords);
}


 
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 10 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.