Flash and XML - Label Component Errors

  • genius
  • Newbie
  • Newbie
  • User avatar
  • Joined: Sep 13, 2004
  • Posts: 12
  • Loc: San Antonio, TX
  • Status: Offline

Post February 27th, 2006, 5:30 pm

So I am redesigning my site to dynamically pull data from a mysql database and everything works great except for an html link.

I am using the following line of actionscript to put an html link inside of a label component called "map_txt".

Code: [ Download ] [ Select ]
_root.details_mc.map_txt.text = "<a href=\""+business_ds.items[st].Map+"\" target=\"_blank\">Map</a>";


Basically, this grabs a string from a dataset (which grabs info from the database via xml/php), turns the string into an html link, and passes it over to the map_txt label component for display.

The link works great but the problem is that flash doesn't display anything. You can hover your cursor over where the link should be and the cursor changes to a hand and you can click the link and it opens a new page, etc, etc, etc... But flash doesn't display the text portion of the link (it should read Map).

Here's a link to the swf:
http://www.sacritic.com/sql_critique_main.html

I have only populated the database with a few items for now but you can select a category from the combobox then click on a business name and the record will be displayed.

The "problem link" is located directly under the phone number on the left.

Any ideas?
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post February 27th, 2006, 5:30 pm

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1241
  • Loc: Ro
  • Status: Offline

Post February 28th, 2006, 3:16 am

not sure ... the links works, if it didnt i could`ve said flash doesnt recognise the <a href> html tag. Another thing would be ... is the label color Black? :D (hahhaaahaa).
Anway, you can make a workaround.

when the user select a business:
crtSelectedURL = business_ds.items[st].Map;

and, a general purpouse function:
map_txt.onPress = function()
{
getURL(crtSelectedURL);
}

myLabel.text = "Map";

if that doesnt work (the onPress function), instead of a label component, use a movieclip with a dynamic textfield inside it.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 44 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
 
 

© 2010 Unmelted, LLC. Driven by phpBB © 2010 phpBB Group.