ActionScript 3.0 :: Hard Time Building Custom XML Driven Popout Menu?
Dec 13, 2009
I'm trying to make an XML driven popout menu (click a menu item to open its submenu) and have run into a snag. I haven't figured out how to "hide" elements that aren't supposed to be on the screen.The menu is constructed completely out of TextFields based on the structure of a simple XML file. I added Event Listeners to each of the TextFields but I can't figure out how to make those TextFields go away when they are not supposed to be seen.
I have tried to add each TextField onto a common DisplayObject and the use container.removeChild to remove the TextFields that shouldn't be there but I keep getting errors telling me that the target of removeChild must belong to the caller. So how do I manage the visibility of menu items based on mouse clicks in a menu?I've attached the specific AS file (SOMAMenu.as) that handles the menu if anyone finds that helpful.
View 2 Replies
Similar Posts:
Apr 16, 2004
I love Senocular's XML-Driven Drop-Down Tutorial. But I can't seem to get it to make the menu headers look different from the submenus.
View 5 Replies
Apr 16, 2004
I love Senocular's XML-Driven Drop-Down Tutorial. But I can't seem to get it to make the menu headers look different from the submenus.
(and if anyone is interested, i've turned it into a horizonal menu... reply and i'll post the code. better yet, help me fix the GUI issue and i'll post it )
View 5 Replies
Mar 31, 2007
I am building a menu and for each button of the menu, subbuttons apear beneath it along the menu. And I am having some problems. Each of the menu buttons has animations for rollOver and rollOut. What can I do so that when I move over the subbuttons the menu button won't start the rollOut animation. I have to extend the hit state. If I put the subbuttons in the same movie clip as the menu button, the animation would be bad because I am doing width, height, x and y tweenings with ActionScript and addind something the the clip would change these properties. Pls help.
Is it possible to extend the hit state of the menu button in some way ?
View 1 Replies
Sep 7, 2010
I have some text that is scrolling across the page like a news ticker you would see at the bottom of your TV screen on a news channel.This scrolling text has anchor tags on it (clickable links). It is a dynamic text box inside a movieclip. Problem is, I'm using the build in AS3 Tweener to animate the text across the page and 99% of the time I cannot click the links. The mouse cursor turns to a hand when I hover over the scrolling text but clicking does nothing. If I click really fast and randomly it just might work but it hardly ever does.Do I need to apply a 'display: block' type style to it?Should I use a different tweener?
View 9 Replies
Apr 23, 2010
I have been working on building a XML menu and I have been able to create the main menu but I am not sure how to add the sub menu items in a drop down. I have included a zip file of my little test project which is CS4 and includes the fla and xml file.
The menu items consist of the following and the sub menu options are listed. As I said I have been able to create the main menu but I am not sure how to add and display the sub menus.[code]...
View 2 Replies
Feb 28, 2012
I've been hunting for tutorials on XML driven AS3 menus. I've found some really cool stuff, but nothing that does what I want, and most don't really explain the "hows' involved in getting the XML into the flash. I want to dynamically load menu buttons based upon an xml document in horizontal fashion with sub menus that load 10px down and to the right of the main menu button. With each item in the sub menu filing to the right. I'd also like to have that light up bar track the main buttons so that as the mouse moves over the bar slides to it.
Here's the code for the bar:
ActionScript Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
button_mc.buttonMode = true;
button2_mc.buttonMode = true;
button_mc.addEventListener(MouseEvent.ROLL_OVER, hover);
button2_mc.addEventListener(MouseEvent.ROLL_OVER, hover);
function hover(e:MouseEvent):void {
new Tween(bar_mc,"x",Strong.easeOut,bar_mc.x,e.currentTarget.x,1,true);
}
Most of the XML driven code I have found obviously doesn't have a static instance name and use addChild()
View 9 Replies
Apr 24, 2004
I've read Sen's tut. on making the xml menu, but I couldn't spot and/or find a way to make the menu horizontal rather than vertical. I would very much like to use this effect as it would make my site so much easier to update as far as more or less links go.Here is the code from Sen's tutorial:
Code:
GenerateMenu = function(container, name, x, y, depth, node_xml) {
var curr_node;
[code]......
View 7 Replies
Aug 29, 2006
I've been taking advantage of kirupa's excellent tutorials for quite a while now, and lurked in the forums from time to time, but not registered until now. I'm finding myself having some problems that I seem to be unable to overcome, I've been trying to create a variant of the XML-driven drop-down menu that instead of displaying the submenus to the right of the mainmenu inserts them inbetween the mainmenu elements.[code]
View 2 Replies
Mar 17, 2008
I have this xml driven menu with submenus that works horizontally and i want to space the menu items and submenu by getting the textWidth of the first item and placing the 2nd item next to it and then the 3rd item next to the 2nd and 4th next to the 3rd etc etc so they all sit side by side horizontally without using a fixed space for all of them. here is my code:
Code:
this._lockroot = true;
//
_level0.fmt_container = _level0.text_formats_container || {};
[Code].....
View 3 Replies
Mar 25, 2009
I have checked this tutorial in kirupa website but this is vertical xml drop down menuI would like to change this into horizontallybut when i try to do this through change the codethe submenu also goes horizontally which i dont want that Basically i want main menus to be horizontal and submenus to be verticallyAs which code has to be changed so that main menu will be horizontal and submenu's will be vertical
View 2 Replies
Dec 9, 2009
I want to add actions (other than "gotoURL") to the XML Driven Drop Down Menu (tutorial on this site) - particularly internal site navigation - ie, gotoAndStop().
View 1 Replies
Jan 21, 2004
I'm having truble understanding it all really... if anyone managed to complete the tutorial start to finish without scratching their heads
View 3 Replies
Nov 19, 2009
I'm new to actionscript 3 and could really use some help to develop an xml driven menu system. I would like to make the menu system similar to the navigation used in this site. [URL] I just need a simple version of this maybe 2 - 3 categories on the left and all of the children for them on the right.
View 0 Replies
Oct 13, 2009
How do you make the XML-Driven Drop-Down Menu[url]...
View 1 Replies
Apr 22, 2010
is there an AS3 version of the XML-Driven Drop-Down Menu tutorial available.
View 3 Replies
Dec 30, 2005
I have followed Kirupa's tutorial on an XML driven drop down menu. On this menu, when a submenu is opened, it opens next to the button the mouse is hovering over. I need the submenus to open at the top of my flash page, does anyone know how to do this?
View 3 Replies
Aug 24, 2009
I'm currently building a custom flv player and need some help. Maybe I'm missing something, I'm not sure. The main problem is that the FLV doesn't load/play, which most likely causes the secondary problems, such as the bufferClip always visible and no way to test the video and audio scrubbers.
[Code]...
View 9 Replies
Sep 10, 2010
I have been following and bastardising a computer arts tutorial for a dynamic flash site, its a really good tutorial and I'd like to keep going with that format/style, but I'm pretty new to the whole scripting thing and am finding it a bit of a headache, so was wondering if any kind souls would help me work out how to add submenus to the code below.the main menu button is a movie file(btn_projects_main) consisting of a button (button) and a text box(txt) and is 3 frames long to allow for the different states: What I'm looking for is a set of sub menus which load horizontally below the main menu buttons, here is the code which has been altered slightly (thanks to Ned Murphy for his help and patience with that)
// Setup some initial variables
// Hide the button that will display a web link_root.theUrl._visible = 0;
// Hide the image icons in the project loader// The image icons are simply there to make
[code].......
View 4 Replies
Jan 6, 2011
I would like to use an XML-driven menu on my site and everything works fine so far, but the XML is connected to a CMS, meaning new menu items can be created through the CMS and added to the Flash menu. That's works, too. Here is the problem: Browsers usually caches XML files,to modify the line where Flash retrieves the XML file:e.g. instead of getting: 'menu.xml'. It should more look like this: menu.xml?'+Math.random(),(or whatever is the exact syntax for a random number is in AS. This would kill the cache, correct?Here is the AS code:
// declare the package
package com {
// import the needed AS packages
[code]....
View 4 Replies
Oct 25, 2004
I'm slowly trying to get my pea sized brain wrapped around using xml in flash.my question is how do i convert what senocular has here:
Code:
Actions = Object();
Actions.gotoURL = function(urlVar){
[code].....
View 3 Replies
Dec 9, 2005
whats up everyone, awsome tutorial but i don't like the menu being vertical so i changed it to horizontal. bold parts i changed...
[Code]...
View 1 Replies
Sep 12, 2007
I'm trying to make a real simple flash menu, and I am using the "Squirrel Finder"-tutorial as a base. Problem is, when I trace my variables desc and swfURL they are correct, and the numbers on the buttons work fine as well, only when I click on the buttons all of them point to the last post in my XML, i.e., buttons 1,2,3,4,5 all point to swf 5.
Code:
function skapaMeny(menu_xml) {
var proj:Array = menu_xml.firstChild.firstChild.childNodes;
for (var i=0; i<proj.length; i++) {
var desc = proj[i].firstChild.childNodes;
var swfURL = proj[i].firstChild.nextSibling.childNodes;
[Code] .....
View 2 Replies
Jun 9, 2008
I am trying to use Kirupa's XML drop down menu(action script 2.0): aka: [URL] however I cannot have it output the childNode. This is because it is using a for loop with the curr_item variable. when I try to trace the for loop count variable, it just returns the last for loop variable. I basically want it so that when I click on a button on the 3rd tier submenu, I want it to output all the prior tiers that the button belongs in.
View 2 Replies
Oct 19, 2009
I have been trying to understand how to create a url link with the xml file that my menu is driven by. what I have is a menu with text amd images reading from an xml file, I have created a third text field which I would like to use as a button/link that when click it goes to a url.[code]but this doesn't seem to work, am I missing something within the flash movie.URL...
View 1 Replies
Jan 14, 2010
I would like to add a "show/hide" command to an item in this menu.For instance:
<item name="home" action="gotoURL" variables="http://www.kirupa.com"/>
to:
<item name="home-1" action="gotoURL" variables="http://www.kirupa.com" show="true"/>
<item name="home-2" action="gotoURL" variables="http://www.kirupa.com" show="false"/>
View 2 Replies
Jan 10, 2010
I'm trying to figure out where to get started on a menu like the one found at:There are several links, and as you rollover each of them, it changes the image above them. However, the image above them has links in it as well.I'm completely lost on where to get started as it seems like rolling over opens another page right above it.
View 4 Replies
Mar 9, 2009
I am creating an AIR app. In this app there's a need to copy a folder from a fixed known localtion C:xyz to app:/. I would like to know how can I do this copying before compilation/build so that they get packaged when I run the 'Export Release Build'
View 1 Replies
Feb 7, 2010
well i have a problem to which there are lots of related searches over the net but none could solve it. well the problem is that i have an XML driven carousel menu that needs to be loaded using the preloader. After the load is complete i can find my swf menu's backgound and the static buttons getting loaded but the buttons that should load in the carousel using xml are not present.
I have come across the even ADDED_TO_STAGE to load the swf once it has completed its dynamic loading. But they have used it in the documentation class for thier project. I am not using any separate actionscript file.All my code is written in the 1st frame of my project .... I really need a solution to this problem
View 3 Replies
Oct 12, 2009
HOW do I go about doing it?Ive tried...buttonon "over" create to movie clipinside movie clip have my animations and sublink buttonsit works fine, but there's one problem, The hit area of the main button HAS to cover the hidden sublinks, so even if you scrolled your mouse over the bottom of the button (in the invisible area) it will still show since its in the hit area).How can I create a simple nav drop down? I seriously have went through almost all tutorials, both video and text, and nothing has worked! I am using Actionscript 3, or whatever the tutorial says to use.edit: Here is something I'm working on. Its a button, and on the rollover it creates the animation. Obviously it doesnt work, because you cant have a button inside a button, so I don't know the actionscript to do this.
View 2 Replies