Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Dynamic Navigation Challenge



I posted this in the xml section, but since it directly has to do with actionscript Ill post it here to if you dont mind.

I am new to XML/Actionscripting and I think I
am way over my head right now. I am trying to build a Navagation system where there would be a dynaminc duplicated mainbutton (admissions, programs) with its
own unique link (orignLinkname),
that displays dynamic links when rolled over on (link name, url).
I understand that I am going to have to use some interesting arrays,
But i am having a tough time pulling it together with some of the sample code
that I am learning from.
Any ideas?
Thanks,
Nathan

Heres the XML (just two buttons for now)

http://www.versatileproductions.com/...samplexml.html



FlashKit > Flash Help > Flash ActionScript
Posted on: 07-17-2002, 02:14 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

CHALLENGE: How Did They Do That Navigation?
Hello there...

i would love to know how to replicate the navigation from these sites:

http://www.thebees.info/

and

http://www.tidelandthemovie.com/main.html

they are pretty similar and very effective. I know the first one works with Flash Player 5 so i thought there would be someone that can help in here...

i spent two days searching troughout the archive in FlashKit but still no luck... help, anybody?! pleeeease...

cheers,
Silvio

Challenge - How To Make Blanco Navigation
Hey Guys,

I know I'm new but I really hope one of you can help me out. Please go and have a look at http://www.blancoint.com/. I really like the navigation on the catalog screen. I would like to use something like this for a portfolio cd-rom I'm designing. Can this be done in flash 5? I'm not very advanced yet so you help will be extremly appriciated.

Thanks for listening and start cracking that brain.

The Dynamic ComboBox Challenge
I have a challenge for someone to work out for me.



Im making a site that im trying to make as dynamic as possible.



The movie is set out like this: Only one comboBox and one Dynamic text field.



I want Text to load into the dynamic text field dependant on the selected field. But thats the easy part!



This is the hard part. I want up to 5 fields in the ComboBox dynamically loaded from an external .txt file. Then when a certain option is selected from the comboBox, it loads a section of text from another external .txt file.



Now to picture this better: It is being used as a gig guide for a band site. When a Date is selected in the comboBox it brings up the gig info in the Dynamic Text Field. All the info needs to be changed easily over one or two text files.



Many thanks in advance.

The Dynamic ComboBox Challenge
I have a challenge for someone to work out for me.

Im making a site that im trying to make as dynamic as possible.

The movie is set out like this: Only one comboBox and one Dynamic text field.

I want Text to load into the dynamic text field dependant on the selected field. But thats the easy part!

This is the hard part. I want up to 5 fields in the ComboBox dynamically loaded from an external .txt file. Then when a certain option is selected from the comboBox, it loads a section of text from another external .txt file.

Now to picture this better: It is being used as a gig guide for a band site. When a Date is selected in the comboBox it brings up the gig info in the Dynamic Text Field. All the info needs to be changed easily over one or two text files.

Many thanks in advance.

The Dynamic ComboBox Challenge
I have a challenge for someone to work out for me.

Im making a site that im trying to make as dynamic as possible.

The movie is set out like this: Only one comboBox and one Dynamic text field.

I want Text to load into the dynamic text field dependant on the selected field. But thats the easy part!

This is the hard part. I want up to 5 fields in the ComboBox dynamically loaded from an external .txt file. Then when a certain option is selected from the comboBox, it loads a section of text from another external .txt file.

Now to picture this better: It is being used as a gig guide for a band site. When a Date is selected in the comboBox it brings up the gig info in the Dynamic Text Field. All the info needs to be changed easily over one or two text files.

Many thanks in advance.

Dynamic Graph Plotting Challenge
Hi,

I am stuck with this project I got ... well let me first explain what I've done so far. First version of the project involved using a given array of eg 36 answered qustions where each answer can be from 1-5 (but points 4 & 5 are plotted on the same line so it's like there are 4) ...at the moment the graph is a static image of the circles one inside the other with common origin but different radiuses all together divided into 36 sectors (each sector belongs to a one question) reffer to the graph attached. so for example question one starts of on the radius 1 sector 1 which is 0 degrees of the circle. If answer is 1 dot is plotted in the origin if answer 2 dot is plotted on the intersection of the smallest circle and the radius line ... etc answer 4-5 plottted on the most outer intersection of biggest circle . So I've done that because I had the set number of questions and preset graphs looks (which is just a background jpg image) so I just manually placed the dots and activated each one depending on the array values ... and then used those coordinates to fill the shape ...so just the green area (filled area over the graph) is dynamic.

Now the problem is in new version I wont know how many questions there are going to be in other words it varies from 26 to 46 can be anything and the whole graph needs to be dynamically drawn so now I need to mathematically draw it and calculate the dots... so I'll pass to flash number of question and answer for each question (1-5 or one of the 4 dots per sector) it needs then to calculate how to draw graph and how many sectors to draw and then calculate the dots and plot the graph by connecting dots and filling the area.

Any ideas my maths is not that good

cheers

Interesting Dynamic Text Challenge
I would like to resize dynamic text in a unique way, and I've searched these boards for a few hours but I can't seem to find a way to do it. I think it can't be done. Here's the idea:

let's say the dynamic text string is "THIS IS HOW I NEED THE DYNAMIC TEXT TO APPEAR" I want it to appear in a collumn of text with each line sized to fit a specific width, like the attached gif.

Anyone have any ideas? Should I give up?

Here's A Challenge, Dynamic Vars And Drawing
hello all, i am new to this forum. i am an avid php developer and long time fan of flash. however, not very skilled with flash. here's what i am trying to do...

i need to load dynamic variables from a database, i have the interface for this using a php file. however i need to create a hierarchial structure with that data and draw a "tree", if you will, based on the info from the variables.

for example...

Object 1
-Object 1A
|-Object 1AA
|-Object 1AB
-Object 1B
|-Object 1BA
|-Object 1BB
|-Object 1BC

etc.. with numerous levels in a graphically formatted tree type structure.

to determine the structure,i am thinking of passing variables that simply identify the parent id for each object to be able and draw upon that. however, i dont know how to actually create/draw the structure in flash. the whole tree would have to be loaded and thus drawn dynamically, so i imagine a good deal of actionscript might be involved.

could anyone provide some answers or point me in the right direction? i would very much appreciate your help. thanks.

Dynamic Text/image Viewer Challenge
Hello all!

I am bulding a site for a Dj/Artist Management Agency.
Part of the site will be a section with their complete artist roster, divided into sections.

Here is a link, if you click on "Agency" you will see what im getting at:

http://217.199.182.231/~milk/

Now the issue is that they have somewhere in the region of 350 artists and are ever expanding...

Here is a link to a functionaing example of what im trying to achieve within this page:

http://www.emakmafu.com/forum/txt_image_viewer/

It works but obviously due to my level of Flash skill/knowledge, I would have to duplicate the the .fla's, input the name, scroll text, images and amount of buttons 350 + times.

I am vaguely familiar with XML and am builing the scroll menu on the page in XML (its not on there yet). I think this may be a good option. So, what im asking is does anyone know the best way to go about building something like this...

