XML based Flash menu

  • plugin+
  • Newbie
  • Newbie
  • plugin+
  • Posts: 10

Post 3+ Months Ago

Hi people,

I have an XML menu that works a treat but I am not sure how to load into levels using the XML file.

Currently I am only able to load into an external files using the location tag i.e.

<subitem name = "Name Here " location="web_.swf"></subitem>

Any help would be much appreciated.

Thanks
  • roarmeow
  • Professor
  • Professor
  • User avatar
  • Posts: 861
  • Loc: BKNY

Post 3+ Months Ago

please explain specifically what you want to do...
are you trying to load web_.swf into a particular layer?
also, post the script you're using to actually load the swf...

like, if, say, you've got an empty movie clip named "holder" up on there...

Code: [ Select ]
mySwf = newXML()
all your xml loading stuff here...
swfholder=this.firstChild.childNodes
...
holder.loadMovie(swfholder.attributes.location, 5);
  1. mySwf = newXML()
  2. all your xml loading stuff here...
  3. swfholder=this.firstChild.childNodes
  4. ...
  5. holder.loadMovie(swfholder.attributes.location, 5);


or something... but i'm not really sure what you're doing or what you're trying to do... loading an swf into a level is just the same, whether or not that name is gotten from an XML document...

peace,
puck
  • plugin+
  • Newbie
  • Newbie
  • plugin+
  • Posts: 10

Post 3+ Months Ago

Here is the code I am using (menu.xml)

<?xml version="1.0" encoding="iso-8859-1"?>
<menus>
<button name = "WEB DESIGN/DEVELOPMENT">
<subitem name = "FLASHTEXT" location="theswiff.swf"></subitem>
<subitem name = "IMS " location="theswiff.swf"></subitem>
<subitem name = "1 Name Here" location="theswiff.swf"></subitem>
<subitem name = "2 Name Here" location="theswiff.swf"></subitem>
<subitem name = "3 Name Here" location="theswiff.swf"></subitem>
<subitem name = "4 Name Here" location="theswiff.swf"></subitem>
<subitem name = "5 Name Here" location="theswiff.swf"></subitem>
<subitem name = "6 Name Here" location="theswiff.swf"></subitem>
<subitem name = "7 Name Here" location="theswiff.swf"></subitem>

</button>

<button name = "GRAPHIC DESIGN">
<subitem name = "1 Name Here location="theswiff.swf"></subitem>
<subitem name = "2 Name Here" location="theswiff.swf"></subitem>
</button>

<button name = "ENEWSLETTERS">
<subitem name = "1 Name Here " location="theswiff.swf"></subitem>
<subitem name = "2 Name Here " location="theswiff.swf"></subitem>
</button>

</menus>

When I click on the links they look for the file (theswiff.swf externally), I need to load the file into a level within flash, I think that might be the problem really, I am trying to add links externally and have them open up from within Flash.

Does that make sense?
  • roarmeow
  • Professor
  • Professor
  • User avatar
  • Posts: 861
  • Loc: BKNY

Post 3+ Months Ago

that kind of makes sense...
is there going to be an XHTML document that references the XML document, telling it to open up an .swf to a particular frame?
or is there going to be an .swf that, when you click on a button, it looks at the XML document and then loads another .swf to a location within the main .swf?
i still don't really understand what you are trying to do on a big picutre kind of level...

peace...
  • plugin+
  • Newbie
  • Newbie
  • plugin+
  • Posts: 10

Post 3+ Months Ago

Thanks roarmeow,

I have a main.swf file that has a navigational structure that is built from the xml file, I basically want to load all the links into level1 of the main.swf file via xml.

I'm thinking that XML would not be able to do this, if this is the case how do I get flash to help it.

Are all links that are referenced externally from an xml (like mine) not able to load to a target (in my case, a level) located on the main timeline?

Surely if you can communicate with flash and tell it to put labels onto buttons, you can communicate with flash to tell it that all the links should be loaded into level 1 of the main timeline.

This is my first attempt at using flash and xml, really pleased with the results so far, it would be good if I could just get the links to load into the main.swf file.

Thanks for any help :P

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 1 guest
  • 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.