Link to home
Start Free TrialLog in
Avatar of 4wheel
4wheel

asked on

inserting a hyperlink in xml file with flash components

All I want to do is to insert url links in the xml code below. In other words, I need the XML
equivalent to the HREF tag in html. I have tried several solutions without any luck so far.
here is the original XML file I want to work on (named "structure.xml") :

<?xml version="1.0" encoding="utf-8"?>
<menu>
        <item name="HOME PAGE" type="home" componentPath="dynamic_news" componentSWF="" visible="true"/>        
        <item name="XML ACCORDEON" type="component" componentPath="accordeon" componentSWF="accordeon.swf" visible="true"/>
        <item name="3D CAROUSEL" type="component" componentPath="carousel" componentSWF="carousel.swf" visible="true"/>
        <item name="EVENT PLANNER" type="component" componentPath="event_planner" componentSWF="event_planner.swf" visible="true"/>
        <item name="BOOKMARKER" type="component" componentPath="bookmarker" componentSWF="bookmarker.swf" visible="true"/>        
        <item name="PHOTO GALLERY" type="component" componentPath="images_gallery" componentSWF="img_gallery.swf" visible="true"/>
        <item name="VIDEO GALLERY" type="component" componentPath="video_gallery" componentSWF="video_gallery.swf" visible="true"/>
        <item name="AUDIO GALLERY" type="component" componentPath="audio_gallery" componentSWF="audio_gallery.swf" visible="true"/>
</menu>

I would like to add a link in HOME PAGE item above to an external website (for example: www.google.com)
I have tried a solution I saw posted in this blog but it did not work for me:

<item name="HOME PAGE" visible="true" componentPath="dynamic_news" componentSWF="intro.swf"/> <link>"http://www.google.com"</link>
 Does anyone have a solution?. Thanks a lot..

ps: i tried uploading the whole list of files but the upload program rejects .mp3 files.
Avatar of Bardobrave
Bardobrave
Flag of Spain image

XML is a data definition language. There is nothing like a link in it's syntax. What you can do with xml is to define any data structure in a very free way so your system can read that data and work with it. If you want to create a link you should program something in your back that reads the url that your xml contains (in a link tag or wherever you want to add it) and build an <a> tag inside the site.

Reading your post I think you're using some sort of automated back content generator. In it's documentation should be info about how to post links to it.
SOLUTION
Avatar of quizengine
quizengine
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 4wheel
4wheel

ASKER

Thank you friends.

Bardobrave, unfortunately there is no documentation about how to post links. I do see however another XML document that posts links to external URLs and they work fine (see attached xml code). In reference to programming something in the back to read the url, are your talking about modifying the .fla files?. The package I have did not include any .fla files

Quizengine, I am working with a flash-xml template that is rather old and has no longer any tech support. There are no .fla files either to edit, and I would not know how to modify them anyway since I don´t know flash.

If you wanted I could email you the whole package for you to test. Please let me know if you would like that. I can´t upload them here because of this site´s restrictions. cgal.xml
I'm not sure what to say...

If the swfs don't have the ability to launch links, then nothing in the XML file can give the swf that ability - it's the swf that would need changing, and yes, you would need to know Flash, or recruit someone who does, to be able to edit the behaviour of the swfs.

The HREF tag in HTML is a feature of HTML. XML doesn't have that feature, and swfs can only be made to launch webpages by creating Actionscript 'links' in them (e.g. using the getURL() actionscript instruction).
Avatar of 4wheel

ASKER

Thank you very much quizengine... I will search for a flash expert.. thanks again.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 4wheel

ASKER

Thank you Bardobrave. That did not work unfortunately. If you can please take a look at the template i have uploaded to a server for testing purposes. Menu item HOME PAGE has your link suggestion. I also added a new menu item called PRIVACY POLICY just for testing links to google.com, but no luck.

I even tried creating a transparent button the size of the screen with a link to google.com, but that doesn´t work either.

the test template can be seen at;

http://scottsdale.servershost.net/~inmueble/prueba/website/2644.html

Thanks again...
Mmmm... your original xml structure is
<component>
   <items>
       <item>
           <icon></icon>
           <link></link>
       </item>
    </items>
</component>

While your current trys are:
<menu>
  <item>
     <link></link>
  </item>
</menu>

You can try reproducing the original structure and see what happen.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 4wheel

ASKER

Thnaks for your help. Problem couldn´t be solved. But suggetsions were very helpful