Any guidance, towards resources, tutorials, source files or just advice on the best approach would be hugely appreciated.

As ever thank you for reading the post!
Henry

ULTIMATE CHALLENGE ->Take Up This Challenge If U Think U R Gd Enough<-
use the minimum amount of code to open up an external video clip like .mpg or .mpeg using a flash projector(*.exe).
U can use the following s/w that i had uploaded to help u...

or u can d/l @ this link
http://www.ampsoft.net

U can post / upload your codes to show how Pro u r...

ULTIMATE CHALLENGE->Take This Challenge If U Think U R Pro Enough<-
use the minimum amount of code to open up an external video clip like .mpg or .mpeg using a flash projector(*.exe).
U can use the following s/w that i had uploaded to help u...

or u can d/l @ this link
http://www.ampsoft.net

U can post / upload your codes to show how Pro u r...

[CS3]{as2} Dynamic Navigation, Dynamic Tween.
Hi all,

What I'm looking to do is after you push a button the color of the background will fade/tween to a different color.

As you might allready have figured out this is not possible with with a normal linear shape tween, because what color the background will fade to, depends on what button you push.

An alternative is of course to make tweens of all the possible outcomes and change the buttons after which background you are currently on, but there HAS to be an easier way than that? And i guess that method will give me a giant .swf.

Hope there is somebody out there with the skills to give me an answer.

Thanks!

Dynamic Navigation
does anyone know a good tutorial for how to make these sorts of toolbars?

see what I am talking about - www.konyk.net

Dynamic Navigation
My web site's navigation is in Flash. Currently, I have to load a new new .swf for each section to be able to indicate to the user which page they are on by highlighting the page they are on. I would like for the .swf to be able to dynamically determine the page via the URL strings (i.e. catalog?category=guestbook) and with that information, highlight the appropraite section title. This way, I would not have to load 6 100k .swfs, but could have 1 that dynamically does the job for all pages. The site is written in ASP VB script, and I am using Flash MX.

If I were doing this in VB, I would have a series of IF/THEN loops, but I don't have a clue with Flash. Could someone stear me in the right direction?

Thanks,

Brian

Flash MX
ASP VB based site

Dynamic Navigation
Hello,

I am building a Flash banner with navigation for the top frame of my Darts web page. I understand that I can change the look of the navigation section of the Flash banner using a different scene for each instance of the navigation lay-out.

My question is this...

Can I change the look of the navigation within the Flash Banner and have the "main" frame also reflect the changes that should take place when a "button-link" is clicked?

Any input would be greatly appreciated.

Dynamic Navigation
is it feasible to make your navigation dynamic, that is, have the mouse over set a variable that then defines what comes up in the rollover and what comes up with a hit? it would be nice to just use the same button over and over and just flip one variable with the mouse over to change everything that happened below.

Dynamic Web App Navigation
Ok guys here's my rant---

I am developing an ASP.NET web application, and I am wanting to develop the navigation in FlashMX. What would be the best path to travel in order to maintain different menus for different users. I considered XML but this application is small enough where I have the flexibility to design some custom menus, which I want to. So it basically comes down to
(1) Cookies
(2) Web Services
(3) Others

btw my fellow programmer has already written the logic for users/roles in ASP.NET

Questions,comments...anything

[F8] HELP With Dynamic Navigation
I am building a dynamic navigation that almost works properly with one problem. The rollovers stop working when I want the button to perform an onRelease function.

When I attach the navigation button array it comes up fine with working rollovers. When I want to trace something with the button attached, the rollovers stop working. The function works but the rollover stops. No idea why. I tried using a movieClip button with the same result. I have tried everything I can think of with no success. Please Help


Code:
var navSpacing = 50;
var depth = 0;

navArray = ["Home", "Clients", "Projects", "Company", "Contact"];

for (i = 0; i < navArray.length; i++) {
var myNav = _root.attachMovie("navMC", "navMC" + i, depth++);
myNav._x = 50;
myNav._y = (navSpacing * i) + 170;

//DYNAMIC TEXT FOR NAVIGATION ARRAY
myNav.navTxt = navArray[i];

//THERE IS A BUTTON INSIDE navMC WITH A DYNAMIC TEXT FIELD WITH THE var NAME navTxt

//ROLLOVER WORKS IF THIS IS COMMENTED OUT
myNav.onRelease = function() {
trace("release works BUT rollover does not");
}

}

stop();

Dynamic Navigation
Hi.

I am building a navigator using code. the problem is that i cannot assign a especific number to the on release event of each button duplicated.


// on click trace message
this["thumb"+i].onRelease = function() {
trace(i);
};


example

Code:
for (i=1; i<=5; i++) {
// duplicamos los botones
duplicateMovieClip(thumb, "thumb"+i, i);
this["thumb"+i]._y = i*50;
this["thumb"+i]._x = 1;
// on click trace message
this["thumb"+i].onRelease = function() {
trace(i);
};
}
so when i click on the butttom (thumb movieclip) i get the trace message of 5 in every button.

Dynamic Xml Navigation
Hi!

I'm new at using actionscript, learning as an intern for the moment.
I'm making a flash demo for a new email tool, everything has to be dynamic. Now I'm trying to navigate using xml, but I can't figure out how to combine the working of my 'next' button and seperate buttons.
My actionscript for the footer(with navigation) is as follows:

//XML
content_xml = new XML();
content_xml.ignoreWhite = true;
content_xml.load('content.xml');
rootNode = content_xml.firstChild;


//UPDATE IMAGE
function updateImage(newImageNode) {

imagePath = currentImageNode.attributes.movieURL;


_root.maincontainer.container.inhoud.loadMovie(ima gePath);


};

