ActionScript 3.0 :: For Loop To Control Buttons?

May 31, 2009

i tried to use for to control all the buttons i have but i get this error:1083: Syntax error: dot is unexpected.

Code:
var btnNum:Number = 6;
for (var i:Number = 1; i <= btnNum; i++) {
["L" + i + "_mc"].buttonMode = true;
["L" + i + "_mc"].addEventListener(MouseEvent.MOUSE_OVER, onOver, false, 0, true);

[code]....

View 3 Replies


Similar Posts:


Flash :: CS4 Buttons/can't Get Buttons To Control?

Aug 17, 2009

I am making a banner with an animation (Image change into movie clip "3D Spiral") and added buttons but I cannot get the buttons to control the animation.

View 3 Replies

Control A SWF Flash Loop?

Sep 19, 2011

We are going to make a lot of small flash animations with different messages, and put them on a big screen. They will be saved as SWF files.

Is there a framework or anything that enable us to make a easy controller for this, so we can control both a loop, but also play a specific clip when we want?

View 1 Replies

ActionScript 1/2 :: How To Control Only Loop Movie Twice

Sep 6, 2009

I'm a very beginner and I have downloaded a movie script and but I cannot make the movie stop looping.How I can change this script and make it stop after looping twice.[code]

View 1 Replies

ActionScript 2.0 :: AttachMovie In A Loop - Have More Control Over X/y?

Feb 24, 2005

i've got an attachMovie in a for loop, that creates a number of buttons, depending on how many names are in an array. as of right now i have the buttons created vertically, and im controlling the x value, like this:

allNames = attachMovie("menuButton",myArray[e],depth,{_y:allNames._y+allNames._height+5});
allNames._x = 520;

i'd like to do two things that this won't let me do:

a. have more control over the Y coordinate, so when the loop starts i can say 'start making the buttons at x: 520, y: 350, instead of them just starting at y: 0 like they are now.

b. have a way to check if the amount of buttons reaches five in height, if so, the array starts a new column at x: 600 y: 350. im trying to have it do that about 3 times, as the amount of buttons will vary from 5-15.

View 1 Replies

ActionScript 3.0 :: Cannot Control Mcs Created By A Loop?

Aug 25, 2009

simplied version:(there's a mc of the Box class in the library)

Code:
for (var i:int=0; i<10; i++) {
var box:Box=new Box();[code]......

error: access of undefined property box2

View 13 Replies

ActionScript 1/2 :: Control Only Loop The Movie Twice?

May 1, 2011

I have downloaded a movie script and but I cannot make the movie stop looping.How I can change this script and make it stop after looping twice.

the script as following:

time = "9";_root.star.circle_star._visible = 0;_root.star.circle_star.i = 1;_root.star.circle_star.onEnterFrame = function() {if (this.i%time == 1) {  this.duplicateMovieClip("circle_star"+this.i,this.i);} this.i++; if (this.i == 2) { exit;  }};
geraldinne.swf (25.5 K)

View 6 Replies

ActionScript 2.0 :: Control Loop Of Extload Swf?

Aug 14, 2004

I've lost the original fla for my swf and i never put a stop on it before creating it. can i stop it's looping without access to it's original fla?

View 10 Replies

Actionscript 3 :: Control Over Index Of Foor Each Loop?

Oct 12, 2011

I have tried this:

PHP:
<?PHP
$link = mysql_connect("localhost","root","");
mysql_select_db("dbname");
$query = "SELECT * FROM dress where dress_type='shirts' AND sex='male'";
$results = mysql_query($query);

[Code]...

how to have control over the strings in the for each loop?

View 2 Replies

ActionScript 2.0 :: Three Main Keyframes - How To Control Loop Function

Jan 4, 2009

I have a flash piece with 3 main keyframes/story ("story1", "story2" & "story 3") that cycles (and loops) from story to story, and 3 buttons that stop the cycle and take you to one of the stories

So on my first frame I have:
_root.mainMC.playing = "true";
function playOn(frame) {
/gotoAndPlay(frame);
}

Then on each keyframe I have:
stop();
setTimeout(this,'playOn',2000,"whatever the next frame is")

Then on button I have:
on (press) {
_root.mainMC.playing = "false";
gotoAndStop("story3");
}

I think somehow I have to have the button clear the function because for example, if I am viewing story 1 during the cycle and click 3, it goes to 3 and then quickly goes back to 2 and then stops on 3.

View 9 Replies

ActionScript 2.0 :: Slider To Control Multiple Swf's With Loop Checking?

May 18, 2010

I have to create a slideshow that loads 16 different swf's into a container_mc. Each swf has an image with accompanying voiceover.

I have the basic next, previous, first, and last slide buttons working but they want to add a slider bar that plays and u can slide to a specific section of the slide show. The slidebar is where I am having troubles.

Here is what I have so far...

This is the code on the first frame for the buttons

Code:
nowPlaying = 1;
lastPlayed = 0;
playingNext = 2;
autoPlaySlides = false;

[Code]....

For the slider I need to create some kind of loop that checks where the dragger is. If it is between 1 and 6 slideLabel = "Go to slide 1"; If it is between 7 and 12 slideLabel = "Go to slide 2"; and so on up to 16... when the dragger is released on the slide the user wants to go to it needs to load specified .swf.

View 1 Replies

ActionScript 2.0 :: Volume Control - Specific Object For Loop

Oct 23, 2004

In a movie a have a sound object, that i make it through (for example)
Code:
musica = new Sound();
musica.attachSound("fondo");

I have many other sounds in the movie but this object is for a loop... The problem is that when I set the volume for that object, through:
Code:
_root.musica.setVolume(0);
Or whatever value, all the other sounds are set to that volume too. I just want to mute the loop but also the buttons sounds are muted...

View 4 Replies

ActionScript 2.0 :: Slider To Control Multiple Swf's With Loop Checking

May 18, 2010

I have to create a slideshow that loads 16 different swf's into a container_mc.
Each swf has an image with accompanying voiceover.

I have the basic next, previous, first, and last slide buttons working but they want to add a slider bar that plays and u can slide to a specific section of the slide show... The slidebar is where I am having troubles.

It is partially working now, just needs to be tweeked... It is reading the variables, and setting the slide label text to the correct label, BUT it is only doing this once when the mouse is pressed and does NOT update when the mouse is dragged. I tried so many different ways and can't figure this out.

Here is what I have so far...

This is the code on the first frame for the buttons

Code:
nowPlaying = 1;
lastPlayed = 0;
playingNext = 2;

[Code].....

For the slider I need to create some kind of loop that checks where the dragger is.
If it is between 1 and 6 slideLabel = "Go to slide 1"; If it is between 7 and 12 slideLabel = "Go to slide 2"; and so on up to 16... when the dragger is released on the slide the user wants to go to it needs to load specified .swf.

View 2 Replies

ActionScript 2.0 :: Control Dynamic Clips On Stage W/ Loop Function?

Feb 4, 2010

have a mc on stage ('sq') and it gets duplicated using the loop.have a simple Tween function for over state called 'over'how would I write so that when rollover on (for example) sq3,apply the over function to sq2 and sq4 as well (the ones next to the target)?[code]

View 3 Replies

Control A Buttons Link Using Xml?

Jun 25, 2006

Does anyone know how I could control a buttons link using xml? That way the link could be changed anytime without having to open the flash source file and re-export the movie.

View 21 Replies

Control One Swf Animation With Another Swf Buttons

Nov 22, 2009

I m loading 2 swf in my flash file. The first one contain simple animation, and another one contains the button for play and stop. Now I want the control the first swf animation with the another swf buttons.

View 3 Replies

ActionScript 2.0 :: [CS3] Control By Keyboard And Buttons

Dec 22, 2008

I am creating a game where the user can control the character either by left or right keyboard buttons or by clicking on a left of right movielcip buttons. Currently, I can control the character using the keyboard but I cannot figure out how to add the MC button control. Here is my current code attached to the character_mc:

onClipEvent (enterFrame) {
if (_root.background_mc._x<=-3620) {
_root.background_mc._x = -3620;

[Code].....

Can I add another listener for either movieclip button (left_btn_mc, right_btn_mc) to the above code, or do I need to add the code to the each movieclip button?

View 7 Replies

MovieClip Control With Buttons - X And Y Coordinates

Apr 8, 2009

I'm putting together a site, that has 3 pages and I'd like the content to move into position when the menu button is clicked. So, 3 buttons etc, 'Home, Portfolio, contact" and one movie clip that contains the info. I'm not really a programmer [URL].

View 1 Replies

Professional :: Use Buttons To Control Keyboard

Sep 4, 2010

What im trying to do is create 8 button in flash using as2 to control certain keys on the keyboard. When i click a button ive created in flash i want it to trigger a key eg. "a"

View 1 Replies

ActionScript 2.0 :: Control External Swf Buttons?

Jul 24, 2004

I have a dynamic txt frame in my main swf.When buttons are selected,text from an external txt file loads into the text frame.This all works fine.What I would like to do is be able to load an external swf into an empty MC and then be able to dictate what the buttons on the external swf do (such as load text).The last line of the below AS is my attempt to path to a button that is on an external swf

//_root.1.noiseaudio.easing.theText.sad.onPress = function () {
loadTxt(path+"sad")
}//

but that didn't work.start here. This is on a frame on the _root swf.

System.useCodepage = true
path = "text/";
loadTxt=function(path){[code]...........

View 3 Replies

ActionScript 2.0 :: Control The Depth Of Buttons?

Nov 1, 2005

i'm trying to control the depth of some buttons which are all pretty close, and on mouse over, each buttons gets bigger (150% more or less), the problem comes when i want to control the depth in order to place the rollovered button above it's neighbours.... guess it could be done by actionscript...here is a link i found that explains how to do that, i'm quite beginner in flash and it is too much level for me, eventhought i've reatten it carefully.

View 1 Replies

ActionScript 2.0 :: Control A Swf With Mouse Buttons?

Apr 26, 2006

I need to control a swf with mouse buttons.

Left mouse --> nextframe

right mouse --> previusframe

I have some buttons in flash that must work.

View 4 Replies

IDE :: Control A Cross Fade With Buttons?

Feb 24, 2009

The AS3 script below is a cross-fade that is time-based with no user control. How do I keep the cross fade and control it with the "before" and "after" buttons? And with the API opening in its "before" state? And for users to be able to click and/or hover between the two. The link to what I'm trying to set up is:

http:[url].....The code is:

import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;[code].....

View 2 Replies

ActionScript 2.0 :: Control Draggable MCs With Radio Buttons?

Apr 22, 2009

Somebody knows if is possible to control an draggable MC with a radio button option?

I want a static movie clip turns draggable only when I set on a radio button.

View 3 Replies

ActionScript 3.0 :: Multiple Buttons To Control 1 Array?

Oct 22, 2009

I need 6 buttons to control the same array. it's a list of 12 things.

Button1 loads the first image in the array

Button2 loads to the next image in the array

Button3 loads to the previous image in the array

Button4 loads the 1st image in the array (yes two buttons to do the same thing but it's necessary)

Button5 loads the 4th image in the array

Button6 loads the 7th image in the array

Button7 loads the 9th image in the array.

on top of that if no button is pressed the next image in the array moves forward after 15 seconds.how to do this with a set of images. Eventually the Array will become an xml document which accesses images, and two text fields.

View 2 Replies

ActionScript 2.0 :: Using Buttons To Control Timeline Of MovieClip?

Feb 6, 2010

I do have a movie clip and inside that movie clip I have used a button in order to control the time line of the MC. I have divided the MC time line in to 4 parts. and according to the roll ove and role out the movie clip works. I want to change the scene when user click the MC clip. How can i do that? I have attached the FLA file to this one.

View 1 Replies

Control Buttons Navigation Of Website Through Classes?

Nov 24, 2010

I got a Website.as file that loads 4 library's movie clip's on the stage in certain positions.. Clip_A Clip_B Clip_C Clip_D

Clip_A loads on the top left side , Clip_B on top right , Clip_C in Middle and Clip_D low right position.

What i need to do and understand is how can i tell that class to find a button inside Clip_B and play a certain frame in Clip_C?

View 1 Replies

ActionScript 3.0 :: Create Buttons That Control MC That Also Move With MC?

Nov 17, 2011

I'm aiming to create a website that works just like this one[url]...

I want similar features, ie; rotating and expanding text controlled by mouse events and drop downs.

I'm not concerned about the drop downs currently, but for all I can think of right now, I am trying to figure out the best way to complete this task, and the code (AS3) that would be needed.

I've come up with a few thoughts (forgive me as I'm only moderate at Flash- can code, remember most of it, understand it, but can't always come up with the solution off the top of my head)

View 6 Replies

ActionScript 1/2 :: Sound Isn't Working With Control Buttons

Apr 10, 2009

I have a scene with a voice over. I have split the voice over in to multiple sound files (mp3). The voice over plays correctly as long as you don't use the btns. When the forward btn is used the the file goes to the correct frame in the timeline but won't play the sound. Next issue, after pausing then using play the scene plays but without sound.

[Code]...

View 5 Replies

ActionScript 1/2 :: Buttons To Control Video Not Working?

Nov 14, 2009

I have tried to make simple buttons to control play, stop, paus and play again of a video.When that did not work I found the below instructions, and made movieclips for the buttons to use with the imported FLVPlayback (with none skin).In step 2 I choose play (for the first play-button/movieclip).In step 3, there is no video to choose in the box - only my own movieclips.In step 4 - what's the difference?In step 5 - there is no setting field...Control video playback using behaviorsSelect the movie clip to trigger the behavior.In the Behaviors panel (Window > Behaviors), click the Add (+) button, and select the desired behavior from the Embedded Video submenu.Select the video to control.Select a Relative or Absolute path.If required, select settings for the behavior parameters and click OK.In the Behaviors panel under Event, click On Release (the default event) and select a mouse event.

View 1 Replies







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