Trouble with XML linking a to frame label in a movieclip

  • corrector
  • Born
  • Born
  • corrector
  • Posts: 2
  • Loc: Laguna Niguel, CA

Post 3+ Months Ago

I have a menu that’s contents are loaded from an XML document. This menu movie clip(a) is in a movie clip(b) in a file I’m trying to work with. I have another movie clip(c) with frame labels.

How can I create links in the XML document that will access the frame labels in(c) from menu(a)?

My AS code looks like this:

// Function for linking (target URL or movieclip frame label) _global.linkAction = function(object) { //Target a URL on press //getURL(object.link, “_blank”//Target frame labels within a movieclip on press _root.content_mc.gotoAndStop(object.link) }

And my XML code looks like this:

<Item Name="some name" Link="scrolling_content.cmw"/>

I’m trying to link to a frame in a movieclip enclosed in the same movieclip as the menu. I figured it was the wat I was addressing the link in the XML to the movieclip that I was flubbing. Where am I going wrong?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6249
  • Loc: Seattle, WA

Post 3+ Months Ago

This may or may not be the problem, but your attribute names in XML shouldn't be capitalized:
Code: [ Select ]
<item name="some name" link="scrolling_content.cmw"/>
  • corrector
  • Born
  • Born
  • corrector
  • Posts: 2
  • Loc: Laguna Niguel, CA

Post 3+ Months Ago

That does not seem to be my problem as the attribute names in the AS are capped as well.
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

want to post the rest of this function

Code: [ Select ]
// Function for linking (target URL or movieclip frame label) _global.linkAction = function(object) {


make sure the path to the movieclip you want to change is correct IE

_root.instancename.gotoAndPlay("frameLabel");

Code: [ Select ]
<item name="some name" frameName="myFrame" link="scrolling_content.cmw"/>

and in AS
Code: [ Select ]
var targFrame = xml.xmlNode.attributes.frameName;
movieClipInstance.nestedClipInstance.gotoAndPlay("targFrame");
  1. var targFrame = xml.xmlNode.attributes.frameName;
  2. movieClipInstance.nestedClipInstance.gotoAndPlay("targFrame");

Post Information

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