//BEGINBEELD
content_xml.onLoad = function(success) {
if (success == true) {

rootNode = content_xml.firstChild;
//trace("beginbeeld "+rootNode);
//trace("lengte "+rootNode.childNodes.length);

totalImages = rootNode.childNodes.length;
firstImageNode = rootNode.firstChild;
currentImageNode = firstImageNode;

currentIndex = 1;
_root.maincontainer.container.inhoud.removeMovieCl ip();
_root.maincontainer.container.createEmptyMovieClip ("inhoud",getNextHighestDepth());
_root.maincontainer.container.inhoud.loadMovie(fir stImageNode.attributes.beginURL);
_root.maincontainer.container.inhoud.stop();
var zichtbaar:Object = new Tween(_root.maincontainer.container.inhoud, "_alpha", Strong.easeOut, 0, 100, 4, true);
_root.maincontainer.container.inhoud.gotoAndStop(1 );
//trace(rootNode.firstChild.attributes.movieURL);
}


//ACHTERGROND GLOWFILTER
import flash.filters.GlowFilter;
var rect:MovieClip = createRectangle(100, 100, 0x003366, "gradientGlowFilterExample");


var color:Number = 0x33FF66;
var alpha:Number = .8;
var blurX:Number = 35;
var blurY:Number = 35;
var strength:Number = 2;
var quality:Number = 3;
var inner:Boolean = false;
var knockout:Boolean = false;

var filter:GlowFilter = new GlowFilter(color,
alpha,
blurX,
blurY,
strength,
quality,
inner,
knockout);
var filterArray:Array = new Array();
filterArray.push(filter);

rect.filters = filterArray;
kader1_mc.filters = filterArray;
footerBG.filters = filterArray;

//KNOPPEN
var knopcontainer:MovieClip = createEmptyMovieClip("knopcontainer",getNextHighes tDepth());
function tekencirkel(){
knopcontainer.createEmptyMovieClip("cirkel", 0);
var r:Number = 12;
var x:Number = 0;
var y:Number = 25;
// constant used in calculation
var A:Number = Math.tan(22.5 * Math.PI/180);
// variables for each of 8 segments
var endx:Number;
var endy:Number;
var cx:Number;
var cy:Number;

knopcontainer.cirkel.beginFill(0xCED638, 100);
knopcontainer.cirkel.moveTo(x+r, y);
for (var angle:Number = 45; angle<=360; angle += 45) {
// endpoint
endx = r*Math.cos(angle*Math.PI/180);
endy = r*Math.sin(angle*Math.PI/180);
// control:
// (angle-90 is used to give the correct sign)
cx =endx + r* A *Math.cos((angle-90)*Math.PI/180);
cy =endy + r* A *Math.sin((angle-90)*Math.PI/180);
knopcontainer.cirkel.curveTo(cx+x, cy+y, endx+x, endy+y);
}
knopcontainer.cirkel.endFill();

};
function tekenbollen(){
spacing = 50;
tekencirkel();
i=1;
a=5;
while (i<=rootNode.childNodes.length) {
duplicateMovieClip(knopcontainer.cirkel, "cirkel"+i, a++);
knopcontainer["cirkel"+i]._x = spacing * i;
knopcontainer["cirkel"+i]["tekst"+i] = knopcontainer["cirkel"+i].createTextField("tekst"+i, getNextHighestDepth(),-5, 15,20,20);
knopcontainer["cirkel"+i]["tekst"+i].text = i;
knopcontainer["cirkel"+i].onPress = function(){
import mx.transitions.Tween;
import mx.transitions.easing.*;
_root.maincontainer.container.inhoud.removeMovieCl ip();
_root.maincontainer.container.createEmptyMovieClip ("inhoud",getNextHighestDepth());
_root.maincontainer.container.inhoud.loadMovie(cur rentImageNode.attributes.movieURL);

currentImageNode = currentImageNode.nextSibling;
break;
currentIndex++;
//updateImage(nextImageNode);

_root.maincontainer.container.inhoud.stop();
var zichtbaar:Object = new Tween(_root.maincontainer.container.inhoud, "_alpha", Strong.easeOut, 0, 100, 4, true);
_root.maincontainer.container.inhoud.gotoAndStop(1 );
}
i++;


}
removeMovieClip("knopcontainer.cirkel");
//knopcontainer.cirkel._alpha = 0;
};

tekenbollen();

//RECHTHOEK TEKENEN
knopcontainer.createEmptyMovieClip("rechthoek", 2);
knopcontainer.rechthoek.beginFill(0xCED638, 100);
knopcontainer.rechthoek.moveTo(650, 10);
knopcontainer.rechthoek.lineTo(720, 10);
knopcontainer.rechthoek.lineTo(720, 40);
knopcontainer.rechthoek.lineTo(650, 40);
knopcontainer.rechthoek.endFill();
knopcontainer.rechthoek.rechthoektekst = knopcontainer.rechthoek.createTextField("rechthoek tekst", getNextHighestDepth(),650,15,50,20);
knopcontainer.rechthoek.rechthoektekst.text = "Volgende";


/*
//Navigatie
import mx.transitions.Tween;
import mx.transitions.easing.*;
cirkel.onPress = function(){
_root.maincontainer.container.inhoud.removeMovieCl ip();
_root.maincontainer.container.createEmptyMovieClip ("inhoud",getNextHighestDepth());
//_root.maincontainer.container.inhoud.loadMovie(fir stImageNode.attributes.movieURL);
currentImageNode = firstImageNode;
nextImageNode = currentImageNode.nextSibling;
updateImage(nextImageNode);
currentIndex++;
_root.maincontainer.container.inhoud.stop();
var zichtbaar:Object = new Tween(_root.maincontainer.container.inhoud, "_alpha", Strong.easeOut, 0, 100, 4, true);
_root.maincontainer.container.inhoud.gotoAndStop(1 );
cirkel.enabled = false;
cirkel1.enabled = true;
cirkel2.enabled = true;
}
cirkel1.onPress = function(){
_root.maincontainer.container.inhoud.removeMovieCl ip();
_root.maincontainer.container.createEmptyMovieClip ("inhoud",getNextHighestDepth());
//_root.maincontainer.container.inhoud.loadMovie(fir stImageNode.nextSibling.attributes.movieURL);
currentImageNode = firstImageNode.nextSibling;
nextImageNode = currentImageNode.nextSibling;
updateImage(nextImageNode);
currentIndex++;
_root.maincontainer.container.inhoud.stop();
var zichtbaar:Object = new Tween(_root.maincontainer.container.inhoud, "_alpha", Strong.easeOut, 0, 100, 4, true);
_root.maincontainer.container.inhoud.gotoAndStop(1 );
cirkel1.enabled = false;
cirkel.enabled = true;
cirkel2.enabled = true;
}
cirkel2.onPress = function(){
_root.maincontainer.container.inhoud.removeMovieCl ip();
_root.maincontainer.container.createEmptyMovieClip ("inhoud",getNextHighestDepth());
//_root.maincontainer.container.inhoud.loadMovie(fir stImageNode.nextSibling.nextSibling.attributes.mov ieURL);
currentImageNode = firstImageNode.nextSibling.nextSibling;
nextImageNode = currentImageNode.nextSibling;
updateImage(nextImageNode);
currentIndex++;
_root.maincontainer.container.inhoud.stop();
var zichtbaar:Object = new Tween(_root.maincontainer.container.inhoud, "_alpha", Strong.easeOut, 0, 100, 4, true);
_root.maincontainer.container.inhoud.gotoAndStop(1 );
cirkel2.enabled = false;
cirkel.enabled = true;
cirkel1.enabled = true;
}

*/


//KNOP VOLGENDE
knopcontainer.rechthoek.onPress = function() {
nextImageNode = currentImageNode.nextSibling;
if (nextImageNode == null) {
_root.maincontainer.container.inhoud.removeMovieCl ip();
_root.maincontainer.container.createEmptyMovieClip ("inhoud",getNextHighestDepth());
trace("einde");
break;
}
else {
_root.maincontainer.container.inhoud.removeMovieCl ip();
_root.maincontainer.container.createEmptyMovieClip ("inhoud",getNextHighestDepth());
currentIndex++;
currentImageNode = currentImageNode.nextSibling;
updateImage(currentImageNode);

//currentImageNode = nextImageNode;
_root.maincontainer.container.inhoud.stop();
var zichtbaar:Object = new Tween(_root.maincontainer.container.inhoud, "_alpha", Strong.easeOut, 0, 100, 4, true);
_root.maincontainer.container.inhoud.gotoAndStop(1 );

}
}
}

