XML Based Menu Question
Hey guys,
I found this tutorial on building an XML based menu that is inside a flash document, but I don't want the menu buttons to link to html pages, i would like them to load a different movie in a given level. Here is the tutorial I found.
http://www.createage.com/xml_css_menu.htm
Can anyone tell me if what I want is possible, and if so how to go about changing the action script to make it work? Thanks. Phil
Ultrashock Forums > Flash > Flash Newbie
Posted on: 2005-05-11
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
[F8] XML Based Menu
Please see last post in this thread as i've changed the script im working with
Thanks
XML Based Menu Help
Hi I am using the following xml menu
?xml version="1.0"?>
<menu name="links">
<menu name="Introduction">
<item name="Definition" action="gotoAndStop" variables="quizLink" />
<item name="History" action="gotoAndStop" variables="history"/>
</menu>
then the actionscript is
menu.as
This flash movie will only be published locally, so i want to know what would the function look like to direct the xml menu to a differant scene and frame?
also where would this function be placed in the code? would it be on the top line with the menu actionscript?
Xml Based Horizontal Menu
I need to create a horizontal menu using an XML datasource that will contain the menu labels.
I would like to create a button (just some text that behaves like a hyperlink - turns from black to blue with underline onmouseover) for each menu item in the XML file.
Problem is, how do I script this so that I can duplicate this button once for each menu item in the XML datasource and insert the label attribute into the button?
And, here's the kicker, how do I determine where to place the duplicated button in relation to the previously created button. Because each button will take up more or less horizontal space depending on the length of the label.
The XML will look like this:
<menus>
<menu id="1" label="Home" />
<menu id="2" label="Menu Manager" />
<menu id="3" label="Logout" />
</menus>
And I want the result in the swf to be:
HOME | MENU MANAGER | LOGOUT
Simple XML Based Menu, But HOW?
I need to create a horizontal text menu from an XML file. The items in the menu will simply be text links like so:
ITEM 1 | ITEM 2 | ITEM 3
The XML will be:
<menu>
<item name="home" menuid="1" target="_blank" />
<item name="about us" menuid="2" target="_self" />
</menu>
.........
And I simply need to parse the XML and create a horizontal menu out of that. Each menu item needs to be clickable so that I can pass some info onRelease or onClick.
Simple Xml Based Menu
I need to create a dynamic xml based menu in flash mx. I said dynamic cause i want the client can add or remove items of the menu, editing the xml file.The menu items are placed vertically, so if i have 2 items i will see 2 buttons and so on...Any1 knows a tutorial or a fla download so i can teach myself how to do it??? Thx a lot..
richard
Horizental Menu Based On Xml
most of the example u see on drop down menu's based on mml
are vertical
i am looking for an horizental 1 like this :
parent1 parent2 parent3
child1 child1 child1 child2 child2
child3
does any one knows o f ready made 1?
thnaks in advance
peleg
Horizental Menu Based On Xml
most of the example u see on drop down menu's based on mml
are vertical
i am looking for an horizental 1 like this :
parent1 parent2 parent3
child1 child1 child1 child2 child2
child3
does any one knows o f ready made 1?
thnaks in advance
peleg
XML Based Flash Menu
Hi people,
I have an XML menu that works a treat but I am not sure how to load into levels using the XML file.
Currently I am only able to load into an external files using the location tag i.e.
<subitem name = "Name Here " location="web_.swf"></subitem>
Any help would be much appreciated.
Thanks
XML Based Flash Menu
Hi people,
I have an XML menu that works a treat but I am not sure how to load into levels using the XML file.
Currently I am only able to load into an external files using the location tag i.e.
<subitem name = "Name Here " location="web_.swf"></subitem>
Any help would be much appreciated.
Thanks
XML Based Menu By Senocular
Hi,
I hope someone can help as I am stumped. I followed the XML based menu by senocular a long time ago and modified it to display a title when the sub menu is chosen simply a movie with an image of a menu button in it:
http://www.kirupa.com/developer/acti...pdown_menu.htm
I need to modify this so that when the title is hovered over it displays the sub menu. Essentially imitating the behaviour when the first menu is hovered over. Does anyone know how to do this? or at least point me in the right direction??
Thanks
Chris
XML Based Flash Menu
Hi people,
I have an XML menu that works a treat but I am not sure how to load into levels using the XML file.
Currently I am only able to load into an external files using the location tag i.e.
<subitem name = "Name Here " location="web_.swf"></subitem>
Any help would be much appreciated.
Thanks
AS Based Drop Down Menu
Hello Everyone,
I am having some trouble making a solid dropdown Menu without any bugs.
This is the set up.
I have my navigation bar with five different buttons.
Two of the button have more then one option, which require drop down menus.
The button that drop down are on a horizontal plane, not a vertical one
like this- option 1 option2 option 3
Not like this- option1
option2
option3
I have already tried http://www.kirupa.com/developer/mx/dropdownmenu.htm
Any help would be greatly appreciated.
Thank you very much in advance.
Help Need With ActionScript-based Menu
Last edited by boonhoofd : 2002-10-11 at 05:20.
I need some help.
I've downloaded a Fla from this site.
It contains a menu that uses actionscript.
And now I want to improve it a bit. The situation right now is that the menu reacts on the mouse no matter where it is. I want to alter the code so the menu only reacts when the mouse is over the menu or the area around.
-the menu I use-
So can anybody help me?
EDIT: I don't need help anymore...Thread can be closed now.
Keystroke Listener Based Menu
I have a menu consisting a movie clip with several buttons linking to different scenes and named frames within scenes. The menu appears when a user hits the space bar using the following code placed on a blank "listener" movieclip:
onClipEvent (load) {
_global.stopped = false;
}
on (keyPress "<Space>") {
_root.clipboard.nextFrame();
if (_global.stopped) {
_root.play();
_global.stopped = false;
} else {
_root.stop();
_global.stopped = true;
}
}
The stopped variable is so that the movie will pause when the menu is up, selfPaced simply prevents the movie from advancing during certain scenes.
The buttons on the menu each have the following code:
on (release) {
_global.stopped = false;
_root.gotoAndPlay("3d");
_root.clipboard.gotoAndPlay(7);
}
where "3d" could be any label.
Here is the strange thing: Everything works fine EXCEPT in scene three. Then two of the button simply stop working. The cursor will change to a hand, but the mouseOver action does not work and I can't click them. I have even tried cutting and pasting the menu from another scene, but nothing seems to work. I've also examined the code over and over and it is identical to all of instances of the menu in other working scenes. Any suggestions?
Sub-menu Visibility Based On Rollout
I created a slick dynamic menu that can make a second set of sub-menus for the first set. When you rollover a submenu, a third menu (subChild) pops up to the right of the submenu.
I have the rollout for the submenu set to hide its subchildren which obviously hides them regardless of if I'm trying to roll onto the children or not.
Currently I have a rolledOver variable and all of the subchildren have an onEnterFrame that changes their visibility based on rolledOver. The submenu's onRollOver updates rolledOver and its onRollOut clears it.
How do I get the subchildren to stay visible if I roll off the submenu onto its subchildren? I know it has something to do with multiple conditions just can't wrap my head around it. Thanks in advance.
Dynamic Menu Based On A .txt File
I'm doin' a site in html for a friend of mine and I wanted to make a simple interface for him to modify various things such as images and so on.
I draw a cute menu for his children in flash (with penguins, flowers and such stuff ) and considering that they could add extra pages I had an idea!
Is there possible to make a simple falsh menu that takes button names and links from a .txt file? that would be awesome...
Example!
let's say that my menu has 3 voices (kids, friends, drawings); if my idea was possible, I could modify the txt file with an extra voice and it would appear next to the previous tree with the relative link...so his kids could modify the txt to have the result in the site as well! I don't know if it can be done...is it possible?
Collaspible Menu Component XML Based
Hi everyone,
Im having some trouble with a xml menu that I have built, does anyone know there is a good resource for this sort of thing?
I am using the Collaspible Menu component, with xml. Now the problem is that the menu is working and looking good, but now my client is wanting for not only for it to have rollover states but for it to have varibles passed so that the currentPage is highlighted in the menu. This is possibly the stupidest request that I have ever had, as like I said before, they want it xml driven as it is going into a CMS and they want to be able to update it easily. As far as I know you cant do this, well I cant work it out, but if anyone knows or has seen a menu like this please let me know..
Keyboard Based Navigation Menu
In my application, the navigation on the clip will be done by keyboard...no mouse! ;-)
Essentially, the left, right, up and down arrow PLUS a keyboard key (space for instance)
So, I’ve started with that kind of code:
Code:
function myOnKeyDown() {
// Left
if (Key.getCode() == 37) {
//
}
// Right
if (Key.getCode() == 39) {
//
}
//Up
if (Key.getCode() == 38) {
//
}
//Down
if (Key.getCode() == 40) {
//
}
}
//
var keyListener:Object = new Object();
keyListener.onKeyDown = myOnKeyDown;
Key.addListener(keyListener);
Untill there…no problems ;-)
Some action will bring new window on stage (see it like a preference menu)
So to be clear a new window on top of the main one ;-)
On this window again, the navigation will be done via the keyboard arrows.
The question is (FINALY;-) this one:
What kind of system should I use to prevent the key stroke to call functions on the main window…when the new one is on top of it?
The main concern of this topic could resume like this…How to restrict keyboard shortcut to the topmost window only?
And what system to set up to achieve this?
Thanks very, very much for any kind help, idea, feedback, tutorial? …;-)
Keyboard Based Navigation Menu
In my application, the navigation on the clip will be done by keyboard...no mouse! ;-)
Essentially, the left, right, up and down arrow PLUS a keyboard key (space for instance)
So, I’ve started with that kind of code:
Code:
function myOnKeyDown() {
// Left
if (Key.getCode() == 37) {
//
}
// Right
if (Key.getCode() == 39) {
//
}
//Up
if (Key.getCode() == 38) {
//
}
//Down
if (Key.getCode() == 40) {
//
}
}
//
var keyListener:Object = new Object();
keyListener.onKeyDown = myOnKeyDown;
Key.addListener(keyListener);
Untill there…no problems ;-)
Some action will bring new window on stage (see it like a preference menu)
So to be clear a new window on top of the main one ;-)
On this window again, the navigation will be done via the keyboard arrows.
http://users.skynet.be/deboeur/helprequest.gif
The question is (FINALY;-) this one:
What kind of system should I use to prevent the key stroke to call functions on the main window…when the new one is on top of it?
The main concern of this topic could resume like this…How to restrict keyboard shortcut to the topmost window only?
And what system to set up to achieve this?
Thanks very, very much for any kind help, idea, feedback, tutorial? …;-)
Array-based Drop-down Menu
I'm trying to create an array based drop-down menu, or drop-up in this case. Can anyone help? Know of any tutorials? Any help would be appreciated!
Here's what I have so far. It basically just populates a multiline text field with each array item on a seperate line.
Code:
drop_array = new Array("item1", "item2", "item3");
for (i=0; i < drop_array.length; i++) {
drop_down.text += drop_array[i] + "
";
}
Extending Kirupa's XML-Based Menu...
This is one of my first posts, so be kind! I'm slowly getting back into Flash after a hiatus (I was pretty good with Flash 5), and I've been adapting Kirupa's XML-based menu tutorial to my company's needs.
As users drill down to the 2nd and 3rd tier of menus, I need the script to load and display images (preferably with a preloader), the links of which would be provided in the accompanying XML document (I based our XML doc off of Kirupa's example as well).
Any help that can be provided would be great! Here's the modified Kirupa script:
// generates a list of menu items (effectively one menu)
// given the inputted parameters. This makes the main menu
// as well as any of the submenus
GenerateMenu = function(container, name, x, y, depth, node_xml) {
// variable declarations
var curr_node;
var curr_item;
var curr_menu = container.createEmptyMovieClip(name, depth);
// for all items or XML nodes (items and menus)
// within this node_xml passed for this menu
for (var i=0; i<node_xml.childNodes.length; i++) {
// movieclip for each menu item
curr_item = curr_menu.attachMovie("menuitem","item"+i+"_mc", i);
curr_item._x = x;
curr_item._y = y + i*curr_item._height;
curr_item.trackAsMenu = true;
// item properties assigned from XML
curr_node = node_xml.childNodes[i];
curr_item.action = curr_node.attributes.action;
curr_item.variables = curr_node.attributes.variables;
curr_item.name.text = curr_node.attributes.name;
// item submenu behavior for rollover event
if (node_xml.childNodes[i].nodeName == "menu"){
// open a submenu
curr_item.node_xml = curr_node;
curr_item.onRollOver = curr_item.onDragOver = function(){
var x = this._x + this._width + 10;
GenerateMenu(curr_menu, "submenu_mc", x, y, 1000, this.node_xml);
//over state for items
this.background.gotoAndPlay('openitem');
};
}else{ // nodeName == "item"
// close existing submenu
curr_item.onRollOver = curr_item.onDragOver = function(){
curr_menu.submenu_mc.removeMovieClip();
// run movie to over state
this.background.gotoAndPlay('openitem');
};
}
curr_item.onRollOut = curr_item.onDragOut = function(){
// run close menu anim
this.background.gotoAndPlay('closeitem');
};
// any item, menu opening or not can have actions
curr_item.onRelease = function(){
Actions[this.action](this.variables);
CloseSubmenus();
};
} // end for loop
};
// create the main menu, this will be constantly visible
CreateMainMenu = function(x, y, depth, menu_xml){
// generate a menu list
GenerateMenu(this, "mainmenu_mc", x, y, depth, menu_xml.firstChild);
// close only submenus if visible durring a mouseup
// this main menu (mainmenu_mc) will remain
mainmenu_mc.onMouseUp = function(){
if (mainmenu_mc.submenu_mc && !mainmenu_mc.hitTest(_root._xmouse, _root._ymouse, true)){
CloseSubmenus();
}
};
};
// closes all submenus by removing the submenu_mc
// in the main menu (if it exists)
CloseSubmenus = function(){
mainmenu_mc.submenu_mc.removeMovieClip();
};
// This actions object handles methods for actions
// defined by the XML called when a menu item is pressed
Actions = Object();
Actions.gotoURL = function(urlVar){
getURL(urlVar, "_blank");
};
Actions.message = function(msg){
message_txt.text = msg;
};
Actions.newMenu = function(menuxml){
menu_xml.load(menuxml);
};
// load XML, when done, run CreateMainMenu to interpret it
menu_xml = new XML();
menu_xml.ignoreWhite = true;
menu_xml.onLoad = function(ok){
// create main menu after successful loading of XML
if (ok){
CreateMainMenu(10, 10, 0, this);
message_txt.text = "message area";
}else{
message_txt.text = "error: XML not successfully loaded";
}
};
// load first XML menu
menu_xml.load("menucontent.xml");
Xml Based Menu In Scrollpane Component
hello,
I designed an XML based menu which i want to be used within a scroll pane as i hav a limited area to place that menu but the menu has many options so i need scrolling. I m trying to attach the menu clip with the ScrollPane but its not working properly. Can anyone out there help me in this regard or refer me any URL where i can find same thing with explaination so that i can hav my own XML based menu within the scrollpane. Besides is there any other way to hav scrolling for that XML based menu other than using ScrollPane.
Thanks
Array-based Drop-down Menu
I'm trying to create an array based drop-down menu, or drop-up in this case. Can anyone help? Know of any tutorials? Any help would be appreciated!
Here's what I have so far. It basically just populates a multiline text field with each array item on a seperate line.
Code:
drop_array = new Array("item1", "item2", "item3");
for (i=0; i < drop_array.length; i++) {
drop_down.text += drop_array[i] + "
";
}
Keyboard Based Navigation Menu
In my application, the navigation on the clip will be done by keyboard...no mouse! ;-)
Essentially, the left, right, up and down arrow PLUS a keyboard key (space for instance)
So, I’ve started with that kind of code:
Code:
function myOnKeyDown() {
// Left
if (Key.getCode() == 37) {
//
}
// Right
if (Key.getCode() == 39) {
//
}
//Up
if (Key.getCode() == 38) {
//
}
//Down
if (Key.getCode() == 40) {
//
}
}
//
var keyListener:Object = new Object();
keyListener.onKeyDown = myOnKeyDown;
Key.addListener(keyListener);
Untill there…no problems ;-)
Some action will bring new window on stage (see it like a preference menu)
So to be clear a new window on top of the main one ;-)
On this window again, the navigation will be done via the keyboard arrows.
The question is (FINALY;-) this one:
What kind of system should I use to prevent the key stroke to call functions on the main window…when the new one is on top of it?
The main concern of this topic could resume like this…How to restrict keyboard shortcut to the topmost window only?
And what system to set up to achieve this?
Thanks very, very much for any kind help, idea, feedback, tutorial? …;-)
Keyboard Based Navigation Menu
In my application, the navigation on the clip will be done by keyboard...no mouse! ;-)
Essentially, the left, right, up and down arrow PLUS a keyboard key (space for instance)
So, I’ve started with that kind of code:
Code:
function myOnKeyDown() {
// Left
if (Key.getCode() == 37) {
//
}
// Right
if (Key.getCode() == 39) {
//
}
//Up
if (Key.getCode() == 38) {
//
}
//Down
if (Key.getCode() == 40) {
//
}
}
//
var keyListener:Object = new Object();
keyListener.onKeyDown = myOnKeyDown;
Key.addListener(keyListener);
Untill there…no problems ;-)
Some action will bring new window on stage (see it like a preference menu)
So to be clear a new window on top of the main one ;-)
On this window again, the navigation will be done via the keyboard arrows.
The question is (FINALY;-) this one:
What kind of system should I use to prevent the key stroke to call functions on the main window…when the new one is on top of it?
The main concern of this topic could resume like this…How to restrict keyboard shortcut to the topmost window only?
And what system to set up to achieve this?
Thanks very, very much for any kind help, idea, feedback, tutorial? …;-)
Horizontal Menu Based On Actionscript
hi there,
is there anyone tha can help me with horizontal menu sample that already exists as an example in the ultrashock site??
i tried to manage with the script:
on(rollover) {
this._x=_root._xmouse;
please help!!!
Help Needed With ActionScript-based Menu
Last edited by boonhoofd : 2002-10-11 at 05:19.
I need some help.
I've downloaded a Fla from this site.
It contains a menu that uses actionscript.
And now I want to improve it a bit. The situation right now is that the menu reacts on the mouse no matter where it is. I want to alter the code so the menu only reacts when the mouse is over the menu or the area around.
the menu I use
So can anybody help me?
I guess I'm a bit of newbie when it comes to actionscript, so don't get mad ok?
EDIT: I've got it working now...Thread can be closed by mods.
[F8] Mouse Position-based Scrolling Menu
Hello!
I am searching, searching for a Mouse position-based scrolling menu.
You can find an example of what I mean here : http://www.userenabled.com/downloads/rssfeeder/
I am referring to the active menu on the right, in the RSS feeder, below "Sample Feeds".
A concise tutorial would be very helpful!
Thanks!
Dynamic, XML-based Easing, Elastic Menu?
Hey all,
I'm looking for a vertical menu/nav system that uses XML or an Array to define Items and Subitems, that will animate between different submenu dropdowns, closing one as another opens... I haven't yet seen anything that seems to meet all of these specs... What i've found so far has been horizontal drop downs that animate, or vertical dropdowns that DON'T animate at all...it would accomplish the goals of the navigation, but leaves you wondering why you'd build it in flash at all...
any help or thoughts or products people could reccomend would be great. Prior to this we've been animating each drop-down manually with tweens and variables inside a nav movie clip...
thanks!
[CS3] Looking For A Simple, Text Based Nav/menu Tutorial.
hi all
i am looking for a tutorial, that is very very simple, but i cant seem to find one! i want to make a left-side, vertical navigation for a personal portfolio site.
doesnt need animating, and just needs to be able to expand, e.g.
about
work
contact
other
work expands to:
about
work
project 1
project 2
project 3
contact
other
about
work
project 1
project 2 PROJECT IMAGE HERE
project 3
contact
other
info
< images >
anyone here know of any tutorials for this kinda thing?
XML Based Menu - Multiple Isntances (flash MX)
I must say, this website has helped me incredibly over the past few years.
The amount of incredibly helpful and intellegent people amazes me!
Now that the sucking up is done, i was wondering if someone could help me to figure out how to create multiple instances of the xml-based flash menu, as from the tutorial found here: http://www.kirupa.com/developer/actionscript/xml_dropdown_menu.htm
so that i can get 5+ menus all based on the childNodes[i] of the xml file.
The xml file would be something like:
Code:
<?xml version="1.0"?>
<menu name="MENU 1">
<menu name="macromedia">
<item name="flash" action="gotoURL" variables="http://www.macromedia.com/software/flash"/>
<item name="dreamweaver" action="gotoURL" variables="http://www.macromedia.com/software/dreamweaver"/>
<item name="fireworks" action="gotoURL" variables="http://www.macromedia.com/software/fireworks"/>
</menu>
<menu name="kirupa">
<item name="home" action="gotoURL" variables="http://www.kirupa.com"/>
<item name="forums" action="gotoURL" variables="http://www.kirupaforum.com/forums/index.php"/>
<menu name="tutorials">
<item name="actionscript" action="gotoURL" variables="http://www.kirupa.com/developer/actionscript/index.htm"/>
<item name="photoshop" action="gotoURL" variables="http://www.kirupa.com/photoshop/index.htm"/>
<item name="web" action="gotoURL" variables="http://www.kirupa.com/web/index.htm"/>
</menu>
</menu>
<menu name="MENU 2">
<menu name="macromedia">
<item name="flash" action="gotoURL" variables="http://www.macromedia.com/software/flash"/>
<item name="dreamweaver" action="gotoURL" variables="http://www.macromedia.com/software/dreamweaver"/>
<item name="fireworks" action="gotoURL" variables="http://www.macromedia.com/software/fireworks"/>
</menu>
<menu name="kirupa">
<item name="home" action="gotoURL" variables="http://www.kirupa.com"/>
<item name="forums" action="gotoURL" variables="http://www.kirupaforum.com/forums/index.php"/>
<menu name="tutorials">
<item name="actionscript" action="gotoURL" variables="http://www.kirupa.com/developer/actionscript/index.htm"/>
<item name="photoshop" action="gotoURL" variables="http://www.kirupa.com/photoshop/index.htm"/>
<item name="web" action="gotoURL" variables="http://www.kirupa.com/web/index.htm"/>
</menu>
</menu>
</menu>
so that I get 2 menus - one based on the node "MENU 1" and another based on the node "MENU 2".
Ive tried a couple of things, but im not really up to scratch on my actionscripting. so Im wondering if any of you awesome, amazing and helpful people would care to help me out of this one.
ANY help is appreciated.
vinci_nz
Flash Movie Overlaps Div-based Menu
Hi, folks. I'm running into a pretty serious problem to which I'm really, really hoping someone will know a solution.
We use a menu system on our site which is made up of layers. It provides for flyout-hierarchical menus, and up until now has caused me no grief.
However, now that I've embedded a flash movie onto a particular page the layers that comprise the flyout menu items are hidden beneath the Flash movie.
I've tried putting the object tag inside a div and setting the z-index of the div to 1 (and also to -1) but that didn't work.
Can anyone take a look and let me know if they have any ideas?
http://www.unbc.ca/test.html
Cheers and TIA,
Pablo
Getting Menu To Load Movie Clips Based On Conditions
Hi all - I'm trying to replicate a cool menu effect I saw on another website; it obviously involves movie clips communicating with one another based on which of them is loaded. You can see the basic effect in action here:
http://www.zerogny.com/zero_gravity_design_group.cfm
And now let me try to explain how I want to adapt it for my project.
What I want is to have four basic buttons - "about us," "portfolio", etc. - to kick off a movie clip that plays beside the button panel. If you press the "about us" button, a movie clip with an animated message "about us" unfolds upon the stage; when you click the "portfolio" button, however, the "about us" animation goes in reverse; when it has completely reversed, then the "portfolio" animation loads onto the stage.
So far, I have figured out how to load four movie clips (plus a fifth, default MC) onto the stage depending on which button is pressed; that's pretty basic stuff, I suppose, although it was hard for a newbie like me (see attachment). Eventually, each of these movie clips will have a "loading" animation that stops at frame 25. At frame 26, the frames are reversed so that, when played, those frames would show the animation "unloading" off the stage. At the current stage of my project, I have only added the "unloading" frames to the second button's action; of course, only the "loading" animation shows, no matter which button is pressed.
To take my movie to the next level, I need help in figuring out how to tell the next button pressed, say "portfolio," to tell the "about us" movie (if that's the one occupying the stage) to play its unloading sequence from frame 26 and then (at frame 52) load the "portfolio" sequence or whichever sequence has been been cued by the user to enter the stage. I know this is an issue involving variables and conditions, but I am such a new newbie I can't figure out how to make this work. I'd surely appreciate any help out there; I know this issue has been dealt with before, as so many menus seem to use the effect I'm after.
[CS3|AS2]Profound Problems With Swf Menu Based Html Pages.
Dear Flash grown-ups;
I'm trying to make a site with HTML content, but a Flash menu bar. Menu buttons should change state depending on what the current page is, e.g. if you're on the Contact Us page, the Contact Us button is dimmed out as if unavailable. Since I don't know Java, the only possible method that I saw was making a separate duplicate of the same SWF menu for every page with the exception of the corresponding button in the menu being dimmed out in each duplicate. The obvious problem was that those SWFs would need to reload on every page load, resulting in a brief but significant (and annoying enough) disappearance and reappearance of the menu bar. At that time, logic suggested that this problem could be easily fixed by loading bitmap elements into MCs externally as opposed to importing them to the library. I naturally assumed that since all SWFs use the exact same bitmap files loaded from the exact same location, the aforementioned brief flashing would go away. How naive was that? I hit the wall and the deadline is closing in like the headlight of the chu chu in the tunnel. HEEEELP!!!
In addition to this, I'm experiencing yet another unexpected problem: aside from the main menu bar SWF, I also have a price calculation SWF. These two work fine if they are loaded into separate HTML pages; when both put on the same HTML page, however, they do not load properly/completely.
Any help would be super.
Thanks
PS. I read that the SWF menu HTML page thing can be achieved through iFrames, but my concern is that some browsers, such as Netscape, don't support iFrames. If you hav any suggestions on how to approach the problem, please let me know
Rotating 3D Menu Help - Based On Joseph Griffin Movie
Greetings.
I am working on modifying a file by Joseph Griffin (available HERE) and am having a little trouble. I've emailed Joseph directly, but thought I'd post here in case anyone had any ideas.
I've made the following modifications to Joseph's original file:Changed the movie to 756x545 size
Removed the "on mouse click expands the selection" function
Figured out how to add more than 10 panels if necessary... very easy - very cool!
Minimized the entire rotating menu on click (achieved by targeting entire movie on the _root timeline)
However I'm having trouble trying to add the following functionality:Limit the mouse "input" area (that causes the menu to scroll) to only the area within the grey box (both when enlarged and when minimized).
I've tried altering the section code that controls the scrolling speed and that reads the _ymouse coordinates (just trying to get full-sized state to work properly) and tried limiting the input to x coordinates as well, but have had no luck. Adding any _xmouse conditions seems to nullify the _ymouse coordinates instead and neither functions properly (the _ymouse input area becomes full-screen, not limited to the constrained < || > areas).
This is the code used in the original (with _ymouse coordinates modified to reflect the expanded movie's size) and works fine as is:
Code:
if ( _root._ymouse < 200 || _root._ymouse > 361){
speed = speed * 0.950000;
} else {
speed = -_xmouse / 100;
}
this._visible = true;
When in full-size mode, I would like the input area to be:
(_ymouse < 200 || _ymouse > 361) and (_xmouse < 28 || _xmouse > 729)
When in minimized mode, I would like the input area to be:
(_ymouse < 53 || _ymouse > 94) and (_xmouse < 40 || _xmouse > 216)
The below screenshots show the dimensions of the two areas (full size and minimized states) and the modified .fla and .swf are in the .zip.
Any suggestions would be greatly appreciated.
Menu Based-image To Jump To A Section In A Second Page
Can you help me in establishing this.
I have just established a menu based-image in flash in the main html page. Also I do have a second page has details on each option of the menu of the main page. I am trying to whenever I click on any option of the menu in the main page; this should take me to the specific section in the second page describing this option
Thanks a lot
[CS3|AS2]Profound Problems With Swf Menu Based Html Pages.
Dear Flash grown-ups;
I know this has already been discussed before, but I'm trying to make a site with HTML content, but a Flash menu bar. Menu buttons should change state depending on what the current page is, e.g. if you're on the Contact Us page, the Contact Us button is dimmed out as if unavailable. Since I don't know Java, the only possible method that I saw was making a separate duplicate of the same SWF menu for every page with the exception of the corresponding button in the menu being dimmed out in each duplicate. The obvious problem was that those SWFs would need to reload on every page load, resulting in a brief but significant (and annoying enough) disappearance and reappearance of the menu bar. At that time, logic suggested that this problem could be easily fixed by loading bitmap elements into MCs externally as opposed to importing them to the library. I naturally assumed that since all SWFs use the exact same bitmap files loaded from the exact same location, the aforementioned brief flashing would go away. How naive was that? I hit the wall and the deadline is closing in like the headlight of the chu chu in the tunnel. HEEEELP!!! :scared:
In addition to this, I'm experiencing yet another unexpected problem: aside from the main menu bar SWF, I also have a price calculation SWF. These two work fine if they are loaded into separate HTML pages; when both put on the same HTML page, however, they do not load properly/completely.
Any help would be super.
Thanks
PS. I read that the SWF menu HTML page thing can be achieved through iFrames, but my concern is that some browsers, such as Netscape, don't support iFrames. If you hav any suggestions on how to approach the problem, please let me know
[CS3|AS2]Profound Problems With Swf Menu Based Html Pages
Dear Flash grown-ups;
I'm trying to make a site with HTML content, but a Flash menu bar. Menu buttons should change state depending on what the current page is, e.g. if you're on the Contact Us page, the Contact Us button is dimmed out as if unavailable. Since I don't know Java, the only possible method that I saw was making a separate duplicate of the same SWF menu for every page with the exception of the corresponding button in the menu being dimmed out in each duplicate. The obvious problem was that those SWFs would need to reload on every page load, resulting in a brief but significant (and annoying enough) disappearance and reappearance of the menu bar. At that time, logic suggested that this problem could be easily fixed by loading bitmap elements into MCs externally as opposed to importing them to the library. I naturally assumed that since all SWFs use the exact same bitmap files loaded from the exact same location, the aforementioned brief flashing would go away. How naive was that? I hit the wall and the deadline is closing in like the headlight of the chu chu in the tunnel. HEEEELP!!!
In addition to this, I'm experiencing yet another unexpected problem: aside from the main menu bar SWF, I also have a price calculation SWF. These two work fine if they are loaded into separate HTML pages; when both put on the same HTML page, however, they do not load properly/completely.
Any help would be super.
Thanks
PS. I read that the SWF menu HTML page thing can be achieved through iFrames, but my concern is that some browsers, such as Netscape, don't support iFrames. If you hav any suggestions on how to approach the problem, please let me know
Controlling Menu Movie Based On Which Html Page Viewer Is On
I have a very basic issue involving using variables in an html document to control a Flash movie. I know this issue has been addressed before, but I just can't grasp how to solve my problem.
I have created a Flash menu that I want to use over and over throughout the website. As many menus do, this one has buttons that, on rollover, change colors, or "light up." When the user clicks the button and goes to a page referenced by the button, I want the button to stay "lit." In other words, if the user "lights up" the "about us" button and clicks, he will be taken to the "About us" page, whereupon he will see that the "about us" menu button is still "lit."
Obviously, the way to solve the issue of keeping the menu buttons "lit" is to have a separate frame in the menu movie for each page on the website. When the user is on the "about us" page, the movie advances to the frame where in the "about us" button is "lit."
Now, the mystery. How do I tell the menu movie which page the user is on and therefore which frame to send the movie to? I know it involves variables, but I am a very new newbie and do not understand how this would work. I have many different menu buttons, so I will need to have a whole list of such variables (as in head=about, head=contact, etc.) I know this issue has been addressed before, but if someone could provide an example of the correct coding for the menu movie and what to embed (and where) in the html I would be grateful.
Horiz. Menu With Button Widths Based On Dynamic Text Field Width + X
I have done multiple searches on the forum using terms such as "relative, width, dynamic" etc. to no avail. So please forgive me if this is a basic, should-know quesiton.
I have a main nav with a horizontal roll over sub nav. I would like the _x of each button be based on the width of each buttons' text label plus a couple extra pixels for space.
Following is a snippet of the code I'm using.
Code:
//this is borrowed from the XML drop-down menu tutorial
curr_item.label = curr_node.attributes.label;
// btn_label is a dynamic text field
curr_item.btn_label.autoSize = "left";
curr_item._width = curr_item.btn_label_width +5;
curr_item._y = y;
curr_item._x = x+i*curr_item._width;
For some reason a line such as:
Horiz. Menu With Button Widths Based On Dynamic Text Field Width + X
I have done multiple searches on the forum using terms such as "relative, width, dynamic" etc. to no avail. So please forgive me if this is a basic, should-know quesiton.
I have a main nav with a horizontal roll over sub nav. I would like the _x of each button be based on the width of each buttons' text label plus a couple extra pixels for space.
Following is a snippet of the code I'm using.
Code:
//this is borrowed from the XML drop-down menu tutorial
curr_item.label = curr_node.attributes.label;
// btn_label is a dynamic text field
curr_item.btn_label.autoSize = "left";
curr_item._width = curr_item.btn_label_width +5;
curr_item._y = y;
curr_item._x = x+i*curr_item._width;
For some reason a line such as:
How To Make The Event Based Block Into Procedure Based
i'd like to do something like this
var a = getXML("xmlfile.xml");
However, the xml component is event based. I only get data when onLoad is fired.
How to wrap this kind of event based function into my custom function?
Frame Based V/s Script Based Animation ?
I guess I'm looking for feedback about your methodoligies for animation. I've been practicing Actionscripting for 3-4 years now and sometimes I get stuck in the thinking that I have to animate everything by scripting the properties of movieclips. I know there are instances were its pointless to script animation or to animate what should be scripted.
What kind of balance if any do you peoples employ when doing a project. I'm working on one right now that I'm scripting out but sometimes I feel like I'm just doing extra work.
Non-screen-based And Screen-based, I Dont Understand
"If you want to include a preloader (a separate SWF file that loads your primary SWF) with your screen-based document, one way to do this is to create the preloader as a separate SWF file (non-screen-based), and load the SWF file for the screen-based document from within the preloader SWF.
You cannot create a preloader within a screen-based document, because all screens in a document are located on the first frame of the root Timeline, so you cannot call or load other frames."
1st Q. what is a non screen based swf?
2nd Q. what is a screen based swf?
3rd Q. where can i possibly get a preloader code that i can modify?
4th Q. how about the code to load the final movie?
5th Q. can someone explain this to me and the step by step process?
HELP PLEASE!! HELP PLEASE!! HELP PLEASE!! HELP PLEASE!! HELP PLEASE!!
THANK YOU IN ADVANCE GUYS
RFC: XOR Based Encryption
Hi everybody,
Since I had no satisfying answers on my search for an encryption function. I wrote one myself. If you want to use it, be my guest (included at the end). It would be nice, if you want to share your experience with me. I'm looking for comments on the concept and coding. I'm math challenged and I just started coding in Action script three weeks ago, so it won't be graceful.
It works like this:
1. It breaks an incoming string into pieces of the same size as the password
2. It does an XOR on the letters of a piece against the letter in the equivelent position of the password string.
3. The position in the string is add up to the number, to create random strings even with the same letter, you can toy with this to strenghten the encryption.
4. If the XOR results in 0 then I changed it into 255, because I use with XML sockets and they don't accept Character 0.
5. It will only work from ASCII 1 TO 127 (basically anything stored in a XML doc)
6. I return encrypted, or decrypted string (in the same function)
This is how I use it.
I request a session ID through a SSL connection (secure). The rest of the communication with the back-end runs through XML sockets (fast and evendriven). I encrypt and decrypt everything with the Session ID. Next time I connect, I have a different Session ID, increasing security.
Possible weaknesses:
This is where you geniuses come in. In point 4, you see that I change a result 0 into result 255. Otherwise the XML socket will terminate the send/receive session. Although there are numerous XOR situations leading to 0, it may be a mathematical weakness. You might know the answer to it. I have the feeling, that it is reasonable safe, but your comments would be very much appreciated.
Here's the code, have fun!
--------------- begin actionscript --------------------------
function crypt (cString, cPassword) {
nString = cString.length ;
nPassword = cPassword.length ;
nPiece = math.ceil(nString / nPassword)-1 ;
cPiece = "" ;
cResult = "" ;
cEncrypt = "" ;
// This loop breaks the string into pieces of the password size
for (nX=0;nX<nPiece;nX++) {
if (nX==0) {// First part is an exception
cPiece = cString.substr(0, nPassword) ;
}
else {// Extract a piece the size of the password
cPiece = cString.substr(nX*nPassword, nPassword) ;
}
// This loop XOR's the extracted piece against the password
for (nY=0;nY<nPassword;nY++) {
cP1 = cPiece.substr(nY, 1) ;
nP1 = cP1.charCodeAt(0) ;
cP2 = cPassword.substr(nY, 1) ;
nP2 = cP2.charCodeAt(0)+nY ;// Add position to the equation (stronger)
if (nP1==255) {
nP1=0 ;
}
nR = (nP1 ^ nP2) ;
if (nR==0) {
nR = 255 ;
}
cEncrypt+=String.fromCharCode(nR) ;
}
cResult+=cEncrypt ;
cEncrypt = "" ;
}
// This code piece is for the last piece of the string (smaller than passwordsize)
nRest = nString % nPassword ;
cPiece = cString.substr(nX*nPassword, nRest);
for (nY=0;nY<nRest;nY++) {
cP1 = cPiece.substr(nY, 1) ;
nP1 = cP1.charCodeAt(0) ;
cP2 = cPassword.substr(nY, 1) ;
nP2 = cP2.charCodeAt(0)+nY ;
if (nP1==255) {
nP1=0 ;
}
nR = (nP1 ^ nP2) ;
if (nR==0) {
nR = 255 ;
}
cEncrypt+=String.fromCharCode(nR) ;
}
cResult+=cEncrypt ;
return cResult;
}
------------------- end actionscript ---------------------------
Tile Based
Does anyone know of a good tutorial on making a tile based platform game in flash MX?
Web Based Flash Help
Ok, I have a a background image for a flash. (This is like a browswer thing). I want it to be like, when the user drags his mouse over one part, text will pop out and when they click it, it will bring them to a page. How I do this? DO I use flash mx?
Comparing A Var Based On A Var?
Where I am going wrong?!
I want to detect if answer and _level0.MCQ_answer_result+r
r=_name (MC name is 1,2,3,4 or 5)
answer is an imported var and can be either true/false - I guess a string?
_level0.MCQ_answer_result+r can be either true/false.
r = _name;
trace(r);
if ("answer==_level0.MCQ_answer_result"+r) {
trace("correct");
gotoandstop("correct");
} else {
gotoandstop("wrong");
}
If I change +r to a number all works fine?!
Thanks in advance
Oll
|