ActionScript 3.0 :: Using Modulus To Loop Thumbnails

Apr 7, 2009

I'm still pretty novice when it comes to as3 and am trying to use modulus to loop 14 thumbnails in an array. i have a property called firstThumb that keeps track of the first thumbnail being displayed and a forward and back function that looks like this

[Code]..

View 5 Replies


Similar Posts:


ActionScript 3.0 :: Odd Behavior With Modulus - Make 4 Rows And 5 Columns Of Thumbnails

Sep 22, 2010

Another thread I will hopefully resolve before someone replies. I'm making a picture gallery and putting a bunch of thumbnails in a container.

[Code]....

View 1 Replies

ActionScript 2.0 :: Thumbnails To Loop When They Hit End?

Aug 14, 2009

I'm building a slideshow with scrolling thumbnails. i'd love for them to loop- start back at 1 once they hit the last (54) image [url]...[code]...

View 0 Replies

Actionscript 3.0 :: Thumbnails To Loop When They Hit End??

Apr 11, 2010

I've searched the forums and seen topics on how to stop the audio playing from a video when you navigate somewhere else. However none of these solutions seem to work for me.

I have my buttons on the root timeline, and all my pages are seperate movie clips which are added to the timeline with labels. I tried the [code]...

but i also have audio streaming on the whole site so when i navigate to a page the audio stops. I'm not sure what else to try.

View 1 Replies

ActionScript 3.0 :: Unable To Get Scrolling Thumbnails To Loop Around

Oct 19, 2009

I made a Photo Gallery using flex builder 3. I am having a MAJOR MAJOR issue though. Currently I have thumbnails scrolling by, when clicked the fullsize image shows up in the canvas above. Unfortunately I cannot get the thumbnails to loop around. Here is my current movement code.

ActionScript Code:
public function defaultMovement(e:Event):void {
e.target.x += 1;
if (e.target.x > 338) {

[code]....

View 5 Replies

ActionScript 2.0 :: Loading Thumbnails In Loop Only Loads Last Thumb

Mar 26, 2010

I am trying to load a group of thuimbnails using Moviecliploader within a class function. Only the last image is loaded onto the stage. can anyone point me in the right direction, I have been wrestling with this for a couple of days.

[Code]....

View 9 Replies

ActionScript 2.0 :: Make Scrolling Thumbnails Loop Infinitely?

Aug 17, 2005

URL...Can anyone provide me with some code on how to make the scrolling thumbnails loop infinitely? So that when you reach the last picture on the scrollbar, it will loop to the first picture?

View 3 Replies

ActionScript 3.0 :: Flash Grid Gallery - Loop For Loading Thumbnails From XML

Oct 30, 2011

I am new to AS3, I am creating a gallery and stuck on a place. [URL]. Requirements:
1.) Need a nice loop for loading all thumbs, most important it should be physically separated, should not be looped via code.
2.) When I click on 1st button I must load first 4 thumbnails (which is already loaded), and with 2nd button it must load next 4 thumbnails from xml file, similarly with 3rd.

View 1 Replies

Actionscript 3 :: Exclude Repeated Modulus Values

Sep 22, 2011

I have an event firing that shows progress in a video:

[Code]....

What I'm trying to do is to send a notification to the server every five seconds, to indicate progress. I can round the seconds down to nearest integer using Math.floor. Then I can use modulus to get every fifth second. What I'm not seeing is how not to send a repeat for (e.g.) 5, since 5.02, 5.15, 5.36 etc. will all qualify.

[Code]....

View 2 Replies

ActionScript 3.0 :: True And False As Bytes Instead Of Modulus?

Sep 22, 2009

How do you find a odd or even number using bytes instead of modulus op?

View 8 Replies

ActionScript 3.0 :: Multiple EventListeners, Modulus And Rotating Cubes?

Feb 23, 2011

I've created a grid of 3D cubes using modulus, and the 3d cubes are were created from the Math and Flash Tutorial, if you are interested it is here http:[url]....What I am trying to accomplish (and it works, just the performance is lousy). All the cubes in the grid are inactive until the mouse hovers over them, then they start to rotate, and once the mouse moves off them they continue to rotate.Time for the script:

To create I create the grid like this:
public function FlowerMenu(){
var rowY:Number = 0;[code]........

this works, but after about 4 or 5 cubes have started rotating theperformance drops considerably.

View 4 Replies

Actionscript 3 :: Modulus / Grid Layout With Items Of Changing Size

Mar 3, 2011

I'm trying to figure an elegant way to display a certain number of items in a grid. I have a feeling the answer lies partly with modulus, but it's a little more complicated than that. I know how to lay out items in a grid based on a set number of columns. Something like this:[code]but what I want to do is set things up such that if there is only one item (j=0), the image covers the entire available area (stage.Width and stage.Height or, for simplicity, 1000px, and 500px). If there are 2 items, there should be 2 columns, with the images taking up half the width of the stage and all of the height (500x500), 3 items - 3 columns (300x500), 4 items - 2 columns & 2 rows (500x250), and so on, keeping a balanced grid layout but decreasing the dimensions of the items and increasing the number of rows in some sort of logical and balanced manner.

View 1 Replies

ActionScript 3.0 :: Flash Multiple EventListeners, Modulus And Rotating Cubes - Unable To Get Performance

Feb 23, 2011

I've created a grid of 3D cubes using modulus, and the 3d cubes are were created from the Math and Flash Tutorial, if you are interested it is here.What I am trying to accomplish (and it works, just the performance is lousy). All the cubes in the grid are inactive until the mouse hovers over them, then they start to rotate, and once the mouse moves off them they continue to rotate...

So to create the grid of cubes:

Code:
public function FlowerMenu(){
var rowY:Number = 0;
for (var i:int = 0; i < 190; i++) {

[code]....

So, this works, but after about 4 or 5 cubes have started rotating the performance drops considerably. I can imagine creating that many EventListeners isn't a good idea, but I can't see any other way of doing it.

View 3 Replies

ActionScript 3.0 :: Scroll Thumbnails By Scrolling The Mouse Left Or Right Over The Thumbnails?

May 9, 2011

Haven't been here for a while and I'm really rusty using Flash. I looking for a tutorial or some information on how to scroll thumbnails by scrolling the mouse left or right over the thumbnails.

View 3 Replies

IDE :: Tutorial 'Adding Thumbnails' / Reload Other Thumbnails Again?

Jan 19, 2010

I used the tutorial "Adding Thumbnails" to build a fotoshow. Adding another xml-file I have the problem,that I cannot reload(?) the thumbnails correctly.[code]Then I do not see any thumbnails,if(!) the new thumbnail list contains fewer elements than the old one and if the old thumbnail list was scrolled over the hit_right field before.It is seemingly necessary to reset the internal state of the movieclip. But how can I accompish that?

View 1 Replies

ActionScript 2.0 :: When Click The Link To A Gallery That Has A Lesser Number Of Thumbnails It Fills The Difference In Numbers In With Thumbnails From The Previous Gallery?

Dec 5, 2007

I've got a website with three links to three different thumbnail galleries. When I click the link to a gallery that has a lesser number of thumbnails, it fills the difference in numbers in with thumbnails from the previous gallery.

View 1 Replies

ActionScript 3.0 :: Create A Loop So Icons In Menu Continually Loop Indefinitely

Apr 16, 2010

I would like to create a loop so the icons in the menu continually loop indefinitly.[code]

View 2 Replies

ActionScript 3.0 :: Use A Loop To Create Text Field With The Loop's Current Value

Dec 11, 2010

I am attempting to use a loop to create text field with the loop's current value. The code looks like this:

ActionScript Code:
for (var i = 1; i<=10; i++) {
var 'nameHolder'+[i]+'_txt':TLFTextField = new TLFTextField();
'nameHolder'+[i]+'_txt'.x = 40
'nameHolder'+[i]+'_txt'.y = 40
'nameHolder'+[i]+'_txt'.text = "Hello World"
}

So essentially what it should do is create 10 text fields at 40, 40 with the text: "Hello World".

View 7 Replies

ActionScript 2.0 :: Infinate Loop For M.clip.the Looping Part Does Not Want To Loop?

Jun 13, 2004

i'm trying to do an infinate loop for my m.clip.the looping part does not want to loop...it loops back to my firrst frame even though there are two same picture in the movie clip.....here's a sample of what i use for the infinate loop script..

[Code]...

View 2 Replies

ActionScript 3.0 :: Loop With Varying Values Depending On Where Are In The Loop?

Jul 20, 2009

I have need of loops / nested loops that pick different figures depending on where you are in the loop. The whole function needs to run through 'ml' times. 'ml' is a dynamic figure. Loop 1 = While the loop is within the first 12 iterations, 'exconemp' must equal 100. For iterations 13 - 24, 'exconemp' must equal 102.5, for 25 - 36 it will be 105.06, for 37 - 48 it will be 107.69. This needs to change every 12th iteration until it has reached 'ml'. The calculation takes the value of the previous 'exconemp' and then multiplies that by 0.025.

Loop 2 = While the loop is within the first 120 iterations, 'abc' must equal 0.015 and any further iterations must use 0.01. This must also work in a way to figure out whether 'ml' is higher or lower than 120 and work accordingly. My main issue is this - how do I get the loops to run through as this: While the iteration is < 12, do this, THEN take the final figure (12th iteration) and start on 13 - 24, do this THEN etc etc. How do I produce a THEN statement? I can get the code to pick up the final values, but not change along the way.

[Code]...

View 6 Replies

ActionScript 3.0 :: Accessing Loop Variables Outwith Loop

May 5, 2011

Say, I had a loop in a function...

[Code]....

How would I refer to a in another function

View 8 Replies

Actionscript 3 :: Declaring Variable In Loop Or Before Loop?

Nov 9, 2010

Should I declare the _mcContainer var before the loop or no? (performance increase?)

for(var i:uint = _startIndex; i <= _endIndex; ++i){
var _mcContainer:MovieClip = _mcParent["i_" + _position];
}

[Code]....

View 1 Replies

Actionscript 3 :: Defining For Loop Iterator Before The For Loop?

Jun 2, 2011

Recently I'd been criticized for structuring my for loops like so:

var i:MovieClip;
for each(i in array)
{

[Code]....

This reads better for me personally, yet I'm being attacked for it. Is there any difference?

View 2 Replies

Actionscript 3 :: Compare Two Different Arrays Using For Loop Within A For Loop

Nov 29, 2011

basically I need a loop within a loop to compare two different arrays in my actionscript3 lottery game. I have attempted the loop but I cannot seem to get it to work ...

[Code]....

So basically within this code check_win is a button. Once the button is clicked it runs the loop. It is meant to take an instance of matches which contains 6 properties and loop until index is greater than matches. According to my output this is happening but the second loop doesn't appear to do anything.

View 1 Replies

ActionScript 2.0 :: 1 For Loop To Loop Multiple Arrays?

Aug 25, 2010

How do i word a for loop to make it loop through multiple arrays?I want 1 for loop to loop through multiple arrays in order to move/alter objects.I want to keep the arrays separate.

ActionScript Code:
characters = new Array();
characters[0] = male;

[code]........

View 3 Replies

ActionScript 3.0 :: Get The ID Of An Item In A Loop Inside A Loop?

May 15, 2011

I'm trying to make a matching pairs game. First of all I'm making all the tiles, using a loop inside a loop. How do I get the ID of an item inside that loop? My code looks like follow:

Code:
var matches:Array=new Array(1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8);
makeTiles();
function makeTiles() {

[Code].....

View 3 Replies

ActionScript 2.0 :: Loop Starts At 0 And Not 1 So The Loop Ends At 6?

Aug 27, 2005

dayVal = day.value;

for(dayVal = 1; dayVal/7 != 1; dayVal++)
{trace (dayVal);
}

the loop starts at 0 and not 1 so the loop ends at 6 does any one know how to resolve this issue?? its so that what ever number dayVal is it will be rounded up to a number that is Divisble by 7 .

View 4 Replies

ActionScript 2.0 :: XML Nested Loop - Access The Loop Later?

Feb 19, 2007

Basically, I have data organized by date in an XML file. I'm trying to make a website application that will allow the user to click on a date (in a text field) to see another textfield populate with all the data under that particular date. So far, all the information loads into the textboxes at the same time. How can I get it to only load information under a particular date when somebody clicks on that date?

Before I started this project, I was convinced I could do this by manipulating the [j] (see code below) in the myFunc2 function. Currently, it's set up to increment blank_mc._y by whatever value is returned by [j]. But for some reason this doesn't work. I feel that if I could atleas get this part to work - I could probably do the rest.

AS code:

Code:
function loadXML(loaded) {
if (loaded) {
var nodes = this.firstChild;

[code]....

View 1 Replies

ActionScript 2.0 :: Pass The X Variable From One Loop To Within Another Loop?

Mar 2, 2007

I have some code that seems to have a problem. I can't seem to pass the x variable from one loop to within another loop.

Code:
var myLv = new LoadVars();
var myNv = new LoadVars();[code]....

View 2 Replies

ActionScript 2.0 :: Have Pause Within 'for Loop' Before It Runs Through Next Loop?

Mar 20, 2007

wondering if anyone knows if its possible to have a pause within a 'for loop' before it runs through the next loop? heres the script i've built up so far, i'm running off other variables and arrays to pull in the logos and the animating in is working fine except that they all run in at the same time, basically what i want is that they would run one after the other with a 5 second gap between them..[code]so i did that and put wait(delay); after the var boxcounter=2; in each of the If statements.. but no luck... can anyone shed any light? or suggest a way it get it to hold for a few seconds before running though the loop again? or am i going about this in completely the wrong way??!

View 5 Replies







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