My XML file as follows (just for now):

<?xml version="1.0" encoding="iso-8859-1"?>
<deel1>
<deel1sub movieURL='dynamischMasker2.swf' beginURL='createbusiness.jpg' />
<deel1sub movieURL='screenshot_full.jpg' />
<deel1sub movieURL='testvierkant.swf' />

</deel1>


It would be great if anyone could offer me some help with this.
Thanx in advance,
Grtz!
Peter

Help With Dynamic Xml Navigation Plz?
H!
If anyone has the time, would you please help me out with this. I've been looking all over. I'm creating a dynamic flash demo, but I can't get the navigation working like it should. I included my fla files.
It would be great if someone knew the answer to this problem, 'cause I'm quite stuck right now.


Grtz!
Peter

Dynamic Navigation...
Hi all,

I need to create a dynamic navigation pulled from a xml file,
What would be the best way of creating it? I was going to use mc's and addchild's to add all the nav's with a for loop, but would that cause problems when it comes to instances?

Dynamic Navigation
Hey guys...I am wondering if any of y'all have a tutorial on how to create Flash navigation that can be updated by an XML file? I have attached an example of what I would like the navigation to look like.

Thanks in advance for the help!!

Dynamic Navigation?...
so i am working on some buttons that are arranged in a vertical group. When you click on one it expands pushing the others away, and collapsing when clicked again bringing them back together.

I thinking it would be easiest to make each button how i want it, then have some code that keeps each button x pixels away from each other...make sense?

how would i go about the code to make this happen?

Dynamic Frame Navigation
http://www.dsvc.org/rough/index.html

Here is an example of what I'm trying to learn how to do. I understand the basic principle behind frames, but I don't know how to label a specific frame. Once this is done is it just a matter of making the target on a button the name of the specific frames?

Ps. I'm using MX not Flash 5

Dynamic Content Navigation
I have multiple dynamic text fields, and I wish to change the content of them to a different file, to a specific text field and keep all of the others the way they are when they click one of the buttons. How do I go about doing this?

Using Dynamic Text For Navigation
hi,

i've created a dynamic text box, and i would like to be able to click on certain words inside of it to jump to a different frame in my .swf.

i'm able to link to another html document (i highlight the word, go to the property inspector, and type in the URL in the link field), but what if i want the link to take me to a different frame in my .swf?

i thought about placing an invisible button behind the words, but that doesn't work because my text box scrolls.

any idears?

Dynamic Navigation Positioning
Hi all,
I need some help.
I've setup a loop which runs and attaches buttons for a horizontal navigation, the button text is dynamic so the width of the button varies. I am checking the width of the text box and using this value to set the width of the button. This is all fine, the problem is with the positioning of the buttons. I don't want them to be equally spaced using something like xPos = i *50;

If button 01 is 50 wide and button 02 is 30 wide then button 02 would need to be positioned at 50 so it follows on from button 01. Then the 3rd button would be at 50+30 and so on. Hope this makes sense, it's a bit tricky to explain.

Here's my code

PHP Code:



for (i=0; i<clientInfo.length; i++) {         
clientId = clientInfo[i][0];         
clientName = clientInfo[i][1];         
clientButtons = attachMovie("client_button", clientId, i+20);
clientButtons.clientTxt.text = clientName;         
//Scale the button's width         
clientButtons.clientTxt.autoSize = "left";         
buttonXsize = clientButtons.clientTxt._width;
clientButtons.clientButtonHit._width = buttonXsize;         
//Position the buttons         
clientButtons._y = 150;
// this next bit is where i need help         
clientButtons._x = 150*i;     
}
}




Any help much appreciated
Thanks

Dynamic Horizontal Navigation
I am working on a big project and am starting with part 1: a dynamic horizontal navigation menu. I think I have a good start, but can't figure out why this isn't working. Here is the xml file:

code:

<?xml version="1.0" encoding="ISO-8859-1"?>

<Links>

<Link LinkName = "reservations" />

<Link LinkName = "cruises" />

<Link LinkName = "destinations" />

<Link LinkName = "specialty" />

<Link LinkName = "learn about travel" />

</Links>



And here is the Actionscript:

code:

var numOfItems:Number;
var home:MovieClip = this;
var space:Number = 10;

var xml:XML = new XML();
xml.ignoreWhite = true;

xml.onLoad = function() {
var nodes:Array = this.firstChild.childNodes;
numOfItems = nodes.length;
for (var i = 0; i < numOfItems; i++) {
var t = home.attachMovie("movLink","movLink" + i, i+1);
var lastmc = home["movLink" + (i-1)];
t.LinkText.text = nodes[i].attributes.LinkName;
t.LinkText.autoSize = true;
//set the x position of each link
if (i == 0) {
t._x = 20;
}
else {
t._x = space + lastmc._x + lastmc._width;
}
t._y = 330;
}
}

xml.load("Links.xml");




Any insights would be awesome!!!!!!! I am totally stuck!

Dynamic Navigation Positioning
Hi all,

I need some help, it's pretty urgent. I don't normally state that but this time it really is

I've setup a loop which runs and attaches buttons for a horizontal navigation, the button text is dynamic so the width of the button varies. I am checking the width of the text box and using this value to set the width of the button. This is all fine, the problem is with the positioning of the buttons. I don't want them to be equally spaced using something like xPos = i *50;

If button 01 is 50 wide and button 02 is 30 wide then button 02 would need to be positioned at 50 so it follows on from button 01. Then the 3rd button would be at 50+30 and so on. Hope this makes sense, it's a bit tricky to explain.

Here's my code


ActionScript Code:
for (i=0; i<clientInfo.length; i++) {
        clientId = clientInfo[i][0];
        clientName = clientInfo[i][1];
        clientButtons = attachMovie("client_button", clientId, i+20);
        clientButtons.clientTxt.text = clientName;
        //Scale the button's width
        clientButtons.clientTxt.autoSize = "left";
        buttonXsize = clientButtons.clientTxt._width;
        clientButtons.clientButtonHit._width = buttonXsize;
        //Position the buttons
        clientButtons._y = 150;
// this next bit is where i need help
        clientButtons._x = 150*i;
    }
}

Any help very much appreciated.
Thanks

Dynamic Navigation Bar From OReilly
I´m trying to follow Oreilly Actionscript 3.0 and the example of building a Dynamic Navigation bar.
But this example doesn´t work. What could probably be wrong?

I´m only see one button on stage. It should be 5 buttons in a navigation bar.
I´ve created a btn (name= btn) in library and export for actionscript.

Cut and paste from Oreilly:

var btnNum:int = 5;
var spacing:Number = 10;

var navBar:Sprite = new Sprite();
addChild(navBar);

