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




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.



Ultrashock Forums > Flash > ActionScript
Posted on: 2002-10-10


View Complete Forum Thread with Replies

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

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.

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!!!

Actionscript And Menu Help Needed
Hi

I need a little help with some actionscripting. I am creating a menu system with four different options:

about us
portfolio
testimonials
contact us

I have a movie clip (paperMC) that is on the first frame of the timeline.

When the user clicks on about us, I want the paperMC to disappear and reappear with about us written on it.

But then if the user were to click on portfolio from the main menu instead, I want the paperMC to disappear and reappear with portfolio written on it, etc. etc. for the other menu items.

So, what I have is the same movie clip that plays when any of the menu items is selected, but then after the movie clip plays it needs to go to a different movie clip, depending on whichever choice the user has selected (e.g. about us, portfolio, testimonials, etc.).

Then once the user is in e.g. aboutMC, and they click on portfolio from the main menu, I need the aboutMC to disappear and the portfolioMC to play so that the paper re-appears with portfolio written on it.

Somehow I want to make this happen with action scripting.

Can anyone help me out?

Thanks

Sarah

Actionscript Menu Advice Needed....
Hi guys.
I'm making a flash menu but don't know the best way to do it and I wondered if anybody could offer some advice on how to implement it......I'll try to explain what I want.......

Let's say I have 5 thumbnail images which are my 5 menu options (namely a,b,c,d,e). On my screen I want to display 3 at a time, and scroll through them horizontally like so......

a B c
....click a right arrow
b C d
....click right arrow
c D e

etc etc. Note how I want the size of the thumbnail to change too. I hope this makes sense. I've not a clue how to do this, but am semi-ok at actionscript so advice would be appreciated......

Complex Actionscript Sliding Menu Help Needed
I have a fairly complicated little actionscripting task (at least for me), to be viewable in Flash 6 (and MAYBE Flash 5, TBD). I have to create a menu of movie clips that slide around and replace each other when clicked. So, say I had the following menu set up:

1 2 3 4

and someone clicked on "3"... the "3" movie clip would slide left to take the "1" clip's place, and "1" and "2" would slide right to make room. The new menu position would look like this:

3 1 2 4

Then, if someone clicked on "2", it would look like this:

2 3 1 4

All the while, these things have to expand and work as menus when they reach the left-most position. I've not seen any menus like this, and I can't find any open source AS samples to give me some idea how to do this. What I figure I need to do is set up some sort of class that has all the data I need for each movieclip:
what is it's current position in the "lineup"
what is it's X position
what is the movieclip we're dealing with
is the menu open or not)
And then have a script that shuffles them appropriately (heh... no problem, right? :-/) Right now what I have is this script:

---------------------------------
menuWidth = 320;
menuLeftOffset = 400;
numMenuItems = 6;
avgItemWidth = menuWidth/numMenuItems;

// level 1 arrays
clipNameArray = new Array("about","services","clients","work","people" ,"contact");
startXPos = new Array(0, 53, 106, 159, 212, 265);

// create the menuObject class
function menuObject (posNum, xPos, clipName) {
this.posNum = posNum;
this.xPos = xPos;
this.clipName = clipName;
this.menuOpen = 0;
}

// make an array of 'em
menuArray = [];
for (x=0; x < numMenuItems; x++) {
menuArray.push(new menuObject(x,startXPos[x],clipNameArray[x],menuOpen[x]));
}
---------------------------------

and six separate movieclips (menuObj1 through menuObj6), each named with the name of the menu item... so the menuObj1 movieclip instance is named "about," the menuObj2 movieclip instance is named "services," etc.

What I can't figure out (don't know) is how to "attach" the class to each movieclip, so the movieclip itself contains its relative data and can be addressed as such. I'd like to be able to say something like:

