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!
FlashKit > Flash Help > Flash ActionScript
Posted on: 05-07-2007, 10:37 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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
[F8] Horizontal Tab Navigation
Hi!
I'm working on a flash site that has a horizontal 'tab' style nav.
Basically all i want to do is have it so that when you click on one link, a new tab fades in and the old one fades out. E.g, there's a tab on 'home' and you click on 'about'. I want the home tab to fade out (or whatever) and the about tab to fade in.. at the same time.
The only way i can think to do this is to animate every possible route through the navigation.. but this takes too long and i'm sure there must be a way to do it through Actionscript... i just can't think how.
Would really appreciate any help or a point in the right direction.
Many thanks.
HELP Horizontal Navigation
I'm having problems to work, must make a horizontal navigation and the like for this site: http://terradonoel.terra.com.br
Screen with 100% width, with some points to move the movieclip with the mouse.
I made this code to divide the movieclip in percentage, I do not know if this right:
--------------------------------------------------------------------------------
Stage.align = "TL";
Stage.scaleMode = "noScale";
main.onRollOver = quadro;
function quadro() {
this.onEnterFrame = scroll_main;
delete this.onRollOver;
}
function scroll_main() {
if (main._xmouse>Stage.width*0.01 && _xmouse<Stage.width*0.20) {
main._x = 0;
}
if (main._xmouse>Stage.width*0.21 && _xmouse<Stage.width*0.79) {
}
if (main._xmouse>Stage.width*0.80 && _xmouse<Stage.width*0.99) {
main._x = Stage.width-main._width;
}
}
--------------------------------------------------------------------------------
The bigger problem is that I am not able to insert the action of movement in certain areas, one would help, because i am not a flash programmer.
This movement would have to be smooth, the more the mouse to the sides was the speed increase. When I was in the area of 20% to 80% the film was stopped.
Other details include a horizontal bar would be 100% this movieclip, where the user could navigate with the mouse or the bar!
Please help me!
Thank you very much!
Horizontal Navigation Help..
am trying to create a horizontal navigation that is going to have 9 links, I want the navigation to slied left or right depending on where the btn is locator
I have the x postion or where I want all the button to be but i cant make it slide to the side
something like this:
http://www.nsaa.ns.ca/main.html
I can create a function, something like this to tell all the btns in my nav whero to position them self bue this will make them jump to position and not slide.
nav1_mcRelease = function ()
{
nav1_mc.animate(1, 0, 6);
nav2_mc.animate(529, 0, 6);
nav3_mc.animate(546, 0, 6);
nav4_mc.animate(563, 0, 6);
nav5_mc.animate(580, 0, 6);
nav6_mc.animate(597, 0, 6);
nav7_mc.animate(614, 0, 6);
selectedNavNumber = 1;
handleNavSelect();
};
any ideas..??
Horizontal Navigation Help..
am trying to create a horizontal navigation that is going to have 9 links, I want the navigation to slied left or right depending on where the btn is locator
I have the x postion or where I want all the button to be but i cant make it slide to the side
something like this:
http://www.nsaa.ns.ca/main.html
I can create a function, something like this to tell all the btns in my nav whero to position them self bue this will make them jump to position and not slide.
nav1_mcRelease = function ()
{
nav1_mc.animate(1, 0, 6);
nav2_mc.animate(529, 0, 6);
nav3_mc.animate(546, 0, 6);
nav4_mc.animate(563, 0, 6);
nav5_mc.animate(580, 0, 6);
nav6_mc.animate(597, 0, 6);
nav7_mc.animate(614, 0, 6);
selectedNavNumber = 1;
handleNavSelect();
};
any ideas..??
Horizontal Navigation Scroller
Does anyone know how to create a navigation system like the one at http://www.motown.com/classicmotown/frameset_2.html or http://www.badboyonline.com. If not are there any movies at flashkit that would help me with this concept.
Any help would be much appreciated.
Many Thanks
Horizontal Scrolling Navigation....
Hi!
I was just wondering if there's any website where I could get such horizontal scrolling Navigation with images moving when u click on 2 buttons on left or right and when the image comes in the centre it becomes bigger...
http://www.efactormedia.com/
Thank You
Dhaval Desai
Horizontal Navigation Scroll
Hello, I am creating a flash navigation and I need to know how to make a horizontal scroll. You can view it at http://www.csn-os.com/nav/nav.html I want it so that when the visitor clicks on the arrow it goes in that direction and new links appear and they are able to go back and forward to click on the link they want to go to. Please help I would greatly appreciate if someone would tell me exactly what to do here.
(I would also like to know how to make a linear gradient on both sides of the bar so it looks like the links are fading in from the sides if you know what i mean. but i cant make it so that it is white on the sides and transparent in the middle)
Thank You, Justin
Horizontal 'sliding' Navigation
Hi,
I hope someone can understand me here, here goes...
I understand that you can change the x-position of a movieclip (ie. when a button is presed or whatever); but
what I am trying to do is, instead of the clip just 'jumping' to the new position, I want it to 'slide' to the new position, if you know what I mean.
An example of this is the portfolio section of :
http://www.un.titled.co.uk/index2.html
Could anybody tell me where I could get a tutorial or a simple .fla or perhaps explain it if it isn't too complex.
Thanks,
Chris
Horizontal Scrollable Navigation - Help
I have followed a tutorial on FK and i get it the scrollable navigation to work fine but if i load it into another movie all it does is scroll and does not stop whenyou place your cursor over it.
It looks as though the problem is related to load levels.
Firstly below is the script i have used for the Navigation;
//START
onClipEvent (mouseMove) {
xmousepos1 = _xmouse;
ymousepos1 = _ymouse;
if (xmousepos1>xmousepos2 && ymousepos1>-98 && ymousepos1<-33) {
_root.scrollclip.nextFrame();
}
if (xmousepos1<xmousepos2 && ymousepos1>-98 && ymousepos1<-33) {
_root.scrollclip.prevFrame();
}
if (ymousepos1<-98 || ymousepos1>-33) {
play();
}
xmousepos2 = _xmouse;
ymousepos2 = _ymouse;
}
//END
This is the script I use to load it into my other movie;
//START
// Create movie clip for swf
this.createEmptyMovieClip("scrollclip",1);
PortfolioBtn.onRelease = function() {
// Load SWF
scrollclip.loadMovie("cad.swf");
// set position of clip
scrollclip._x=150;
scrollclip._y=50;
}
//END
Thankyou
Nick
Horizontal Navigation Problem
Hello everyone at FK!
I'm currently doing a personal project and I stumbled into a problem that I'd like to share with you...
The .fla file is attached to this message and as you open it and test, you will see that my sliding navigation (which will be used to present some pictures) is going from number 8 to the last possible option(number 20).
I need to make this navigation work in more than two steps so the user can click on all possible numbers (of course) : )
Any help will be highly appreciated
Thanx!
Rodrigo
Horizontal Moving Navigation
so i'm trying to create a homepage for a website and i want it to look similar to www.risd.edu (rhode island school of art & design's homepage). when you enter the site - words travel across the screen and when you roll over them a pop-up menu comes up and you can click on it. i'm using fireworks and flash, and i can't come up with right code...could someone help me out? thanks.
shershey
Horizontal Scrolling Navigation
I am tryin to create an advertisement for a project where the user
can navigate by moving the cursor to the right side of the flashplayer and this then scrolls along almost like a panaramic picture. I am strugglin with this as I am quite new to flash, I would be extremely grateful for any help or assistance.
I will include this example I found on the internet.
http://abercrombie-email.com/a/tBCHN$ZAR$Hc0AVk$qqAT-dpQHB/text1
Thankx.....Need HELP
Horizontal Navigation Problem
I am building a flash website and have utilised a horizontal cursor controlled scrolling navigation tutorial, I’m pleased with the result I got. However, I was wondering if someone could help me out with a small problem. I now want to load the nav bar as an external swf into my main interface, I have done so using a movieclip placeholder (loadmovie function), on execution of the main interface the nav bar loads perfectly in place but loses it functionality, ie: the mouseover left/right thing. How do you I fix this? I’ve rattled my brains and a few others, please help me.
Horizontal Slide Navigation
I have seen on several sites where designers have made a kind of a panorama navigiation.
When u click on "contact" the panorama starts and it stop and the contact site and so. It looks like it flyes trough the site and stop on the page u choosed.
You know what i mean ?
Horizontal Tsunami Navigation
I'm working on a portfolio site and would like to have users select clients through a horizontal tsunami menu.
An example of what I'm looking for in xml is:
http://blog.oaxoa.com/2008/06/12/fle...bar-component/
I found a verticle tsunami flash file:
http://www.flashkit.com/tutorials/Ac...-529/index.php
I can't seem to find a decent one for horizontal flash tsunami's though. I'm not great at actionscript but I can get around with it. Any help?
- Will
Horizontal Navigation Actionscript Help
can you help me find where I can change the spacing, size and add sound to the button its a nav component....
====== actionscript code below ==========
//------------------------------------------
// Settings
//------------------------------------------
s_bar._y = -12
ro_bar._y = 10
ease = 4
//------------------------------------------
// Setting up the menu
//------------------------------------------
// The menu holder
menu=holder
// the list of the buttons
var itemList = []
var current:MovieClip;
var tarBtn:MovieClip;
//------------------------------------------
// Loading the XML file
//------------------------------------------
// The xml data
var xmlSource:XML = new XML
// Loading the xml
xmlSource.onLoad = function(success:Boolean):Void {
// When the load finishs...
if (success) {
// The first node of the xml
xmlRoot = xmlSource.childNodes[0]
// The item nodes
xmlItems = xmlRoot.childNodes
// The total of items
total = xmlItems.length
// Creating the buttons
for (i=0; i<total; i++){
// Attachs the buttons
holder.attachMovie("button", "button" + i, i)
// Pushs them in the itemList[]
itemList[i] = holder["button" + i]
// Puts the text
itemList[i].txt.text = itemList[i].txtColor.text = itemList[i].ref.mcReflect.txt.text = itemList[i].ref.mcReflect.txtColor.text = xmlItems[i].attributes.name
// Resizes the textField to the text length
itemList[i].txt.autoSize = true
itemList[i].txtColor.autoSize = true
itemList[i].ref.mcReflect.txt.autoSize = true
itemList[i].ref.mcReflect.txtColor.autoSize = true
// Centers the text in the _y axis
itemList[i].txt._y = itemList[i].txtColor._y = -itemList[i].txt._height/2
// Resize and repositionates mask and reaction area to the text dimentions
itemList[i].area._width = itemList[i].txt._width
itemList[i].area._height = itemList[i].ref.mask._height = itemList[i].txt._height
itemList[i].area._y = itemList[i].txt._y
itemList[i].area._x = itemList[i].txt._x
itemList[i].ref._y = 0
// Hides the color of the text
itemList[i].txtColor._alpha = 0
// Gives the respective color to the buttons
itemList[i].txtColor.textColor = itemList[i].c =itemList[i].ref.mcReflect.txtColor.textColor = "0x"+xmlItems[i].attributes.color
// Sets the link
itemList[i].link = xmlItems[i].attributes.link
// Information for the "wave" effect
itemList[i].minScale=minScale
itemList[i].yProx=yProx
itemList[i].xProx=xProx
// Gets the total width of the menu
menuWidth = menu._width
// Starts centering the buttons and the repositionation of the them
for (z=1; z<=total; z++){
// Makes the buttons to be next to the other
itemList[z]._x = itemList[z-1]._x + itemList[z-1]._width
}
//the startung button
if (i==0){
current=itemList[i]
current.current=true
tarBtn=current
changeBarColor(itemList[i].c, ro_bar)
changeBarColor(itemList[i].c, s_bar)
}
}
}
}
level = 1
// ignore white
xmlSource.ignoreWhite = true;
// Loads the .xml file
xmlSource.load("source.xml");
holder.onEnterFrame = function(){
ro_bar._x += (tarBtn._x - ro_bar._x)/ease
ro_bar._width += (tarBtn._width - ro_bar._width)/ease
s_bar._x += (current._x - s_bar._x)/ease
s_bar._width += (current._width - s_bar._width)/ease
if (ro_bar.color2._alpha<100){
ro_bar.color2._alpha+=12
}
if (ro_bar.color1._alpha<100){
ro_bar.color1._alpha+=12
}
if (s_bar.color2._alpha<100){
s_bar.color2._alpha+=12
}
if (s_bar.color1._alpha<100){
s_bar.color1._alpha+=12
}
}
function changeBarColor(color, bar){
if (level==1){
level=2
bar.color2.swapDepths(_root.getNextHighestDepth())
ROBarColor = new Color (bar.color2)
ROBarColor.setRGB(color)
bar.color2._alpha=0
} else {
level=1
bar.color1.swapDepths(_root.getNextHighestDepth())
ROBarColor = new Color (bar.color1)
ROBarColor.setRGB(color)
bar.color1._alpha=0
}
}
Horizontal Navigation Problem
I've followed the instruction for the horizontal nav on page 37 of the Cool Effects and Practical Anumation book. but Flash Actionscipt returns the following message:
**Error** Scene=Scene 1, layer=buttons, frame=1:Line 1: Statement must appear within on handler
_root.Option_button.onPress = function () {
Total ActionScript Errors: 1 Reported Errors: 1
The script is the book is:
_root.Option_button.onPress = function () {
getURL ("http// www.google.com/");
};
WHAT WENT WRONG????
:'(
Sliding Horizontal Navigation
I've been trying to google this but am not sure what this is called... so hoping someone can help point me in the right direction...
I would like to find out how to go about creating a horizontal nav of thumbnails that slide left to right when a left or right button is clicked/hovered on. I would also like the thumbnails to keep looping if the left or right button is held down.
Once this is established I will then need to make each thumbnail act as a button.
Can anyone help me?
How To Do Horizontal Sliding Navigation
hello,
Yeah its killing me not knowning how to do this.
Just starting to learn flash, and i would love to know how to create the sliding navigation to put on a site i'm trying to develop for my workplace. You know as a template(to impress a couple supervisors, Ha ha)
Know a little programming so if it consist of code it probably wouln't be a problem..
i was thinking something like this http://actionscript.org/showMovie.php?id=1012
thanks very much.
one love
Horizontal Navigation On Alanis Morissette.com
This is one of those "How did they do it?" questions. At alanismorissette.com, notice that when you mouseclick a link, the page slides in horizontally. The entire site just slides back and forth horizontally. How did they do it?
Horizontal Tsunami Style Navigation
Hi all,
I have a client who wants to use a horizontal Tsunami-style Navigation (I guess similar in style to the OS X dock movement) - I'm a bit under the gun time wise and need an open source FLA for this. I've tried converting vertical ones I found both here and on Flash Kit but I'm getting strange results. Anyone seen a FLA hanging about that I can use?
Cheers,
Rupert
Horizontal Navigation Not Working Properly
My horizontal navigation is made up of a symbol. Inside the symbol has 5 buttons. When you mouse over a button it will show circle animation.
On each button, it has a script (e.g. email button has)
on (rollOver) {
gotoAndStop("email");
}
on (release) {
_level0.myMCL.loadClip("email.swf", 5);
}
when you click on the horizontal nav it works for the first 3 clicks then it doesn't work. If you refresh the page, it will work for 3 clicks again. I am trying to resolve this problem so I can launch my website. So thank you in advance for helping me.
http://www.creativecrossing.org/flash2007/index.html
Horizontal Scrolling Navigation Problems
I have put an FLA file together with a problem I am having in a project with a simple scrolling navigation menu.
Everything is working fine except for the stopping when the menu scrolls to far to the right. It seems to be off by 40pixels. Everything looks right so I am stuck for ideas.
Could someone please take a look and let me know whats wrong.
Thanks in advance.
Cheers
Equal Spacing For Horizontal Navigation
I am building a horizontal navigation and I am having trouble getting equal spacing between the mc's. Inside the mc's there is a text box that will contain different titles.
Code:
function buildNav():Void
{
var navTitle:Array = new Array({title: "home", path: "index.html"},
{title: "tools", path: "tools.html"},
{title: "specs", path: "specs.html"},
{title: "process", path: "process.html"},
{title: "reference", path: "reference.html"},
{title: "best practices", path: "practices.html"});
var navHolder:MovieClip = r.createEmptyMovieClip("navHolder", 0);
var tempX:Number;
for(var i:Number = 0; i < navTitle.length; i++)
{
var mc:MovieClip = navHolder.attachMovie("nav_mc", "nav_mc" + i, i, {_x: tempX});
mc.id = i;
tempX = ((mc._x + mc._width) + 60);
var navFormat:TextFormat = new TextFormat();
navFormat.leftMargin = 10;
navFormat.rightMargin = 10;
mc.nav_content.nav_content_txt.autoSize = true;
mc.nav_content.nav_content_txt.text = navTitle[i].title.toUpperCase();
mc.nav_content.nav_content_txt.setTextFormat(navFormat);
mc.nav_hit._width = mc.nav_content._width;
mc._y = 6;
}
}
Flash Simple Horizontal Navigation
Hi to all,
A newbie to the forum and flash, nice to meet you all.
A bit long winded but here goes -
I am presently working through the Flash Anthology book and have met my first problem on the first tutorial!
I have created everything for the navigation bar and written the script but I am getting:
**Error** Scene=Scene 1, layer=buttons, frame=1:Line 1: Statement must appear within on handler
_root.option_button.onPress = function ()
Total ActionScript Errors: 1 Reported Errors: 1
The line calls for (from the book)
Option_Button.onRollOver = function ()
}
InformationSlideTo (0);
};
I have searched the forum for similar queries and found an answer:
Quote:
Originally Posted by Johnny Gulag
Hello
Make sure you have that code placed on a keyframe and not on a button or movieclicp symbol itself.
But this has made no difference.
I deleted the code, deleted the frame and then re-created a keyframe and still no joy.
I would appreciate any suggestions.
Many thanks.
How To Implement An Horizontal Navigation System?
Last edited by shirley65s : 2005-10-18 at 04:29.
I would really like to emulate the horizontal drag feature of this beautiful web page:
http://www.designmade.org
(made in Flash)
(note also the absence of the horizontal bar at the bottom page!)
This will perfectly fit to my website:
http://www.albertosughi.com
which also follows a similar horizontal navigation criterion.
Any idea about how to achieve this?
I would really love to be able to recreate it.
thanks
Shirley
Horizontal Cursor Controlled Scrolling Navigation Help
i tried the tutuorial for the sliding image scroller and it worked once but now i can get it to play the file forward as the mouse moves to right, i don't understand too much and it is driving me crazy. I am helping a friend do his portfolio and he is getting a bit impatient.
it is the tutorial called "Horizontal cursor controlled scrolling navigation" i am really lost . h-e-l-p
bredhead
Horizontal Cursor Controlled Scrolling Navigation
in this tutorial: Horizontal cursor controlled scrolling navigation, the buttons are in motion even if mouse is rolled out.how can i make the buttons slide when mouse over and stop when mouse out?HELP
Please Help Horizontal Navigation With Draggable Timeline Scrolling
OK, I hope I can explain this clearly!
I have seen these sort of things before, but I am not even sure what they are called...so I am basically having trouble finding help, or even anything to point me in the right direction through Google.
I am creating a CD-Rom presentation that is going to have several scenes (yes, I have to use scenes). On the top of the entire presentation, I am building a sort of "timeline" (for a lack of a better term).
The timeline is just a narrow bar that stretches the width of the document. It is broken apart into 6 pieces (for my 6 scenes). These 6 pieces of the timeline are clickable buttons that navigate to each respective scene. I have a small triangle directly under this timeline.
I want this triangle to start scrolling across from the left-most side of the timeline when the presentation begins, then finally reach the right-most side of the timeline at the conclusion of the presentation (after all six scenes). I would also like the end user to be able to click and drag this small triangle manually across the timeline (both forward and reverse)....which would actually serve as a "fast forward" and "rewind" type of functionality.
If it helps, I am not exactly a Flash guru...basically a pretty highly skilled graphic artist and master of html.
I hope this makes sense. Thanks!!!
Horizontal Flash / XML Menu With 3 Levels Navigation ?
Hello the expert ones...perhaps you can have some minutes to help me solve my problem. I looked at the http://www.kirupa.com/developer/actionscript/xml_dropdown_menu7.htm and was inquiring whether this menu could be converted into a horizontal one with easing and loading external swfs?
I searched on many forums and the one I found there, the vertical one, is the more plausible for my requirements.
Please help if you can. Thanks.
Edited: 09/11/2007 at 05:02:11 AM by benfaY
Problem With Horizontal Cursor Controlled Navigation Tutorial..::
using Flash MX
the tutorial link: http://www.flashkit.com/tutorials/In...-744/index.php
I have followed this tutorial but I have run into a problem:
the second if:
if (xmousepos1-350 && ymousepos1<129) {
_root.scrollclip.prevFrame();
}
If I have xmousepos1-(anything), then movie only scrolls to the previous frame and only when I move left.
If I have xmousepos1(anything.. including 0), then movie only scrolls to the next frame and only when I move right.
I have included my .fla file. If anyone knows where I am going wrong and could tell me I would appreciate it.
Pixel Font Horizontal Cursor Controlled Scrolling Navigation
Hello
The problem is that I am want to use horizontal cursor controlled scrolling navigation but using buttons that use pixel fonts. The problem is that when I use the tutorials in Flashkit the fonts blur
Is there a way of doing the above but in a way which doesnt blur the fonts
thanks Max
Spry Horizontal Navigation Element Covers Flash Element...
i have a spry navigation bar with a flash movie underneath, and when i hover over the navbar and the submenu pops down it covers the flash movie, but it doesn't cover the .jpg image that is next to the flash movie. how can i fix this? thanks.
Help W/dynamic Horizontal Txt
I have a loop pulling in my "menu" array dynamically using the “createEmptyMovieClip”.
I use this all the time with wonderful results of the txt being lined up vertically.
My question is: how do I tweak this for a horizontal line-up of my txt?
for (i=0; i<menu.length; ++i) {
nt = “txt” + i;
ot = “txt” + (i-1);
this.mc.createTextField(nt, i, 0, (this.mc[ot]._y+this.mc[ot]._height)+2, 150,20);
I have played with this using (this.mc[ot]._x=i*10,this.mc[ot]._y=0), but it only brings in the last element of my array...not the whole array.
What am I doing wrong?
Thx
Dynamic Horizontal Menu
I have a horizontal Menu that needs to fit in an aspx page. I also is a dynamic menu so only the 1st level of items are initially shown. When the user does a mouse over, the next level is shown.
I don't know how to set the height so that only a strip is shown. If I set a height to a specific size, my mouse over won't show me the drop down menu. It does show if I increase the height. But I don't want this as the rest of the content gets pushed down.I want the dynamic menu to appear on top of the other content.
Also, if I set a width, the menu gets cut. What I want is the munu to stay full with horizontal scroll bar showing for the browser.
Trouble With Dynamic Horizontal Nav
I am creating a horizontal navigation bar that loads the link names through an XML document and am having trouble. Here is my 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)].toString();
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");
______________________________________
And here is my XML:
______________________________________
<?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>
_________________________________
The XML is loading, but the links are not placing correctly and the XML data is not being loaded into the dynamic text fields.
Any help would be greatly appreciated! Thank you!
Horizontal Dynamic Menu..help
I need to create a dynamic horizontal menu with submenus. Because it will be multilanguage and in German the buttons can be pretty long, I can't figure a way to make it.
The question is can I count the letters for the tabs and then create the dynamic textfields so they can match accordingly the length of the tabs. I even need them to be multiline(limit 2 lines) to be able to fit more of those.
Ai yai...
..........better ideas appreciated too..
Thanks a ton
Horizontal Dynamic Scroller
Hey guys!!
I was wondering if someone can help me out on this...
How can I do a scroller like this one?!
http://www.nitrogroup.com/#whatwedo/innovation
I need it without using importing actions...
just using Math equations so I can convert the file to swishmax....
Can someone help?!
Thanks!
Dynamic Horizontal Scroller - In Flash 4/5
I'm trying to build a horizontal scroller in Flash 5 (hopefully to publish in SWF v4). The file will load the text from an external source, and then simply scroll the information from right-to-left automatically, repeating at the end.
I want a way of doing this smoothly - ie: not running the text through an array, or replacing the letters one by one. I figured the easiest way, would be to load the text into a dynamic field, and then use the following:
setProperty("textBox", _x = [oldvalue + 1]).
My problem is, I am unable to determine the width of the loaded text (pixels, not length)... and therefor I cannot make the dynamic text box the correct size.
Is there any way to do this in earlier versions of Flash? I hope you understand, I haven't explained it very well. Thanks!
Dynamic Horizontal News Ticker
Hey could someone help me. I'm doing a flash player and I have the song title coming in a dynamic field. I want to make the title scroll horzontally like a news ticker can someone help me with this. I have no clue where to even start with this idea.
Placing Dynamic CreateTextField Horizontal?
Got a problem with placing my textfield horizontal.
I need to get the width so I can get starting point Y.
This does't work.
Code:
test = _root["navTxt"+counter].textWidth;
trace ("width "+test);
also
Code:
test = _root["navTxt"+counter]._width;
trace ("width "+test);
But when I try
Code:
test = _root["navTxt16"]._width;
trace ("width "+test);
I can get the width
Dynamic Width Horizontal Scroller
hi. i'm trying to create a horizontal scroller that holds image thumbnails that slide right and left depending on where the mouse is. the width would vary depending on how many thumbnails the gallery has. i've looked all over but can't find a tutorial that deals with a continuous horizontal scrolling clip whos width is dynamic. anyone know where one is?
[MX 2004] Dynamic Scale Horizontal Only ?
here is the code im using:
Code:
info._y = title._y-title._height/2-10;
info._x = box._x-box._width/2;
instance box = a dynamic resizing box that loads dynamic content of various
xxxxxxxxxxxxxx sizes (images or swf's)
instance title = a dynamic mc with dynamic text that is set to always center
xxxxxxxxxxxxxx at the top of resizing clip
instance info = a mc that with the above script always holds a position above
xxxxxxxxxxxxxx the left hand corner of the resizing clip
what im trying to do next is get this info mc to now scale only horizontally
to match the width of the resizing box mc and keep its _x and _y cord. where
it keeps box mc's _x position and a _y position just above that of box mc.
i tried adding this code thinking maybe it would b this simple but does not work
Code:
info._width = box._width;
Any ideas on what or how I can achieve this ?
Thanks in advance
Placing Dynamic CreateTextField Horizontal?
Got a problem with placing my textfield horizontal.
I need to get the width so I can get starting point Y.
This does't work.
Code:
test = _root["navTxt"+counter].textWidth;
trace ("width "+test);
also
Code:
test = _root["navTxt"+counter]._width;
trace ("width "+test);
But when I try
Code:
test = _root["navTxt16"]._width;
trace ("width "+test);
I can get the width
[MX 2004] Dynamic Scale Horizontal Only ?
here is the code im using:
Code:
info._y = title._y-title._height/2-10;
info._x = box._x-box._width/2;
instance box = a dynamic resizing box that loads dynamic content of various
xxxxxxxxxxxxxx sizes (images or swf's)
instance title = a dynamic mc with dynamic text that is set to always center
xxxxxxxxxxxxxx at the top of resizing clip
instance info = a mc that with the above script always holds a position above
xxxxxxxxxxxxxx the left hand corner of the resizing clip
what im trying to do next is get this info mc to now scale only horizontally
to match the width of the resizing box mc and keep its _x and _y cord. where
it keeps box mc's _x position and a _y position just above that of box mc.
i tried adding this code thinking maybe it would b this simple but does not work
Code:
info._width = box._width;
Any ideas on what or how I can achieve this ?
Thanks in advance
Placing Dynamic CreateTextField Horizontal?
Got a problem with placing my textfield horizontal.
I need to get the width so I can get starting point Y.
This does't work.
Code:
test = _root["navTxt"+counter].textWidth;
trace ("width "+test);
also
Code:
test = _root["navTxt"+counter]._width;
trace ("width "+test);
But when I try
Code:
test = _root["navTxt16"]._width;
trace ("width "+test);
I can get the width
Dynamic Text. Horizontal Image Scroll
A client has changed the parameters of the flash movie. Initially it was a horizontal image scroll driven by navigation beneath the scroll, and a left side horizontal text scroll. One text document that allow the user to scroll through all the copy.
The client now wants the copy in the scrolling text field to change depending upon which image the user has chosen. Images 1-3 demonstrate a set of capabilities that should have accompanying text, Images 4-6, etc. And this needs to be done ASAP to coincide with a product launch! I'm sure this is a total neophyte question.
The current working piece is at:
http://tunnelstudio.biz/tests/ts002_...oll_v05_mo.swf
(assets have to be put in place and the scroll changed graphically)
the fla is in the same tests folder.
Referring URL 1: http://tunnelstudio.biz/tests/ts002_...oll_v05_mo.swf
I'm having difficulty putting together the actionscript that will load a different text file into the dynamic text field depending upon which image in the scroll is displayed. Does the actionscript for that reside in the "frameleft" library item that contains the text field, or in the "scroller" library item that contains the numbers for navigation (that control the "clip general" strip of images)?
This is the actionscript for the text field:
loadText = new loadVars();
loadText.load("casestudies.txt");
//creating the loadVarsText function
loadText.onLoad = function() {
scroller.text = this.bellacor;
};
stop();
(but this script won't work if I set it to "this.informedesign" which is also contained with "casestudies.txt")
and this is the actionscript for the scroller:
on (press) {
_root.xnew = _root.mask._x+(-2-1)*280/2;
}
each number for the navigation slides the image to the left or right. e.g. "root.mask._x+ (-4-1)", (-6-1), (-8-1), etc.TextText
All is help is much appreciated.
Referring URL 1: http://tunnelstudio.biz/tests/ts002_...oll_v05_mo.swf
Dynamic, Autoresizing, HORIZONTAL Xml Menu Problems.
Im looking for a bit of help on creating an extenal xml driven HORIZONTAL menu, where its possible to:
- add or remove xml entries, causing the horizontal menu to resize appropriately.
- entries shouldnt overlap each other in the bar.
Currently, I have created an xml driven horizonal menu, however i am having trouble spacing them out evenly and automaticaly across a 750px navbar.
Conceptually, while in a for loop I take the textfield.textwidths of each xml entry after grabbing the data from the external file, then summed them up for the character total. I then
create a "space" variable based off of the total width of the navbar minues the character sum, then divided by the number of entries in the xml file. (object.length)
lastly, Im having problems with the line of code to actually PLACE the menu objects. item._x = ????
The reason I have to ask is because most XML tutorials/movies all run vertically, and therefore dont have to worry about autosizing/running in to each other.
A bit of a complex question...thanks ahead for your help!
|