var btn:SimpleButton;
for (var i:uint = 0; i <btnNum; i++) {
btn = new Btn();
btn.name = "button" + i;
btn.x = spacing + i * (btn.width + spacing);
btn.y += 5;
btn.addEventListener(MouseEvent.CLICK, onTraceName, false, 0,
true);
navBar.addChild(btn);
}

var bg:MovieClip = new NavBarBack();
bg.width = btnNum * (btn.width + spacing);
bg.width += spacing;
navBar.addChildAt(bg, 0);

navBar.x = (navBar.stage.stageWidth - navBar.width)/2;
navBar.y = 20;

function onTraceName(evt:MouseEvent):void {
trace(evt.target.name);
}

Anyone?

Dynamic Fading Navigation
Hey all, I'm new to this forum(Great forum) btw, and i hope someone can help with this lil problem. I have a menu dynamically generated and i can get it to fade in. The thing is, is that i want each mc to fade in one after the other instead of all at once. This is my code so far. Does anyone know how to get it so each mc will fade in one by one??


Code:


this.stop();
links = new Array()
links[0] = ["Home"]
links[1] = ["Events"]
links[2] = ["Gallery"]
links[3] = ["List"]
links[4] = ["Contact"]

var len = links.length
var posx = Stage.width/2
var posy = 0
var spacing = 26;

for(var i = 0; i< len; i++){
this.attachMovie("clip","clip" + i, i)
this["clip" + i]._alpha = 0
}

for(var j=0; j<len; j++){
this["clip" + j]._x = posx;
this["clip" + j]._y = posy
if(j%2 == 0){
this["clip" + j].gotoAndPlay("normal")
}
else{
this["clip" + j].gotoAndPlay("flip")
}
posy += spacing;
}

//This is where the fading starts

var fadespeed = 6
this.onEnterFrame=function()
{
for(var j=0; j<len; j++){
this["clip" +j]._alpha+=fadespeed;
}
}

Dynamic Navigation Problem
Yo!

Im trying to make a dynamic nav that works like such: http://www.safarisuit.co.uk/kriscook...ynamic_nav.swf

as you can see its working fine until the first click, after you have clicked and the nav has moved around it all messes up.

i know the reason for this though, the way i move the clips to the right of the one you hover over is i take the total menu items, subtract the current id, and then subtract 1. this messes up as soon as youve clicked as the id's are in different places.

here is the code, sorry about the mess its deisgner code! alternativley the file is here: http://www.safarisuit.co.uk/kriscook...ynamic_nav.fla (saved in mx2004, ive used lmc_tween.as which can be downloaded here: http://www.safarisuit.co.uk/kriscook...ipTween120.mxp)

all code inside is in the root on the 1st 2 layers


Code:


var navItems:Number = 7;
//width of selected movie clip (including gap)
var menuItemSelected:Number = 150;
//width of unselected movie clip (including gap)
var menuItemUnSelected:Number = 70;
var menuGap:Number = 2;
//id for rollovers
var theId:Number = 0;
//++++++++++++++++++++++++++
//
// create nav
//
//++++++++++++++++++++++++++
for (i=0; i<navItems; i++) {
nav_mc.nav0_mc.duplicateMovieClip('navD'+i+'_mc', i);
nav_mc.nav0_mc._visible = false;
var navMc = nav_mc['navD'+i+'_mc'];
navMc.bg_mc._width = menuItemUnSelected-menuGap;
navMc._x = menuItemUnSelected*i+(menuItemSelected-menuItemUnSelected);
navMc.wrd_txt.autoSize = true;
navMc.wrd_txt.text = '00'+i;
//
// onRollOver
//
navMc.h_btn.id = i;
navMc.h_btn.onRollOver = function() {
navRollOver(this.id);
};
navMc.h_btn.onRollOut = function() {
navRollOut(this.id);
};
navMc.h_btn.onRelease = function() {
//change selection
selectBtn.bg_mc.tween('_width', menuItemUnSelected-menuGap, .5, 'easeOutExpo');
selectBtn = this._parent;
this.enabled = false;
this.useHandCursor = false;
//call move function
moveClips(this.id);
};
}
//++++++++++++
//
// selekta
//
//++++++++++++
var selectBtn:MovieClip = nav_mc.navD0_mc;
nav_mc.navD0_mc._x = 0;
nav_mc.navD0_mc.h_btn.enabled = 0;
nav_mc.navD0_mc.bg_mc._width = menuItemSelected-menuGap;
//++++++++++++
//
// navRollOut
//
//++++++++++++

function navRollOver(buttonId) {
nav_mc['navD'+buttonId+'_mc'].bg_mc.tween('_width', menuItemSelected-menuGap, .5, 'easeOutExpo');
// work out RHS of selected:
var rhsClips:Array = new Array();
var rhsAmount:Number = navItems-buttonId-1;
for (i=0; i<rhsAmount; i++) {
var j = i+buttonId+1;
rhsClips.push(nav_mc['navD'+j+'_mc']);
trace("rhsClips: "+rhsClips);
var lhsAmount = navItems-rhsAmount-2;
//trace('lhsAmount: '+lhsAmount);
rhsClips[i].tween('_x', menuItemSelected*2+menuItemUnSelected*lhsAmount+menuItemUnSelected*i, .5, 'easeOutExpo');
}
}
function navRollOut(buttonId) {
nav_mc['navD'+buttonId+'_mc'].bg_mc.tween('_width', menuItemUnSelected-menuGap, .5, 'easeOutExpo');
//RHS of selected:
var rhsClips:Array = new Array();
var rhsAmount:Number = navItems-buttonId-1;
for (i=0; i<rhsAmount; i++) {
var j = i+buttonId+1;
rhsClips.push(nav_mc['navD'+j+'_mc']);
rhsClips[i].stopTween();
var lhsAmount = navItems-rhsAmount-1;
rhsClips[i].tween('_x', menuItemSelected+menuItemUnSelected*lhsAmount+menuItemUnSelected*i, .5, 'easeOutExpo');
}
}
//++++++++++++++++++++++++++
//
// move menu
//
//++++++++++++++++++++++++++
function moveClips(selectedId) {
//disable navigation
for (i=0; i<navItems; i++) {
nav_mc['navD'+i+'_mc'].h_btn.enabled = false;
}
//set vars
var selekta = nav_mc['navD'+selectedId+'_mc'];
var rhsClips:Array = new Array();
var rhsAmount:Number = navItems-selectedId-1;
for (i=0; i<rhsAmount; i++) {
var j = i+selectedId+1;
rhsClips.push(nav_mc['navD'+j+'_mc']);
rhsClips[i].stopTween();
var lhsAmount = navItems-rhsAmount-1;
rhsClips[i].tween('_x', menuItemSelected+menuItemUnSelected*i, .5, 'easeOutExpo');
}
//LHS of selected:
var lhsClips:Array = new Array();
var lhsAmount:Number = selectedId;
for (i=0; i<lhsAmount; i++) {
lhsClips.push(nav_mc['navD'+i+'_mc']);
lhsClips[i].stopTween();
lhsClips[i]._x = Stage.width;
lhsClips[i].tween('_x', menuItemSelected+menuItemUnSelected*rhsAmount+menuItemUnSelected*i, 1, 'easeOutExpo', .1*i+.5, enableNav);
}
//clicked menu item
selekta.stopTween();
selekta.tween('_x', 0, .3, 'easeOutExpo');
}
function enableNav() {
for (i=0; i<navItems; i++) {
nav_mc['navD'+i+'_mc'].h_btn.enabled = true;
nav_mc['navD'+i+'_mc'].h_btn.useHandCursor = true;
}
selectBtn.h_btn.useHandCursor = false;
selectBtn.h_btn.enabled = false;
}
if this makes any sense and you have any input thanks!!

