ActionScript 2.0 :: Making A Multiple Row Menu With Arrays?

Sep 18, 2007

I'm trying to make a navigation of sorts using a bunch of thumbnails there will be 3 columns and 3 rows.I have made an array of images, created a button with an empty movie clip in it. And I am attempting to make a 3 by 3 grid of buttons based off the array... Here is my code.

cubicThumbs = ["Bracelet_Nugget_1_thmb.jpg","Earring_Nugget_1_thm b.jpg","Necklace_Nugget_1_thmb.jpg","Earring_Nugge t_1_thmb.jpg","Necklace_Nugget_1_thmb.jpg"];

[code].......

View 1 Replies


Similar Posts:


Arrays :: Fastest Way To Merge Multiple Arrays?

Sep 26, 2011

I'm trying to write a function where I can specify any amount of array, and the return value will be an array containing the contents of all of the specified arrays.I've done this, but it seems like a really slow and ugly way of doing it:

var ar1:Array = [1,2,3,4,5,6,7,8,9];
var ar2:Array = ['a','b','c','d','e','f','g','h'];
function merge(...multi):Array[code].....

Is there an inbuilt and more efficient / nice way of achieving this? The result does not need to be in the same order as the input - completely unsorted is fine.

View 3 Replies

Actionscript :: 3 - Making The Drop Down Menu Close Whenever The Mouse Is Not Over The Menu

Nov 21, 2011

I'm creating an animated (in and out) drop down menu. I've managed to get the menu to open when the user mouses over, with the buttons all selectable. However I can't seem to find an efficient method of making the drop down menu close whenever the mouse is not over the menu. Actions:

[Code]...

View 2 Replies

ActionScript 2.0 :: Making Algorithm Using Two Arrays?

Jul 25, 2008

I am programing with AS2 so here goes my question: I want to create an algorithm that looks up an array and finds the nearest integer in it. Lets say i have different numbers like 1, 2, 4, 5, 8, 9 and i want to find the nearest member to 6 from those numbers. How should i build the algorithm. So far i'm using two arrays and two inside loops, but cant find the right way to make it.

View 3 Replies

ActionScript 3.0 :: Multiple Arrays Containing Multiple Objects?

Oct 11, 2009

What's the best way to say:

if(this.object in same array as that.object)

with multiple arrays containing multiple objects?

View 2 Replies

ActionScript 3.0 :: Targeting Arrays And Making Them Invisible?

Jul 23, 2009

I'm having trouble targeting elements of an array using AS3. I have five buttons in an array named botons.
 
var botons:Array = [boton_1, boton_2, boton_3, boton_4, boton_5];
 
Each button goes to a different page, but they all are on the same layer like navigation bar. When page 1 is visited button 1 should be invisible and the others visible. When on page 2, button 2 should be invisible but all others visible.
 
I used the following to make the entire array invisible and it works.
 
for(var i:int; i<clips.length;i++){botons[i].visible=false;}
 
How can I make each button invisible when visiting its page, but make the rest visible?

View 8 Replies

ActionScript 3.0 :: Targeting Arrays And Making Them Invisible

Jul 25, 2009

I'm having trouble working with buttons in an array. I would like to target specific button and make it invisible while the others remain visible. Each buttons goes to a page (first, second, third, etc.). There are five buttons named button1... button5. I'm using AS3 in timeline.

Problem: when I click a button, it doesn't get invisible and I get this message:
TypeError: Error #1009: Cannot access a property or method of a null object reference. at subtraction_fla::MainTimeline/goPNext()

Here is my script:
stop();
var button= [button1, button2, button3, button4, button5];
button1.addEventListener(MouseEvent.CLICK, goPNext);
[Code] .....

View 6 Replies

Ajax - Making Multiple Asynchronous Calls To Fetch Result From Multiple Services In The Single Click Of A Button In Flex?

Dec 27, 2010

In one of our project we are using flex for front end, blazeds/java in the backend. Its an existing code where services are prewritten. I have to make calls to 3 services in the backend (basically 3 remote objects) and get their result and store the result in an object and show the data of this object in a view.
Now in front end we are using Flex and Parsley Framework. I was thinking of the following approaches.

1) Making commands for each service call and storing the result in a shared object (model) and then displaying this model in the view. In this approach the problem is some services are needed in some other web pages, but they donot need the same model. How should i handle this scenario ? Should i make a asynchronous remote call and fetch the result and then again dispatch and event with the event object storing the result.

2) Making a service call , wait for the result then make another call and wait for the result and then make other call, not sure if this is the right way ?

View 2 Replies

