Welcome, Guest. Please login or register.
Did you miss your activation email?
June 19, 2013, 10:50:50 PM

Login with username, password and session length
Search:     Advanced search
The look of the forum is still being worked on. Thank you for your patience.
193707 Posts in 16235 Topics by 17081 Members
Latest Member: helmetsoccer5

* Home Help Login Register
AppleGeeks.com  |  Help / Advice  |  Flash  |  Topic: "_level" Pathing Problem 0 Members and 1 Guest are viewing this topic.
Pages: [1] Go Down Print
Author Topic: "_level" Pathing Problem  (Read 5093 times)
DougofTheAbaci
Hero Member
*****
Posts: 6848


Just call me Audiophilus Magnum.


WWW
« on: April 02, 2006, 10:01:48 AM »

I'm making an XML powered menu for my website and it works fine as a stand-alone movieclip on my stage. But when I nest it inside a few more movieclips it stops working and I don't see why.

The original path was "_level0.m5d" but now since it's in a few more clips it should be "_level0.portfolioNacvMC.p5dMC.m5d" but that doesn't seem to work.

Here's my full script so you guys can give it a look over:
Code:
var xmlData:XML = new XML();
_level0.portfolioNavMC.p5dMC.m5d.xmlData.ignoreWhite = true;
_level0.portfolioNavMC.p5dMC.m5d.xmlData.load('m5d.xml');
_level0.m5d.xmlData.onLoad = function():Void  {
_level0.m5d.qtd = this.childNodes[0].childNodes.length;
for (i=0; i<qtd; i++) {
_level0.portfolioNavMC.p5dMC.m5d.xmlMenu.duplicateMovieClip('xmlMenu'+i, _level0.portfolioNavMC.p5dMC.m5d.getNextHighestDepth());
_level0.portfolioNavMC.p5dMC.m5d['xmlMenu'+i]._y += i*16;
_level0.portfolioNavMC.p5dMC.m5d['xmlMenu'+i].t = this.childNodes[0].childNodes[i].childNodes[0].firstChild;
_level0.portfolioNavMC.p5dMC.m5d['xmlMenu'+i].texto.text = _level0.portfolioNavMC.p5dMC.m5d['xmlMenu'+i].t.nodeValue;
_level0.portfolioNavMC.p5dMC.m5d['xmlMenu'+i].link = this.childNodes[0].childNodes[i].attributes.link;
_level0.portfolioNavMC.p5dMC.m5d['xmlMenu'+i].onRollOver = function() {
loadMovie(this.link, this.previewMC);
};
_level0.portfolioNavMC.p5dMC.m5d['xmlMenu'+i].onRollOut = function() {
unloadMovie(this.previewMC);
};
}
_level0.portfolioNavMC.p5dMC.m5d.m5d.xmlMenu.unloadMovie();
};

The only reason I can think of why this might not work is because "portfolioNavMC" is dynamically attached to the root timeline, but even when I just drag it onto the stage and apply the Instance Name that way it still doesn't work!

Anyone have any ideas why I can't get this thing to work?

Example File
Logged

Quote from: Douglas Adams
It is a mistake to think you can solve any major problems just with potatoes.
mixart
Guest
« Reply #1 on: May 05, 2006, 09:52:29 AM »

Could be....

var xmlData:XML = new XML();
(you're defining this XML on the timewhere where you have this code placed

_level0.m5d.xmlData.onLoad = function():Void  {
(Here's you're referencing xmlData inside this m5D movieclip not from the piece of timeline it was created.
Change to:
xmlData.onLoad = function():Void  {

Bit hard to tell without seeing the structure of the file, but give that a go.
Logged
DougofTheAbaci
Hero Member
*****
Posts: 6848


Just call me Audiophilus Magnum.


WWW
« Reply #2 on: May 05, 2006, 11:32:46 AM »

Nah, no worries I got it working now.

www.dougstewartdesign.com

Check out the portfolio section menus. Those were what I was doing.
Logged

Quote from: Douglas Adams
It is a mistake to think you can solve any major problems just with potatoes.
Netlatino
Sr. Member
****
Posts: 488


Can't Touch This...


WWW
« Reply #3 on: May 05, 2006, 12:47:44 PM »

looks good... only thing I can see with it is that between the time the page loads and the time the articles load you have this "Title Goes here/Text Goes here" thing going on... might wanna look into it... other than that it looks great... you have great design ideas ('cept it took me a few seconds to realize that you had to click on the text that pops up next to the cursor to get to the article  Undecided   Rule #1 in web design: make sure it is easy to navigate... stupid ppl around the world will be on your site and you want even an untrained monkey to be able to navigate through your site with ease)
Logged

DougofTheAbaci
Hero Member
*****
Posts: 6848


Just call me Audiophilus Magnum.


WWW
« Reply #4 on: May 05, 2006, 01:03:32 PM »

Yeah, that's because it's loaded as XML and I am too lazy and don't have the time to change it. As for the navigation, I've yet to have other person have a problem with it really and personally I thought it was rather obvious lol. I'm going to play with it when I have more time (read: maybe in the summer if I have any free time) but for now it works fine.
Logged

Quote from: Douglas Adams
It is a mistake to think you can solve any major problems just with potatoes.
Netlatino
Sr. Member
****
Posts: 488


Can't Touch This...


WWW
« Reply #5 on: May 05, 2006, 02:34:28 PM »

I wish I could learn XML... frankly I don't have the time right now, and I do web design as a hobby/side business but I need to learn more XML and actionscript for Flash (I still use Flash MX.. I need to get with the program, don't I?) Anywho, you did a good job with the design, I like the whole idea... Keep up the good work!
Logged

DougofTheAbaci
Hero Member
*****
Posts: 6848


Just call me Audiophilus Magnum.


WWW
« Reply #6 on: May 05, 2006, 09:43:21 PM »

Do you script with ActionScript 2.0 or 1.0? If I remember MX was one of the first, if not the first, that could do both. I have a book that's a AS 2.0 reference book for MX but the code hasn't changed so it's no problem.

As for learning XML, there's a tutorial at www.actionscript.org in the intermediate section which works fantastically and is where I learned what I know. I'd offer to give you some pointers on it but am only stumbling my way through it as it is haha!
Logged

Quote from: Douglas Adams
It is a mistake to think you can solve any major problems just with potatoes.
Pages: [1] Go Up Print 
AppleGeeks.com  |  Help / Advice  |  Flash  |  Topic: "_level" Pathing Problem
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.071 seconds with 19 queries.