Dynamic Fading Navigation
Hey all, I'm new to this forum(Great forum) btw, and i hope someone can help with this lil problem. I have a menu dynamically generated and i can get it to fade in. The thing is, is that i want each mc to fade in one after the other instead of all at once. This is my code so far. Does anyone know how to get it so each mc will fade in one by one??


Code:


this.stop();
links = new Array()
links[0] = ["Home"]
links[1] = ["Events"]
links[2] = ["Gallery"]
links[3] = ["List"]
links[4] = ["Contact"]

var len = links.length
var posx = Stage.width/2
var posy = 0
var spacing = 26;

for(var i = 0; i< len; i++){
this.attachMovie("clip","clip" + i, i)
this["clip" + i]._alpha = 0
}

for(var j=0; j<len; j++){
this["clip" + j]._x = posx;
this["clip" + j]._y = posy
if(j%2 == 0){
this["clip" + j].gotoAndPlay("normal")
}
else{
this["clip" + j].gotoAndPlay("flip")
}
posy += spacing;
}

//This is where the fading starts

var fadespeed = 6
this.onEnterFrame=function()
{
for(var j=0; j<len; j++){
this["clip" +j]._alpha+=fadespeed;
}
}

Dynamic Horizontal Navigation
hi there,

I have some problems creating a dynamic horizontal navigation.
no problems building it but when it comes to size of the buttons I'm facing real problems...

how can I create buttons (MCs) in different sizes (xscale) and ajust the size of the sensitive area to it...
like "HOME" "ACCESSORIES" "TOOLS" I dont want to have a unique size for the buttons ... they should be adapted to the length of the text... is that passible?

tnx for your help

pero

Dynamic Generation Of Navigation Menu
Hello everyone!

I'm having problems with dynamic generation of navigation menu. It just won't work the way it should and i believe it is my fault.

Could someone please take a look at the code at http://www2.arnes.si/~ljmks2/buttons.zip and give me a solution?

Everything should work "perfect" but for some reason some buttons are not generated,...

Thank you!

Lenart

[F8] Dynamic URL Links In A Flash Navigation Bar?
Hello all, I'm new here... and haven't done any Flash work beyond simple animations.

I found a template & hacked it to make my sliding menu. Good! BUT... now I'd like to have the buttons' URLs dynamicallly generated according to the URL of the page they're on.