ActionScript 3.0 :: Two Arrays, One List Menu?

Apr 8, 2011

Let's say I had an AS file that populates a list menu in my movie from ListOneArray.That list menu is used as a navigational tool and when the user clicks on a list item it would take them to, say, frame 2.On frame two I would like that list menu now to have a different list from an array in the AS file called listTwoArray.What would be the best way to go about that? Or, if I have the list menu populated from the AS listOneArray and the user moves to frame 2 by the navigation, can I on frame two access the listOneArray in the AS and change the data?

View 3 Replies

ActionScript 2.0 :: Building Menu + Submenu With 2 Arrays

Sep 13, 2004

I'm building a menu with action script, the menu has an interval, so the items follow after each other. This is not a real problem. But the submenu is. I want to build it the same way, with the interval. But the menu array contains, some years, and with a loop a go trough this array and flash builds it with the items of the array. The submenu array, contains the quantity of the year, so the quantity of subbuttons.. But i can't fix it to use the number in the array as quantity of subitems. here is the code:

[Code]...

View 1 Replies

ActionScript 2.0 :: A Menu With Loops - Arrays And MADNESS [CS4]

May 13, 2009

it's a scrolling list with a series of movieclips within it which are each different items. When you click one of the items, that movieclip that you have clicked runs a little function which tells it to move 10 pixels to the right smoothly. It also checks to see if any of the other movieclips have been previously selected, and if they have, it runs a function that tells them to move back 10 pixels to the left.

[Code]...

View 6 Replies

ActionScript 2.0 :: Building Menu + Submenu With 2 Arrays?

Sep 13, 2004

I'm building a menu with action script, the menu has an interval, so the items follow after each other. This is not a real problem. But the submenu is. I want to build it the same way, with the interval. But the menu array contains, some years, and with a loop a go trough this array and flash builds it with the items of the array.

The submenu array, contains the quantity of the year, so the quantity of subbuttons.. But i can't fix it to use the number in the array as quantity of subitems..

here is the code:

Code:
menuYearItems = [0, 4, 6, 5, 9];
menuYear = ["2004", "2003", "2002", "2001", "2000", "INFO"];
i = -1;

[code]....

View 1 Replies

ActionScript 3.0 :: Loading Two Arrays - Navigation Menu And Title

Jun 29, 2009

I am trying to load 2 arrays. The first array is a dynamic navigation menu (linkName). The second array is the corresponding title that is loaded in a dynamic textfield. For example if link1 is clicked I want the dynamic textfield to display title1 from the array if link2 is click display title2 and so on. As of right now the dynamic navigation loads fine I just cant seem to figure out a good way to do this without writing a bunch of if statements. I would like it if the programming assumed the that the length of the title array is always going to be the same length as the link array and it finds the corresponding index.

var linkName:Array=["link1","link2","link3","link4"];
var pageTitles:Array=["title1","title2","title3","title4"];
var menuHolder:Sprite = new Sprite;
addChild(menuHolder);
// loading the navigation bar
[Code] .....

View 2 Replies

ActionScript 3.0 :: Multiple HitTestPoint With Arrays?

Mar 26, 2009