if (menuObject[x].menuOpen = 0) {
// the menu is closed and we can move this one to the #1 position
-- do close current #1 menu
-- move menuObject[x] to the #1 position
-- move the other menuObjects over to fill the positions to the right.

Put another way, I want to be able to shuffle the class data and make the menu objects respond accordingly. Is this the best way to go about this?Can anyone help me with this? This is pretty new territory for me.

Thank you immensely in advance!

Matt
------
mlaurenc@theworld.com
www.mattlaurence.com

Help Needed With A Flash-based Gift.
Hi.
I'm in the middle of making a flash birthday gift for a friend, but I'm having a little trouble with the last part.

I have an old photo of him that is ripe for parody, but I can't figure out how to achieve what I'm trying to achieve.

I want to create a speech bubble next to his mouth, which contains an input box. I also want a button in the bottom left hand corner that, when pressed, exports the picture of him, the speech bubble and the input box as a jpeg.

Thanks in advance for ANY advice provided, and happy holidays,
Robbie.

Help Needed Re: Shell Based Navigation
i've created a shell-based navigation interface, with the buttons pointing to various swf files. my problem is that the interface loads initially, and my home swf loads as it should, but i want an intro before you see the interface. i'm using movie curtains, which open and reveal the home swf, but you can still see my menu bar at the bottom.
how can i create an intro (the curtains) and then get the interface swf to load?

Platform Based Game Help Needed
i am trying to make my first platform based game i want to detect the curves on ground movieclip to make my character react accordingly. can somebody help me here.

Tile Based Stopping... Help Needed
Hey,

Im working on a tile based game in flash with the help of some online tutorials and guesswork. So far its going well aside from that my character seems too go partially inside the ground and in walls whenever i fall onto the ground or run into walls... anyone help me fix this? (ps ignore some of the obvious and pointess comments i put them there just to remind me of things i get confused by)


Code:



map_1 = [

[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
[1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1]];


tile_size = 20;
current_map = 1;
ground_acceleration = 1;
ground_friction = 0.5;
ice_acceleration = 0.1;
ice_friction = 0.90;
max_speed = 3
y_max_speed = 10;
xspeed = 0;
herox = 1;
heroy = 0;
hero = {};

// build world
function make_world(map) {

// create empty movie clip
_root.createEmptyMovieClip("level_clip", 1);

// .length defines the number of variables in the map array
var mapWidth = map[0].length;
var mapHeight = map.length;


for (var i = 0; i<mapHeight; ++i) {
for (var j = 0; j<mapWidth; ++j) {

var name = "t_"+i+"_"+j;

level_clip.attachMovie("tile", name, _root.level_clip.getNextHighestDepth());
level_clip[name]._x = (j*tile_size);
level_clip[name]._y = (i*tile_size);

level_clip[name].gotoAndStop([map[i][j]+1]);
}
}

//calculate starting position
hero.x = herox*tile_size;
hero.y = heroy*tile_size;
//place hero mc
level_clip.attachMovie("hero", "hero", 10000, {_x:hero.x, _y:hero.y});
}

_root.onEnterFrame = function() {

ground_under_feet();

walking = false;
if (nextleft == "free") {
if (Key.isDown(Key.LEFT)) {
xspeed -= speed;
walking = true;
}
}
if (nextright == "free") {
if (Key.isDown(Key.RIGHT)) {
xspeed += speed;
walking = true;
}
}
if (over != "air") {
if (Key.isDown(Key.UP)) {
yspeed = -20;
}
}
if (!walking) {
xspeed *= friction;
if (Math.abs(xspeed)<0.5) {
xspeed = 0;
}
}
if (xspeed>max_speed) {
xspeed = max_speed;
}
if (xspeed<-max_speed) {
xspeed = -max_speed;
}
if (yspeed>y_max_speed) {
yspeed = y_max_speed;
}
if (yspeed<-y_max_speed/1.5) {
yspeed = -y_max_speed/1.5;
}

hero.x += xspeed;
hero.y += yspeed;
level_clip.hero._x = hero.x;
level_clip.hero._y = hero.y;

};

function ground_under_feet() {

y_feet = Math.floor(hero.y/tile_size)+1;
x_feet = Math.floor(hero.x/tile_size);

y_left = Math.floor(hero.y/tile_size);
x_left = Math.floor(hero.x/tile_size);

y_right = Math.floor(hero.y/tile_size);
x_right = Math.floor(hero.x/tile_size)+1;

switch (map_1[y_right][x_right]) {
case 0 :
nextright = "free";
friction = 0;
break;
default :
nextright = "taken";
break;
}

switch (map_1[y_left][x_left]) {
case 0 :
nextleft = "free";
friction = 0;
break;
default :
nextleft = "taken";
break;
}
switch (map_1[y_feet][x_feet]) {
case 0 :
over = "air";
friction = 0;
yspeed += ground_acceleration;
break;
case 1 :
over = "ground";
speed = ground_acceleration;
yspeed = 0;
friction = ground_friction;
break;
case 2 :
over = "ice";
speed = ice_acceleration;
yspeed = 0;
friction = ice_friction;
break;
}
}


// start functions
make_world(_root["map_"+current_map]);
make_hero();

Help Needed Developing A Flash-based Test
Hi.
I was hoping that one or 2 of you actionscript gurus could help me out in a sticky situation; I need to create a flash-based memory test for school, but I have no idea how to go about it!

Here's how the memory test should go:

Introduction.
Nothing fancy, a page of text explaining the test and a "go" button.

HERE'S WHERE IT GET'S HARD
A page of words appears on screen and a song plays.
There's a 15 minute countdown timer in the corner, and when It runs out, the words dissapear.

Ok, onto the REALLY hard part.
The test subject is presented with a chatroom-like screen.
They have to type in as many words as they can remember into the text-entry box (and each word they type appears in an above box).
Once again, there's a 15 minute timer, and when it runs out, screen clears.

NOW. THE PART THAT MAKES MY HEAD HURT.
I need the subjects to be told how many words they typed in were on the first list.

Nothing more. Just how many words they got right.

PLEASE help. I know this is easy for a lot of you, but It's completely beyond me!

[F8] Fade Out Based On Timeline Length - Help Needed
Is it possible to have a script detect when an MC exits the timeline?

Imagine that you put an MC on the stage in frame 1, and that you add an empty keyframe on frame 50, causing the MC to vanish from the stage. I want to be able to paste a script onto frame 1 that fades the MC in (easy...already done) and have the SAME script fade the MC out at the end of its time on the stage (hard! how do I detect the upcoming empty keyframe?)

-aaron

Frame Based Easing, Into Time Based Easing (in Actionscript)
i have code to move something from placeA-placeB based on time...then i also have a code to move something from placeA-placeB with easing, but its based on frames...can someone supply me with an easing formula based on time?

Flash Animators Are Needed For Project Based Work
Hello,

My name is Rich and currently work full time at a financial institution that i'll go without naming. I also have a IT solutions firm that has been in business for over a year. www.paradoxsolutions.com

Things are really starting to pick up for us and i want to take our site to the next level. I designed this site over a year ago and merely services as a presence on the web. Seeing that my time is limited I cannot re-design the site from scratch nor can i put forth the effort to learn flash extensively. I recently purchased a template that will save me time...now i want to modify the template and make it mine. Really the template is a 2advanced studios rip-off--looks remarkably similar to www.foundstone.com. Anyways, i have contacts in france and germany that do flash work for me from time to time and are dirt cheap. They will be unavailble due to extended projects they both have and i must now look for some good flashers that can help me in my projects. The first of which is re-designing www.paradoxsolutions.com. If anyone is interested in making some money on the side for some flash animation work please contact me ASAP, so i can give you more details. Ideally i want to work with someone who is friendly and willing to work things out. Arrogant designers need not apply. Please contact me at vinhaisr@paradoxsolutions.com for further details. Thanks for your time.

P.S.
I'm quite anxious on getting this underway, so please contact me ASAP to work out details.

Flash Animators Needed For Contract Based Work
Hello,

My name is Rich and currently work full time at a financial institution that i'll go without naming. I also have a IT solutions firm that has been in business for over a year. www.paradoxsolutions.com

Things are really starting to pick up for us and i want to take our site to the next level. I designed this site over a year ago and merely services as a presence on the web. Seeing that my time is limited I cannot re-design the site from scratch nor can i put forth the effort to learn flash extensively. I recently purchased a template that will save me time...now i want to modify the template and make it mine. Really the template is a 2advanced studios rip-off--looks remarkably similar to www.foundstone.com. Anyways, i have contacts in france and germany that do flash work for me from time to time and are dirt cheap. They will be unavailble due to extended projects they both have and i must now look for some good flashers that can help me in my projects. The first of which is re-designing www.paradoxsolutions.com. If anyone is interested in making some money on the side for some flash animation work please contact me ASAP, so i can give you more details. Ideally i want to work with someone who is friendly and willing to work things out. Arrogant designers need not apply. Please contact me at vinhaisr@paradoxsolutions.com for further details. Thanks for your time.

P.S.
I'm quite anxious on getting this underway, so please contact me ASAP to work out details.

XML Based Horizontal Image Scroller (src Included): Some Help Needed.
Hello,

I'm currently working on an XML based horizontal image scroller. Since I'm stuck with 2 annoying problems, I decided to share the project's source, and count on the experience of others to try and help me.

As you'll see, it's running pretty good already, only 2 major problems left:
- Bug when scroller moves to the left: the images overlap, and I simply can't locate the problem.
- The tooltip: I can't seem to get it into highest layer (level), on top of everything. When tracing it's depth, it says '-16383'.

As for the rest, I still need to implement 2 remaining functionalities:
- If the sum of the images (width) is smaller than the width of the movie, the images need to be duplicated untill theirs sum's width exceeds the width of the movie.
- I'd like to add a nicer mouseOver effect.

Especially help on the 2 bugs would be greatly appreciated, the other remaining functionality I'll work out myself...

[source removed]

Building A Flash Based Website For The First Time. (Mountains Of Help Needed)
First off, heres my email (severance@gmail.com), so that all you kind (and bored) flash pro's can communicate with me outside of these forums.

Secondly, this is the site i would like to base mine around (in style) jkrowling.com

Thirdly, to the problem at hand - Im completely new to flash
If possible, could someone either post a link to an indepth website creation (using flash) tutorial, or (preferrably for me) could they get in touch via my email and guide me through it.

I have skills with photoshop, html, javascript and css but im new (and confused) to actionscript, and all other things flash.

Thankyou for any help you can offer,

[help Needed]Making A Text/browser Based Rpg With Multiplayer Elements
Hello there, I know what you think now " AMAGAWD ANOTHER N00b who found out he wants to make rpg". But naah, right im just a beginner, i dont know much about actionscript or java/c just the basics and I need some help with few things, willing to pay if its needed.

What am i working on:

It will be a browser based flash rpg game, not platform but more like text and pictures based, like for example gladiatus. I also want to include few mmo elements ( high scores, maybe some arena battles but i dont seek help with that now) . Idea is done, everything is written down on a piece of paper and i started making few maps, lands, buttons etc.

Help needed with :

First of all I need to make up something like login system, and i have absolutely no idea how to make it ( if anyone could help with this please try talking about it in simple "human" language so i can understand and check things around.) No idea if that could be done in flash, but probably not.

Second thing i need is some kind of Character creation and saving system. I wanted to use shared objects for saving. So far i found out how to make a simple gay text, save and load it but that doesnt really give me any sense how to make my game save with that.

I seriously need help with character creator, or something similar. You wont move your char in this game so it shouldnt be hard to make, as i said, text/pic based, maybe it could just be a little picture in some corner of your screen, not more, not less.

Well i aleready forgot half things ive written down in here:S lol, i will need help with few more details later but thats not really important atm

Thanks for reading this gay text

oh and i know basic javascript, html and xhtml if that could help:P

[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.

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

Actionscript Based Drawing
im looking for resources and or books on creating lines.. drawn by flash.. example.. i would like to be able to process an equation.. over a certain range of numbers and have it displayed on the screen..


Now, i know that this could be done just by replicating mc's at every interval.. but i would like to be able todo it another way.

Pop-up Error In IE6 (based On Actionscript.org Tut)
Hi,

I followed the little tut here:
http://actionscript.org/tutorials/be...er/index.shtml

And it works perfect in Safari.

But IE6 is giving me this error: "Invalid argument."

Its saying this line of code is the "invalid argument"
window.open(URL,Name,features);

here is what I have for the javascript:
<!--
function spawnWindow(URL,Name,features) {
window.open(URL,Name,features);
}
//-->

I dont get it?

To test out what Im talking about, please go here: http://www.alphateck.com/vr3/index2.htm

And click on one of the two "latest pieces" either the koi or the a-neg logo. And see if you get the same thing?

Thanks a mill.

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? …;-)

Actionscript-based Text Animation In MCs
i used the script that's the template in flashtyper, it works when i use the same script and names in the main scene, but when i put it into a movie clip, it no longer loads the text, does neone know if i have to change some variables because it's a movie clip?

Using Actionscript To Load Mc's Based On Frame
hello

i have say for instance a main movie that has frame labels 1-10...say i have three movie clips names mc1, mc2 & mc3...i need mc2 diplayed at frame 3 and mc3 displayed at frame 7 with mc1 being displayed at the rest (1, 2, 4, 5, 6, 8, 9, & 10)...how would i go about using actionscript to do this...thaks a bunch

regards,
mark

Importing A Pic Based On User & Actionscript
I was wondering if anyone knew how to let the user enter a loctation of a picture (on their hardrive, like C:My Documentspic.jpg) and Flash 5 would take that pic and put it into a movie clip. And would it have the regular properties (_xscale, _yscale,etc.)?

Thanks for your help.

Actionscript Based Scaling Effect?(MX)
Can someone give me a quick tutorial on how to create a scaling effect with just actionscript in Flash MX? I can change the _xscale and _yscale properties of MCs but the change is instantaneous. I need something that would create a tweened scaling effect with just the script on the rollover of a button or movieclip. Any help would be appreciated.

How It's Based The Random() Function In ActionScript?
Hi to all,

This is a little difficult question: I'd like to know how it's based the random() function in actionscript.

In C language I think is based by the frecuency's crystal quartz clock in the computer, but I don't know how it's obtained in actionscript.

Thanks.

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