ActionScript 2.0 :: For Loop - ThumbNail Functions - Get The Second To Correspond To The First

Jun 4, 2008

I'm using a For loop to program the buttons on my website. The first time I use i to associate the thumbNail functions it works well. However when I actually do click the button, the second i always refers to 12 - the final number in that loop. How do I get the second i to correspond to the first i? I know its an easy fix, but I'm stumped!

[Code]....

View 3 Replies


Similar Posts:


ActionScript 2.0 :: Thumbnail Loop - Middle Thumbnail Represents The Photo In Target_mc?

Nov 28, 2007

I have made a image-viewer. I've this AS for the viewer:

Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
function loadXML(loaded) {[code].....

Now i would like to make a loop for the thumbnails so they don't have a beginning or end(Now when i scroll to the right the thumbnails stop at the last thumbnail, i want it to begin at the first thumb again).I'm also trying to make that the middle thumbnail represents the photo in target_mc.

View 1 Replies

ActionScript 2.0 :: Loop A XML Thumbnail Pane?

Nov 26, 2007

I am having a very hard time figuring out how to get my video player playlist (scrolling thumbnail pane) to loop the thumbnails so that it never ends. The thumbnails are loaded dynamically through XML.Here is my code:

Code:
var nc:NetConnection = new NetConnection();
nc.connect(null);

[code].....

View 1 Replies

ActionScript 3.0 :: Getting Scrolling Thumbnail Gallery To Loop Itself

Aug 14, 2009

I've created a scrolling thumbnail gallery that draws images from a blog feed. I would like for it to loop itself after all the thumbs have gone through so the first image of the 2nd loop is immediately after the last image of the 1st loop.

View 6 Replies

ActionScript 3.0 :: How To Loop Scrolling Thumbnail Gallery

Aug 14, 2009

I've created a scrolling thumbnail gallery that draws images from a blog feed. I would like for it to loop itself after all the thumbs have gone through so the first image of the 2nd loop is immediately after the last image of the 1st loop.

View 9 Replies

ActionScript 2.0 :: Make Xml Driven Thumbnail Scroller Repeat(loop)?

Dec 12, 2007

I am creating a thumbnail scroller and I have everything set to work. The last final issue I'm having is this:

The scroller displays 25 items.

8 at a time.

When you page left/page right it scrolls to the next(or previous) 8 thumbs in the list.

This is what we want to happen:

Once the final (25th) thumb is reached it starts over on the first thumb again and we are back at 1. So that it becomes an endless loop.[code]...

View 1 Replies

ActionScript 3.0 :: Add Different Images To Correspond To The Correct Veribage?

Jul 27, 2009

I have a flash drag and drop quiz that i would like to add different images to correspond to the correct veribage when the users have dropped the folder. I have the text working ok when the user drops the folder (i.e. "yes, that is correct!", I'm sorry, that's not correct.", "Congrats, you're finished!")
 
I don't know where to start and I was wondering if it was possible to add an image from the library to the stage when the corresponding text is displayed on the stage?

[Code]...

View 9 Replies

ActionScript 2.0 :: Button Alpha To Correspond With Images?

May 6, 2006

I'm creating a portfolio which has tiny square buttons (one for each image) and arrows buttons to navigate through the portfolio. Everything is working just great, but I need the square buttons, when pushed, to change alpha or turn to dk grey instead of lt grey, and remain this way until the next image is shown. They should act as indicators as to where you are in the portfolio. The code I'm using is as follows:

picture._x=24;
picture._y=31;
function loadXML(loaded) {

[Code]....

View 1 Replies

Creating 10 Functions Using For Loop?

Feb 25, 2012

I am trying to create functions using a for loop for my buttons' over and out listeners.I would like to stick to a naming convention but it does not seem to work. I am trying to create 10 buttons with function names like btnOver1, btnOver2, etc...

Code:
for(var i:int=0;i<=9;i++){
function btnOver[i](e:MouseEvent):void{

[code].....

View 1 Replies

Actionscript 3.0 :: Get Button To Correspond To Current Movie Clip?

Mar 5, 2010

I am working on a simple flash project that has 4 movie clips that animate on their own in the main timeline with a tween, changing every 20sec. to the next clip. I have flags set up so that you can also use the buttons to go to a specific frame.[code]...

View 13 Replies

ActionScript 2.0 :: Assigning Functions Via A Loop

Jun 21, 2004

I am working on a page where three differnt buttons effect one movie clips properties, the one movie clip will go to its rollover state when any of the buttons are on rollover, hmm, that sounds about right] i have assigned functions within a loop and the rollovers, rollouts and instance in the loop have been defined for all but the movieClips dont go to the right place. the code i have used is this....

[Code].....

View 3 Replies

ActionScript 3.0 :: AddEventListener Functions With A For Loop?

Nov 17, 2010

I have four buttons with eventListeners that call four different functions. Each function name starts with the button name. like this:

Code:
btn1.addEventListener(MouseEvent.MOUSE_OVER, btn1function);
btn2.addEventListener(MouseEvent.MOUSE_OVER, btn2function);
btn3.addEventListener(MouseEvent.MOUSE_OVER, btn3function);

[Code]....

View 2 Replies

ActionScript 2.0 :: Assigning Functions Via A Loop?

Jun 21, 2004

I am working on a page where three differnt buttons effect one movie clips properties, the one movie clip will go to its rollover state when any of the buttons are on rollover,i have assigned functions within a loop and the rollovers, rollouts and instance in the loop have been defined for all but the movieClips dont go to the right place....the code i have used is this....

Code:
for (var i:Number = 1; i < 4; i++) {
// attaching ALL rollovers to effect the interactive button
this["invis"+i+"_btn"].onRollOver = this["chart"+i+"_btn"].onRollOver = this["inter"+i+"_mc"].onRollOver = function() {

[code].....

all the traces show up correct but not the gotoAndStop on the movieClip (inter+i+_mc_)'s.

View 3 Replies

Flex :: Make SelectedIndex Correspond To Selected Item In ComboBox?

Jun 21, 2010

Isn't there a better way to accomplish this?[code]...

All I want to do is make sure that when I update the item that the comboBox is pointing to internally, that it's selectedIndex also update so that the label within the ComboBox reflects the new value.

View 1 Replies

Assign Functions To Dynamic Movieclips In A Loop?

Dec 8, 2009

I have done this same thing in ActionScript 3, but am not familiar with ActionScript 2, which I am forced to use for this project. I am loading products into a SWF via XML and attempting to add a click event to each dynamically-created movieclip. Simply tracing the text from a node in XML will do for now. I'd like to assign a property called "desc" or "description" to each movieclip and have it trace that property's value when clicked. Here is the relevant portion of my code as it stands[code]...

View 1 Replies

Actionscript 3 :: Functions: Possible To Return A Value Inside Of A Loop?

Feb 4, 2010

I am trying to find the index from an array using a loop function, but I am getting an error:

private function findMatch(matchValue:int):int {
for (var i:int = 0; i < playersList.length; i++) {
if (playersList[i].value + matchValue == levelTarget) {

[code].....

View 4 Replies

ActionScript 3.0 :: Creating Functions With Variables Using A Loop?

Dec 11, 2010

I've created a basic function that sets a movieclip to a certain state depending on which mouse cursor is set (determined by a variable called txt_cursor). I can hard code this to work great for the one single movie clip but potentially have to do this for 624 other movie clips so obviously want to create a for loop to reproduce this.

Code:
chk1.onRelease = function()
{

[code]........

View 1 Replies

ActionScript 2.0 :: Assigning OnPress Functions In A Loop?

Sep 16, 2006

is that possible? i'm a complete beginner when it comes to flash and actionscript... so if it sounds like i dont know what i'm talking about... it's because i don't!let me describe my situation...I have about 20 boxes... and on each box i want to assign the onPress to trace the value corresponding to an Array at element "i" in the console...instead of doing:

Code:
box1.onPress = function() {
trace("the value is: "+hypotheticalArray[1]);

[code].....

View 1 Replies

ActionScript 3.0 :: Loop Through Array To Call Functions?

Feb 9, 2009

I want to loop through a array to call my functions, but can't get the syntax right, is this possible?

var myArray:Array = ['function1()', 'function2()'];
for (var key:String in myArray){
// I want to call the function here
}

View 1 Replies

Professional :: Coding Component Buttons To Correspond With Radio Button Selection?

Feb 19, 2010

I have 6 radio buttons spilt into two groups of 3 and one normal button.The first group of radio buttons correspond to colour and the second to texture.My aim is for the user to be able to chose a colour, then chose a texture by use of the radio buttons, click on the normal button named 'create' which loads a corresponding jpg onto another part of the stage according to the colour & texture selection.I am totally stuck on how to code the buttons so this can happen.I'm sure there is an easy (ish) way for this to happen, but i'm no expert and haven't been able to find it or work it out.I've named each radio button individually, grouped the two sets of radio buttons for colour & texture and named the normal button.

View 6 Replies

ActionScript 2.0 :: Dynamically Creating Functions Inside A Loop?

Dec 8, 2011

After loading the movieclips and text boxes dynamically I now need to get the movieclips to perform a unique function when they are pressed, for testing purposes I am using the getURL funciton and linking to the boxNo. This is just so I can see what is going on!At the moment they are all linking to the boxNo that is pulled from the last run of the loop.

for (var i = 0; i < loc.length; i++)
{
var boxNo = loc[i].location_ID;;

[code].....

View 1 Replies

ActionScript 3.0 :: Create Multiple Functions Inside Loop

Mar 22, 2012

I'm trying to create multiple Functions inside a Loop.[code]I essentially want to make 4 Functions called closeButOut1, closeButOut2, closeButOut3 and closeButOut4.This is the error message I get:

-1084: Synax error: expecting identifier before this.

-1084: Syntax error: expecting leftparen before rightbracket.

View 12 Replies

Actionscript 3 :: Creating Anonymous Functions In Loop With Not The Same Arguments

Dec 25, 2010

I want to make in loop set of buttons, and add to them some events, but anonymous functions is the same. I write example code:

for(var i:int=0;i<5;i++)
{
var button:SimpleButton = new SimpleButton(...);
...

[Code]....

And I want to trace 0,1,2,3.. from click buttons instead of 4,4,4,4 ..

View 1 Replies

ActionScript 2.0 :: OnRelease - Cannot Scroll Thumbnail Until Roll Off The Click Thumbnail

Jul 10, 2007

I am making a gallery, which you can view here:[URL]ok, firstly, when you click a thumbnail, you cannot scroll them until you roll off the click thumbnail, and I'm not sure why. is it just a movieclip thing? or can I put some code in to re-get focus of something? ok, now for the two general questions:

1. When you roll over the thumbs, they go up, sometimes they flick back down though, even though you are rolled over them still. is this just because they are moving?

2. Does anyone know why when I add this:

[Code]...

View 1 Replies

ActionScript 1/2 :: Xml Thumbnail + OnRelease Function On Each Thumbnail?

Oct 11, 2009

Im trying to create via xml and a for() loop a thumbnails wiewer and each thumbnail have a simple onrelease function.....but my probleme is that my 'container' movieClip and 'BT' movieClip dont show when I export the movie...also when i trace()them the output is empty. maybe is because they are inside  x.onLoad(xml){} function ? At the end of the script you can remove // before the trace() function for ckecking in the output panel. here is my code:

xml file: TumbLoader.xml
<?xml version="1.0" encoding="ISO-8859-1"?><slideshow><photos thumbnail="thumbnail/1.jpg" /><photos thumbnail="thumbnail/2.jpg" /><photos thumbnail="thumbnail/3.jpg" /><photos[code]...

View 8 Replies

IDE :: Timeline Inside These Movie Clips And The Timeline On The Main Scene Have To Correspond To Work

Jun 10, 2009

why the timeline inside these movie clips and the timeline on the main scene have to correspond to work. [URL]

View 1 Replies

ActionScript 2.0 :: To Thumbnail, Or Not To Thumbnail ?

Jul 5, 2007

Yes, I'm making a photo gallery like everyone else. I'm making it so people can order pics from the site. There are going to be about 500 photos per album in 5 different categories. The photos can be shrunk down to about 60kb a piece. If I use the actual pictures as thumbnails, just scaled down, the total size of all the pics will be about 30mb. I know this is a lot.

Either way, the people looking at the album will most likely look at nearly all the pics so they will be using up bandwidth either way. Plus, if I use the actual pics as thumbs the user will not have to wait to see actual pic when it's clicked on because it's already loaded. A preloader is annoying to me. I do realize a preloader would be wise when loading the thumbs. Just dislike them after you click one for the big picture.

So is using shrunken thumbs a necessity or if the big pic is under a certain size it shouldn't matter if I use it for a thumb also?

View 1 Replies

Flash - Calling The Function Within That Function And Later Stopping The Loop - Starting And Stopping Functions?

Jan 7, 2012

I am making a character walk. This code will make him wobble to the right and when thats done it will trigger him to wobble to the left and then call the function again to continue the loop.I can get the loop to work fine by calling the function but how do I STOP the function? Also I want to call it later on. Is there a way to start and stop a function?

function wobble()
{
var ws = .1;
var dis = 1;

[code]....

View 2 Replies

Actionscript 3 :: Calling Functions In Functions And Avoiding The Player To Crash / Hang?

Oct 6, 2011

I have a series of calculations i'm doing over a bunch of objects stored in a array. Each function is pretty CPU demanding but if you only run one function, it just works fine.

[Code]...

View 2 Replies

ActionScript 3.0 :: Import Vs Include - Basic Functions To Be In BasicFunctions.as And The Make A Library For More Specific Functions

Jun 6, 2010

I've got a project thats getting a bit big, so Im taking the actionscript out into separate as files. I want all the basic functions to be in BasicFunctions.as and the make a library for more specific functions. I find that a lot of people use the import statement but I cant get that to work with a simple Hello World trace, yet the include statement works fine (see attached). I understand that import/include work differently, but which is the better method? If import, then is that heavier to work with. Any rate, what's the best way to organise code when it gets to the 1000+ lines?

[Code]....

View 9 Replies







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