I hope that makes sense. Basically, if the page is "whatever.aspx?username=tom" (somethign like that) then the link inside Flash (let's say "site.com/user?=") needs to grab the username and include it (something like "site.com/user?=tom").

A million thanks to any links or help that can be provided!!!

Dynamic Flash Demo Navigation Help
H!
If anyone has the time, would you please help me out with this. I've been looking all over. I'm creating a dynamic flash demo, but I can't get the navigation working like it should. I'll show you what I mean. This is my footer actionscript wich contains the navigation part:

ActionScript Code:
//XML
content_xml = new XML();
content_xml.ignoreWhite = true;
content_xml.load('content.xml');
rootNode = content_xml.firstChild;


//UPDATE IMAGE
function updateImage(newImageNode) {
//trace(currentIndex);
imagePath = currentImageNode.attributes.movieURL;
//if (currentIndex > rootNode.childNodes.length){
//  currentIndex = 0;
//  imagePath = firstImageNode.attributes.movieURL;}

trace(currentIndex);
trace(i);
_root.maincontainer.container.inhoud.loadMovie(imagePath);
if (i = 1){
    imagePath = firstImageNode.attributes.movieURL;
}
else if (i = 2){
    imagePath = firstImageNode.nextSibling.attributes.movieURL;
}
else if (i = 3){
    imagePath = firstImageNode.nextSibling.nextSibling.attributes.movieURL;
}
};


//BEGINBEELD
content_xml.onLoad = function(success) {
    if (success == true) {
       
        rootNode = content_xml.firstChild;
        //trace("beginbeeld "+rootNode);
        //trace("lengte "+rootNode.childNodes.length);
   
        totalImages = rootNode.childNodes.length;
        firstImageNode = rootNode.firstChild;
        currentImageNode = firstImageNode;
   
        currentIndex = 0;
        _root.maincontainer.container.inhoud.removeMovieClip();
        _root.maincontainer.container.createEmptyMovieClip("inhoud",getNextHighestDepth());
        _root.maincontainer.container.inhoud.loadMovie(firstImageNode.attributes.beginURL);
        _root.maincontainer.container.inhoud.stop();
        var zichtbaar:Object = new Tween(_root.maincontainer.container.inhoud, "_alpha", Strong.easeOut, 0, 100, 4, true);
        _root.maincontainer.container.inhoud.gotoAndStop(1);
        //trace(rootNode.firstChild.attributes.movieURL);
    }


//ACHTERGROND GLOWFILTER
import flash.filters.GlowFilter;
var rect:MovieClip = createRectangle(100, 100, 0x003366, "gradientGlowFilterExample");


var color:Number = 0x33FF66;
var alpha:Number = .8;
var blurX:Number = 35;
var blurY:Number = 35;
var strength:Number = 2;
var quality:Number = 3;
var inner:Boolean = false;
var knockout:Boolean = false;

var filter:GlowFilter = new GlowFilter(color,
                                        alpha,
                                        blurX,
                                        blurY,
                                        strength,
                                        quality,
                                        inner,
                                        knockout);
var filterArray:Array = new Array();
filterArray.push(filter);

rect.filters = filterArray;
kader1_mc.filters = filterArray;
footerBG.filters = filterArray;

//KNOPPEN
var knopcontainer:MovieClip = createEmptyMovieClip("knopcontainer",getNextHighestDepth());
function tekencirkel(){
    knopcontainer.createEmptyMovieClip("cirkel", 0);
        var r:Number = 12;
        var x:Number = 0;
        var y:Number = 25;
        // constant used in calculation
        var A:Number = Math.tan(22.5 * Math.PI/180);
        // variables for each of 8 segments
        var endx:Number;
        var endy:Number;
        var cx:Number;
        var cy:Number;
       
        knopcontainer.cirkel.beginFill(0xCED638, 100);
        knopcontainer.cirkel.moveTo(x+r, y);
        for (var angle:Number = 45; angle<=360; angle += 45) {
           // endpoint
           endx = r*Math.cos(angle*Math.PI/180);
           endy = r*Math.sin(angle*Math.PI/180);
           // control:
           // (angle-90 is used to give the correct sign)
           cx =endx + r* A *Math.cos((angle-90)*Math.PI/180);
           cy =endy + r* A *Math.sin((angle-90)*Math.PI/180);
           knopcontainer.cirkel.curveTo(cx+x, cy+y, endx+x, endy+y);
        }
        knopcontainer.cirkel.endFill();
       
};
function tekenbollen(){
    spacing = 50;
    tekencirkel();
    i=1;
    a=5;
    while (i<=rootNode.childNodes.length) {
        duplicateMovieClip(knopcontainer.cirkel, "cirkel"+i, a++);
        knopcontainer["cirkel"+i]._x = spacing * i;
        knopcontainer["cirkel"+i]["tekst"+i] = knopcontainer["cirkel"+i].createTextField("tekst"+i, getNextHighestDepth(),-5, 15,20,20);
        knopcontainer["cirkel"+i]["tekst"+i].text = i;
        knopcontainer["cirkel"+i].onPress = function(){
            import mx.transitions.Tween;
            import mx.transitions.easing.*;
            _root.maincontainer.container.inhoud.removeMovieClip();
            _root.maincontainer.container.createEmptyMovieClip("inhoud",getNextHighestDepth());
            //_root.maincontainer.container.inhoud.loadMovie(currentImageNode.attributes.movieURL);
           
            currentImageNode = currentImageNode.nextSibling;
           
            currentIndex++;
            updateImage(currentImageNode);
           
            _root.maincontainer.container.inhoud.stop();
            var zichtbaar:Object = new Tween(_root.maincontainer.container.inhoud, "_alpha", Strong.easeOut, 0, 100, 4, true);
            _root.maincontainer.container.inhoud.gotoAndStop(1);
            //trace(currentIndex);
        }
        i++;
       
       
    }
    removeMovieClip("knopcontainer.cirkel");
    //knopcontainer.cirkel._alpha = 0;
};

tekenbollen();

//RECHTHOEK TEKENEN
knopcontainer.createEmptyMovieClip("rechthoek", 2);
knopcontainer.rechthoek.beginFill(0xCED638, 100);
knopcontainer.rechthoek.moveTo(650, 10);
knopcontainer.rechthoek.lineTo(720, 10);
knopcontainer.rechthoek.lineTo(720, 40);
knopcontainer.rechthoek.lineTo(650, 40);
knopcontainer.rechthoek.endFill();
knopcontainer.rechthoek.rechthoektekst = knopcontainer.rechthoek.createTextField("rechthoektekst", getNextHighestDepth(),650,15,50,20);
knopcontainer.rechthoek.rechthoektekst.text = "Volgende";


/*
//Navigatie
import mx.transitions.Tween;
import mx.transitions.easing.*;
cirkel.onPress = function(){
    _root.maincontainer.container.inhoud.removeMovieClip();
    _root.maincontainer.container.createEmptyMovieClip("inhoud",getNextHighestDepth());
    //_root.maincontainer.container.inhoud.loadMovie(firstImageNode.attributes.movieURL);
    currentImageNode = firstImageNode;
    nextImageNode = currentImageNode.nextSibling;
    updateImage(nextImageNode);
    currentIndex++;
    _root.maincontainer.container.inhoud.stop();
    var zichtbaar:Object = new Tween(_root.maincontainer.container.inhoud, "_alpha", Strong.easeOut, 0, 100, 4, true);
    _root.maincontainer.container.inhoud.gotoAndStop(1);
    cirkel.enabled = false;
    cirkel1.enabled = true;
    cirkel2.enabled = true;
}
cirkel1.onPress = function(){
    _root.maincontainer.container.inhoud.removeMovieClip();
    _root.maincontainer.container.createEmptyMovieClip("inhoud",getNextHighestDepth());
    //_root.maincontainer.container.inhoud.loadMovie(firstImageNode.nextSibling.attributes.movieURL);
    currentImageNode = firstImageNode.nextSibling;
    nextImageNode = currentImageNode.nextSibling;
    updateImage(nextImageNode);
    currentIndex++;
    _root.maincontainer.container.inhoud.stop();
    var zichtbaar:Object = new Tween(_root.maincontainer.container.inhoud, "_alpha", Strong.easeOut, 0, 100, 4, true);
    _root.maincontainer.container.inhoud.gotoAndStop(1);
    cirkel1.enabled = false;
    cirkel.enabled = true;
    cirkel2.enabled = true;
}
cirkel2.onPress = function(){
    _root.maincontainer.container.inhoud.removeMovieClip();
    _root.maincontainer.container.createEmptyMovieClip("inhoud",getNextHighestDepth());
    //_root.maincontainer.container.inhoud.loadMovie(firstImageNode.nextSibling.nextSibling.attributes.movieURL);
    currentImageNode = firstImageNode.nextSibling.nextSibling;
    nextImageNode = currentImageNode.nextSibling;
    updateImage(nextImageNode);
    currentIndex++;
    _root.maincontainer.container.inhoud.stop();
    var zichtbaar:Object = new Tween(_root.maincontainer.container.inhoud, "_alpha", Strong.easeOut, 0, 100, 4, true);
    _root.maincontainer.container.inhoud.gotoAndStop(1);
    cirkel2.enabled = false;
    cirkel.enabled = true;
    cirkel1.enabled = true;
}

*/


//KNOP VOLGENDE
knopcontainer.rechthoek.onPress = function() {
    nextImageNode = currentImageNode.nextSibling;
    if (nextImageNode == null) {
        _root.maincontainer.container.inhoud.removeMovieClip();
        _root.maincontainer.container.createEmptyMovieClip("inhoud",getNextHighestDepth());
        currentImageNode = firstImageNode;
        break;
    }
    else {
        _root.maincontainer.container.inhoud.removeMovieClip();
        _root.maincontainer.container.createEmptyMovieClip("inhoud",getNextHighestDepth());
        currentIndex++;
        updateImage(currentImageNode);
       
        currentImageNode = nextImageNode;
        _root.maincontainer.container.inhoud.stop();
        var zichtbaar:Object = new Tween(_root.maincontainer.container.inhoud, "_alpha", Strong.easeOut, 0, 100, 4, true);
        _root.maincontainer.container.inhoud.gotoAndStop(1);

}
}
}
The XML for now:

Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<deel1>
<deel1sub movieURL='dynamischMasker2.swf' beginURL='createbusiness.jpg' />
<deel1sub movieURL='screenshot_full.jpg' />
<deel1sub movieURL='testvierkant.swf' />
</deel1>
It would be great if someone knew the answer to this problem, 'cause I'm quite stuck right now.


Grtz!
Peter

Coding Dynamic Navigation Correctly
Hello All,
I have a fundamental question about coding navigation. I have been using mc's as buttons forever now and generally have 3 frames inside the MC, up,down and over. Now how i normally do this is to initially set a variable to say b1hit=0; and then on that buttons release i set that variable to 1 and all others to 0 as well as set all other button MC's to to gotoAndStop(1), back to their default state. is this how everyone does their nav? are there better ways of doing it? i am curious to see what you guys think.
Thanks,
Derek rudd
playroster.com

*

Dynamic Maze With Simple AI Navigation
maze is dynamically generated from the text file,
- 1 for regular tile
- 2 for start tile
- 3 for finish tile

I used an OOP approach except i didn't bother using classes, just general MovieClip prototypes.

The AI i used simply makes the character turn in the same direction all of the time. I put an extra couple of lines in the source that allow to change which direction the character turns in.

Hope you like it
Check it:

Tutorial XML- Dynamic Navigation By Senocular
Hallo !

I have a little question on a tutorial from senocular at Kirupa.com.
Anybody watched the source code ?
My question is on the "ActionObject"-Part:
Why do I need action.message and action.newMenu ?
And another question: At the relativ beginning in the Source, there´s the command "curr_item.trackAsMenu = true". I know the definition, but why and when do I need to tell other parts my events ?

ThanX a lot for helping...

Yours, MrHonse

Help Creating A Completely Dynamic Navigation
I am working on a navigation for a page that consists of an image container, a text block, and a navigation. I have all the content in an xml file that is loaded and parsed placing each part of the site in its respectable spot. My question is I need to have the data for this site change when a button in the nav is pressed, so that the image and desc content is passed that corresponds to its button. this is in flash 8, as 2.0.


Code:
//import xml
var x:XML = new XML();
x.load("group.xml");
x.ignoreWhite = true;
//load in xml
x.onLoad = function(success) {
if (success) {
//
/*trace(x.firstChild.childNodes[0].attributes.moniker);
trace(x.firstChild.childNodes[0].attributes.image);
trace(x.firstChild.childNodes[0].attributes.desc);*/
//
var names:Array = new Array();
var picts:Array = new Array();
var desc:Array = new Array();
var ourContent:Array = x.firstChild.childNodes;
var nav:Array = new Array();
//
yPos = 40;
for (var i:Number = 0; i < ourContent.length; i++) {
//push the content
names.push(ourContent[i].attributes.moniker);
picts.push(ourContent[i].attributes.images);
desc.push(ourContent[i].attributes.desc);
//load onto the stage
descBlock.text = desc[0];
faceContainer.loadMovie(picts[0], 0);
nav = attachMovie('navNames', 'navButton' + i, i, {_x:70, _y:yPos});
nav.menuText.text = names[i];
yPos = nav._y + 20;
//
nav.onRelease = function() {
descBlock.text = desc[i];
faceContainer.loadMovie(picts[i], i);
};
}
} else {
trace("error loading xml");
}
};

//
import mx.transitions.Tween;
import mx.transitions.easing.*;
//
new mx.transitions.Tween(theGroup, "_x", mx.transitions.easing.Strong.easeOut, 327.5, 20, 30, false);
new mx.transitions.Tween(theGroup, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 30, false);
///
thanks in advance

Dynamic Maze With Simple AI Navigation
maze is dynamically generated from the text file,
- 1 for regular tile
- 2 for start tile
- 3 for finish tile

I used an OOP approach except i didn't bother using classes, just general MovieClip prototypes.

The AI i used simply makes the character turn in the same direction all of the time. I put an extra couple of lines in the source that allow to change which direction the character turns in.

Hope you like it
Check it:

Looking For Tutorial On Flash Dynamic Navigation
Hello,

I'm building a tutorial with several chapters.  Each chapter is its own swf.  I'm looking for a tutorial to build the navigation so that it works dynamically rather than hard code where to go, and what to do.  The navigation swf will be in its own level.

Any ideas????

Thanks a lot.

Dynamic Flash Tree Navigation?
Anybody know how to do something like this and it will still have inertia and move smoothly?

Dynamic Visual Navigation Component Devel
Hi,

I am looking for someone you can build a dynamic visual navigation component in Flash. The input to the component will be a XML file. The XML file will contain a hierarchy of categories, example the tree of Yahoo's Web Site Directory. The Flash component will read the input file and create a dynamic visual display of the categories, so one can navigate the menu options of the directory through visual icons vs text links.

Make sense? Will pay, more info contact: mnarula@yahoo.com

Thanks!

I Am Looking To Create A Dynamic XML Driven Navigation Menu
Hey everyone,

Ok so here's the story thus far. I am looking to create a navigation menu that is generated dynamically using actionscript and xml. I want the user to be able to click on a button and have more buttons (the child nodes) spawn off of the parent node. It is similar to http://giantoctopus.com created by Joshua Davis.

So far I can generate the number of nav buttons through the number of child nodes in my XML document. I have also been able to turn each node into a button, but when you click on each button, the output is the same:


------------
XML LOADED
------------
Number of nodes = 3
Node #3 = guestbook
Node #3 = guestbook
Node #3 = guestbook

What I want is to display:


------------
XML LOADED
------------
Number of nodes = 3
Node #1 = guestbook
Node #2 = portfolio
Node #3 = news

after you click on each individual button.

Here is a snippet of the code:


PHP Code:



// init function to generate nodes
// *******************************
function generateNodes(success){
    if(success){
        trace("---------- 
XML LOADED 
----------");
        
        rootNode = nav_xml.firstChild;
        firstCatNode = rootNode.firstChild;
        currentIndex = 1;
        totalCategories = rootNode.childNodes.length;
        numNodes = totalCategories;

        //updateCategory(firstCatNode);
        damp = .970;
        k = .001;
    
        nodez = []; // create an empty array
        nodeID = [];
        trace("Number of nodes = " + numNodes);
        //trace("Number of child nodes = " + childNodes);
        for(i=0; i<numNodes; i++){
            node = attachMovie("node", "n" + i, i);
            nodez[i] = node;
//**********************************************
//THIS IS WHERE I AM STUCK, I KNOW I NEED TO USE A FOR LOOP, BUT DOESNT WORK

            for(a=0; a<numNodes; a++){
                var name = firstCatNode.attributes.id; 
                nodeID[a] = name;
                //var newName = firstCatNode.attributes.id;
                node.onRelease = function(){
                    trace("Node #" + a + " = " + name);
                    //trace(newName);
                }
            } 





Any help is greatly appreciated, and hopefully this is not too confusing to understand.

Thanks in advance

designorganic

Dynamic Tweening Navigation System. Where To Start?
Hey!

I'm looking for a little help - I'm trying to do a navigation like the one at

http://www.podlob.com/ - #53

Anyone know of a good tutorial to read to get me off on the right foot? or an fla to disect?

Thanks in advance

--
AE

Dynamic Numbers Display For Page Navigation
Dear All,

We are developing a dynamic image slide show which display images dynamically from XML data. We need display the numbers like (1 2 3 4 5 ) from the xml file as per the number of records for images with hyperlinks to their corresponding images. (We also need to display 10 numbers at a time )

Please help us how to solve this task.

Thanks in advance.

Regards

Krishhhhhhhhhhhh

Copyright © 2005-08 www.BigResource.com, All rights reserved