ActionScript 3.0 :: Rotating Menu - Creating Items Dynamically
Sep 1, 2011
I'm using Adobe Flash CS4 professional for this Actionscript 3.0 project. This error always shows up whenever I compile it:
"Line 65 - 1093: Syntax error"
Haven't I had the parentheses right?
Code:
//Save the center coordinates of the stage
var centerX:Number=stage.stageWidth/2;
var centerY:Number=stage.stageHeight/2;
//The number of items we will have (feel free to change!)
var NUMBER_OF_ITEMS:uint=15;
[Code] .....
I'm trying to build a set of menu items arranged vertically, and to be able to change their scale and position according to the current item selected, giving it some sort of depth effect. found a little bit about scaling menus, and used a script(nothing explained much, just cut and paste) that changes alpha an size of the menu items. I managed to add a swapDepths to bring to front the current item. I need now to figure out how to make the first item full size/alpha on load, move the items to make it look like they're rotating backwards, and get them to stay on their states when one of them is pressed (that is, one at full size/alpha and the others faded and smaller).The test file i'm working on can be downloaded from here, it's in FMX format.
I have created a rotating menu using AS3 from a tutorial here; [URL]I have it working now but I am trying to change the rotation axis, so the circle responds to the mouse vertically(Up &down) as at the moment it is hoizontally(left & right)
I am working on a project and am trying to create a menu that upon clicking a certain point rotates to a frame and then plays a clip. Something similar to this navigation would be great:[URL]..
I have been working on making a menu for list items. The file below has an animated menu. If you click on Artificial Intelligence on frame 60, it jumps to frame 61 (a specific section for that list item). How do I make the Artificial Intelligence button on frame 61 jump back to frame 60? I dont know where to add the action script for the function. I need to add a similar script to all 9 list items, do they go on one actionscript file? if so what location? [URL]
1. An XML list, which works just fine, retrieves between 3 and 15 strings (or menu names). These menu names are put into an array called, "aGalleryMenuID".
2. I want to be able to create a MovieClip and TextField dynamically for each string and place them on the stage dynamically. So if there are only 5, it will make five. 3 will only make 3. The long way of doing this is to create 15 MovieClips and 15 TextFields and use a loop to use addChild. This is okay, but what if later it is decided there needs to be 30 menu items. I want to avoid that and make this future proofed.
for loop that loops through the # of array items in aGalleryMenuID set the MovieClip's name to a unique identifier set the TextField's name to a unique identifier
I am trying to create a buttons menu with Array, and for some reason it only show the lastone on the list.
Here is my code (AS3): var nav1Items:Array = new Array("about", "work", "contact"); //Create text field var myFont:Font = new Calibri(); var myFormat:TextFormat = new TextFormat(); var label_txt:TextField = new TextField(); //Set text style [Code] .....
I'm creating / adapting a horizontally XML dynamically loaded menu. Load the text for each menu item from XML, and then I place this text in an array. Then later in my script I run loop through the array to add the menu items / text to the menu.I want the horizontal menu just to be a line of text so like:Menu item | Menu item two | Menu Item threeEach one gets put in a dynamic text box. I want to find out what the width of menu item one is so I can set the x position of the next menu item.I was thinking I could as I loop through and create each menu item, add the widths (using TextField.textWidth property) to an array and then use info in there to set the x position of the next menu item.
I have a rotating menu that sets the selected button to the 3:00 position once clicked. I need the labels for the buttons to stay in the upright position as they rotate with the button. I have attached an image. Anyone know of an action script that would keep the labels upright?
I know that's not the right code. Basically, that's what I want. When you "press" to drag, if you press "r" while dragging, it will rotate the "object" 25%.
I am working on a DVD User Interface for my final project in Photoshop. For extra credit points I am trying to figure out how to make the menu items to light up when the pointer is touching the menu icon.
I need to add a couple menu items to an existing Flash menu that I did not create, but I am having trouble figuring out how to make the buttons stay highlighted until you click another one. Best way to simply describe my problem since is to simple show you. The first 5 links work exactly as they should. But the last 2 (Careers and Client login) do not stay go highlighted on the loaded page. [URL]
scrolling 2 sprites. Look at the image below. [URL] FLA LINK (please take a quick look)[URL] I have this entire program working but i need to scroll the left menu and the menu where all the items are added. One more thing, the right menu can have only an few items at a time that do not need scrolling but when more are added then the scrolling will need to take effect.
As you can see from the image, even if rotationY property of all 4 items are the same, they do not rotate at same amount. Each image are inside of a container and containers are added to stage. Why is it the case?
I have downloaded a demo of a rotating menu from here: [URL]. But when I go to open and publish the movie nothing happens, it seems like there could be something missing, I can't upload the files as the folder is to large, you can download the files from the link above.
There is a fantastic mouse sensitive merry go round 'menu' within the kirupa site via the link:http:[url]....
It's situated under the first example, named basic camera panning.This is very hard code. I understand the principals, but personally am new to actionscripting, and therefore cannot piece together my own example from the code supplied, purely by not understanding the placing of the actionscripting.provide a *.fla file from the example that is explained in the link above?
browsing [URL]... I would like to implement a version of this 3-D rotating menu with several changes. I would like to change the orientation to vertical and once one of the numbered instances has been triggered I would like the instance to revert to its inactive state. I am a novice to actionscript but in this case I find the code even more confusing. I cannot see an instance on the stage that would trigger the events and the math functions of actionscript is still very much a dark art to me.
I am looking at creating a menu with three movieclip buttons on a main menu. I want to keep these buttons on the top of the screen at all times. I am opening different swf's and I want to make sure that the buttons are still showing. I know there is something with changing or swapping the depth of the movie clip when it loads the new swf's in, but I have not found anything that is seeming to work.
Able to direct me in the right direction as to how to go about adding preloaders for images on a rotating menu.
I am not after any kind of complex animation loader, just simple text that says 'Image Loading'
I have a few thoughts which are;
1.create moveclip with the words 'loading Images' some how load this in the background of main holder that loads images in so that when image loads it loads over the text 'Image loading' technically not a loader just text in the background.
2.create moveclip with the words 'loading Images' that when image loads in the text is replaced by image that loaded in? [code]...
I am trying to create a circle menu like the link below by searching through net I found some of the menus but not the exact one. Am attaching the menu which was created by me. The menu is not rotating properly. Link : [URL]
I'm trying to make a simple cube menu. The rotation is done by buttons. After finishing my code, im having some troubles with some rotations of the cube.
I have a circular rotating menu made up of a few buttons. When the mouse rolls over the a button in the movie clip (rotating menu) it stops. My question is how do I apply easing to it, here is the actionscript I applied to the buttons:
on (rollOver) { stop(); } on (rollOut) {[code].....
I've been having a spot of trouble working with this menu. My goal is to create this rotating menu with buttons that expand another movieclip with text/detailed information when you roll over it. What I'm having trouble with is making it usable, since it also needs to slow down/stop the frames of both movieclip's animations as the user approached/rolled over the button.I've searched for a couple of tutorials, but I don't understand them well enough to really manipulate the code for my uses. Especially since I seem to mostly find 3D Carousel tutorials that seem to be a little different
On the attached swf you'll see my slowly rotating menu. Each of the icons around the outside is a button which takes u to a specific page. When the user rolls over the button I want the menu to stop rotating, and if the user moves the mouse away I want the menu to continue rotating. Should I be using mc instead of a button?