How would I change this to do a few test points,if (mydude.hitTestObject(myratarray[i])){

is it along these lines? if (mydude.hitTestPoint(myratarray[i].34,myratarray[i].12,true)){

View 2 Replies

ActionScript 3.0 :: HitTestObject With Multiple Arrays?

Aug 23, 2011

I have been making a game and have run into some problems I want to make a hitTestObject between multiple arrays, i have tried something like this:

for(var i:Number = 0; i < array1.length; i++)
{
array1[i].y -= 10; //Moves object up
for(var a:Number = 0; i < array2.length; a++)

[Code]....
 
When i run it, some object will detect the collision and will output "hit", but some will ignore that. I have also noticed that some object in the array1 stop running the move code (array1[i].y -= 10) after i have added another array.

View 4 Replies

ActionScript 3.0 :: Using Arrays To Load Multiple Swf-s?

Oct 26, 2009

I'm trying to load multiple external swf files into my main movie and arrange them on the stage (talking about 20 or more mc-s) So far I figured out how to load one single mc like this:

Code:
// Make request and loader
var request:URLRequest = new URLRequest("pano1.swf");
var loader:Loader = new Loader();

[Code].....

load an array of swf files and add them all to the stage?

View 11 Replies

Making A Cube Menu?

Sep 18, 2009

making a cube menu like this? [URL] post here or mail me to evilmini_me_2002@[URL] or add me on msn: metilic@[URL], ty for your time

View 1 Replies

ActionScript 2.0 :: Flash8 : Search Multiple Arrays For A Value?

Feb 26, 2009

I am attempting to search multiple arrays (over 300) for a specific value which will then determine if that question is to be loaded. I have used these over the years as the quizzes simply loaded questions randomly. Now I am appempting to move this into a computer adaptive test format. I have most everything worked out except for this part which is the key to the project.

What I have is 300+ arrays like the ones below. Once a student answers a question either correctly or incorrectly a difcal value is assigned. It is that value I need to search for to determine which question to load.

For example if the student answered a question incorrectly and the difcal was calculated as -4.03 (difcal values are always in array element[0]) I would need to search the all arrays to find that value and then load that array into the question function.

Code:

var q1:Array = new Array();
q1[0] = -4.03;
q1[1] = 0.57;

[code]....

View 2 Replies

ActionScript 3.0 :: Loading Multiple Xml Files Into Arrays

Apr 7, 2010

im trying to load 7 xml files into a question array, im unsure as to whether i need 7 arrays or if i can load it into one single array. each xml file has a set of questions for a quiz i am making i have managed to load the first set of questions but i dont really know how to proceed

View 2 Replies

ActionScript 3.0 :: Sorting Multiple Arrays At Different Indexes?

Aug 5, 2009

I just have another really quick question about Arrays, this time about Sorting them. I have just re- written my code to work for matching values from 2 arrays and then adding them to the screen.
 
however it seems as my matching is way off, it matches the items that are at the same index, which is not always the case
 
The output for the matches, which should be side by sideis as follows (which is incorrect) Therfore i am trying to find values at diffrent index levels
 
DunlopbabolatWilsonwilsonHeaddunlopAdidasheadBabolatslazengerSlazegerprincePrincevolklVolkladidas
 
I tried to sort the Array, but it seems as though the array, cannot be sorted the way i want it. I simply wanted to sort it Acending, but changing it to lowecase would not do what i needed it to do.

This is the code, matchInfo function should do all the work

package {
import flash.display.*;
import fl.transitions.*;
import fl.transitions.easing.*;

[Code]....

View 8 Replies

ActionScript 2.0 :: Calling From Multiple Arrays In One Loop?

May 23, 2007

I have two arrays - one for movieclip buttons and one for images. The idea is - rollover a button and it loads it's respective image. I have a loop for the button array that pretty much loads each button and creates a rollover state for it. At the moment it just traces what button the mouse is over. The problem is trying to load the correct image based on that button. The way it is now - it will only load the same image for all the buttons.

Code:
tagPosition = 0;
viciousImgs = new Array("vaI1_mc", "vaI2_mc", "vaI3_mc", "vaI4_mc", "vaI5_mc");
viciousButs = new Array("va1_mc", "va2_mc", "va3_mc", "va4_mc", "va5_mc");
vicious = new Array("vicious_mc", "uTitle_mc", "uTxt_mc", "uButs_mc", viciousImgs, viciousButs);

[code]....

View 2 Replies

ActionScript 3.0 :: Creating Multiple Arrays Of MovieClip?

Apr 27, 2011

I'm currently trying to program a flash game using actionscript 3.0 where users would step on insects. Basically, I added multiple instances of insects movieclip and remove them by using hitTest function. When the mouse_mc. hitTestObject(insect), there were times the insect was not removed.

Here are the errors I encountered:
Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display:isplayObjectContainer/swapChildren()
at SteppingGame/hitTest()
Error #1009: Cannot access a property or method of a null object reference.
at insectmc/onEnterFrameEvent_SF()

Also, is there anyway I could simply my code like creating multiple arrays of movieclip insectmc?
Here's my as3 code:
package {
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.ui.Mouse;
import flash.display.Sprite;
[Code] .....

View 2 Replies

Buttons - Making A Drop Down Menu?

Sep 2, 2009

I am attempting to revamp a website. The buttons that are currently being used are only gifs that are hyperlinked and there are almost 12 buttons... I think that this is a ridiculous amount of buttons to have. It looks very cluttered. So, I figured I should make 6 buttons and just fit the rest of the buttons into subcategorized buttons. And the way to do this is to create flash buttons with drop down menus. To see what I mean, go to this link and look at their buttons:
 
[URL]
 
Their buttons drop down into menus with sub-categories. I want to do this.
 
So far, I have gone into flash, created buttons and made graphics for the "Up" "Over" "Down" and "Hit". I have also added the menu buttons and graphics for the "Over" of each drop-down button-menu.
 
I have even provided the action script to link each button to where I need it to go.
 
HOWEVER, here is where the problem is. When I roll the mouse over the button, and then move the mouse down to click on one of the buttons in the drop down menu, the menu disappears, OF COURSE, because the mouse goes off the hit. I can't make the hit bigger, because the menu shouldn't open unless it's on the main button. But without the hit being bigger, the menu will always disappear.

IN ADDITION, I've never used flash buttons on a website before. I'm just using HTML. How do I link the button to the page? Do I save the file as a .swf flash file? And link to 6 different files? Or do I save the buttons in a line, and just use one link?

View 2 Replies

ActionScript 2.0 :: Making A Pause Menu?

Feb 21, 2009

I have no idea how to make it so that if you press p once, it pops up, and if you press it again, it dissapears.I want it to start off screen and when you press the button it goes to coordinates inside the screen.here's what I have:

ActionScript Code:
if (Key.getCode() == 80) {
if (_root.pause1 == 1){

[code]....

View 1 Replies

ActionScript 2.0 :: Making A Magnifying Menu

Feb 6, 2003

making a Magnifying menu i have text menu and i have this idea that when user scrolls on top on the button it will enlarge a little and at the same time it will enlarge other menu buttons. I don't know how to explain it but it should look something like MAC X menu.something like that

View 1 Replies

IDE :: Making Menu Items Slide Up And Down?

Jun 24, 2009

I am just getting to know flash, i am working on my website fully made in flash cs 4 and photoshop.

My problem is that

how can i make a fade out on my menu?

when one of the menu-buttons is clicked a "new wall" is sliding down. how can i make the "new wall" to slide up before a new wall is sliding down?

here is a link to want i have made so far- [URL]

View 3 Replies

Copying Arrays - Instance Variables - Multiple Animations?

May 17, 2009

- I tried, when I first started making this site, to load all of the artwork images into an array and then copy the array before resizing them for their specific functions (being seen as thumbnails or as full size pics.) Unfortunately, I ran into the well known issue of Array cloning only creating a pointer to the same group of items. I tried the newArray = oldArray.slice() trick, but it didn't seem to work. Finally, I just loaded the images twice into two separate arrays, and it works, but I hate this solution. Anyone got a better one?

- I'm trying to maintain some sort of connection between the two sets of Arrays so that, for example, when someone clicks on Thumbnail 15, Fullsize Image 15 will open up but I couldn't find anything that worked. Renaming the Instance Name dynamically didn't seem to work and adding an Instance Variable dynamically doesn't seem possible either as I can't make the Class I am working with (Sprite, in this case) dynamic ahead of time. I'm sure there's a simple method for this.opens up, the different animations seem to interfere with each other and slow each other down (they also seem to get interference from the time taken to load the image Arrays.)

View 9 Replies

Flash - AS3 Basic Parsing Multiple JSON Arrays

Nov 6, 2009

I'm having a problem parsing a JSON file in AS3. Im trying to parse multiple JSON arrays, but don't really know how to get to the next after accessing the first one. My JSON file looks like:

{ "term": [ {
"id": 4211,
"place": "NEW YORK CITY"
},
{"id": 2675,
"place": "WASHINGTON (DC)"
[Code] .....

I can get the data from the first array, but how would I structure my code so that I could iterate through 2 or more "term" arrays?

View 2 Replies

Arrays :: Import Multiple Sounds In A For Each Loop, Actionscript 3

Mar 1, 2011

So im recreating my ear training program with more effective coding so i can add on to it. original i did.

//88 C8
var mp3Req88:URLRequest = new URLRequest("88.mp3");
var mp3_88:Sound = new Sound();
mp3_88.load(mp3Req88);

I basically got 88 sound files (each note of the piano) doing this code 88 times for each sound. with mathamatical equations made my ear training program.

Is there a simpler way to import these sounds in a loop of some sort so i dont have to do this 88x for the piano and however many times for the other instruments i will be including?

thus var i have tried things along the lines of below with failure

var i:int;
for (i = 0; i < 5; i++)
{
var pianoMP3Req+i:URLRequest=new URLRequest("piano/"i+"mp3");

[Code].....

View 1 Replies

ActionScript 3.0 :: Make 2, 3 Group Of Animation Using Multiple Arrays?

May 5, 2010

I m trying to make 2, 3 group of animation using multiple arrays, A group having 10 circles and those circles r moving from X to Y (using mainFunction). while moving... i m calling subFunction for blink effect (here my problem comes). So each circle are having two different animation (moving, blinking) ,

also going to make 2, 3 group by calling "mainFunction" Experts pls help me to resolve this problem, or sugges me some other way to make this animation

[Code]...

View 0 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved