ActionScript 2.0 :: Controlling Multiple MovieClips With One Button Click

Sep 28, 2007

I have a spreadsheet represented with three bitmaps within mcs. I'm using an mc with four directional buttons to allow scrolling (x and Y). The complication comes when I want the header to move on the x axis, but not the y axis. Also, I've got an mc with the row title column and I want that to move on the y axis, but not the x axis. This should be easy, but it is not for me. I've tried using an array, but with my onEnterFrame/incremental movement, how to break out of the onEnterFrame. I've also tried a function call as seen below. I can get things to move, but not quite right, tweaking only makes things worse. This one will move both of my mc's on the y axis, but only after clicking three times. The on the reverse trip, the mc moves jumps up and then increments correctly, only with that initial jump offset.

Let me show you my code (these variables are supplied by the loaded MC):
Code:
_level0.maxDown = -271;
_level0.stepY = 140.334;
_level0.maxUp = 150;
_level0.maxRight = -323;
_level0.maxLeft = 0;
[Code] .....

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Controlling Multiple Movieclips With One Button?

Jul 15, 2010

I'm working on a picture of cell phone, which I want users to be able to click on the number pad and have the numbers appear on the screen. Seems simple enough but I'm having trouble making the numbers appear in order just like phones in real life do. For instance, the screen starts with four *'s until "1" is clicked, then when the next number is clicked(let's say 3) I want the screen to display "13**" and so on.What I have is a movieclip with 11 frames (* and numbers 0 to 9), and 4 copies of them are each named p1,p2,p3,p4. They would be on the cell phone "screen" and display numbers clicked by the user. Then I have buttons acting as number pad with actionscript as follows:

ActionScript Code:
//for button "1"
on (release) {

[code].....

View 3 Replies

ActionScript 3.0 :: Scroll Bar Controlling Multiple Movieclips?

Feb 22, 2010

Instead of a scroll bar just controlling one movieclip..How could we get it to control multiple movieclips?
 
public class MainScroll extends Sprite
{     
//private var mc_content:Sprite;

[Code].....

View 3 Replies

ActionScript 3.0 :: Controlling Multiple Dynamic Movieclips

Sep 25, 2009

I need to dynamically attach a movieclip from a library and then make it move across the screen.This is quite easy for one movieclip instance, but what I need is to have movieclips spawn at regular intervals then move accross the screen.[code]My question is, how do I continuously attach movieclips without making so many variables? Is my method of attaching even alright for this purpose?

View 2 Replies

ActionScript 3.0 :: Controlling Multiple Levels Of Movieclips?

Jan 31, 2011

Background: Written a basic flash animation where a number of buttons control 8 signs, and each sign can have 3 different 'faces' There isn't one button per face, as each button can affect multiple faces. (i.e. button a changes signs 1 and 5 to faces x and y, button b changes signs 2 and 6 to faces q and z, etc)Each 'face' is made up of multiple 'sections', a bit like the rotating advertising boards or motorway signs, like this:(can't post links, don't have enough posts. Go to google images and search for this:rotapanel the_southit should be the first resultThis part isn't the problem, it works by having each 'section' as a separate symbol, and face symbols made of of either 4 or 5 of these section symbols. As the buttons are pressed, I hide and make visible the appropriate faces, and everything is good. The idea is that I can easily customise it later by switching out the underlying section symbols to update the whole thing, or create new 'faces' by combining the sections in different combinations. All nice and modular.

Now the problem: In order to try and make the thing look more realistic, I decided to animate the transition between faces by rotating the sections as vertical prisms (think of 4 or 5 toblerones stood on their ends, placed together to make a single surface. If you rotate them all about their centre points at the same time, you can create up 3 different 'faces').The animation is done and works fine, but the problem is controlling it. At the moment, each 'face transition' structure is this:

Face Trans. - Section Name(1) : Spin out animation: Static Graphic
________________________________Spin in animation: Static Graphic
____________- Section Name(2) : Spin out animation: Static Graphic

[code]......

View 1 Replies

ActionScript 3.0 :: Controlling Sound In Animation With Button Click - Error 2068

Apr 13, 2010

I seem to be getting this error message when I click on any of my button which are controlling the sound in my animations.
ArgumentError: Error #2068: Invalid sound. at flash.media::Sound/play() at Conventional1_fla::MainTimeline/pSound()

My sound is working and all the buttons are working as wel but this error message keeps popping up in the out frame.
stop()
import flash.events.MouseEvent;
import flash.display.Sprite;
import flash.media.SoundChannel;
var loadSnd: URLRequest = new URLRequest("");
var Snd:Sound = new Sound();
[Code] .....

View 2 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 :: Multiple Button Functions - When Click The Button, The Mc Does Not Stop Playing And The Text Does Not Show Up?

Nov 8, 2009

I'm designing an interface for a class, and the buttons that I am using all have multiple functions.For example, when the story button is clicked, I need the mc to stop playing and change to text (in the same window/screen, just no mc playing).  The mc is 31 frames long, but if there's a way to just make it loop continuously until told not to, Currently, my code looks like this:

stop();
story_btn.addEventListener(MouseEvent.CLICK,story);
function story(event:MouseEvent):void { gotoAndStop(32);}credits_btn.addEventListener(MouseEvent.CLICK,credits);[code]...

When I click the button, the mc does not stop playing and the text does not show up. 

View 6 Replies

ActionScript 3.0 :: Add And Delete MovieClips When A Button Is Click Using For A Loop?

Feb 18, 2010

I have a for loop that adds 5 movieClips to the stage at a random position every time I click the enterBtn, what I want to do if the enterBtn is click again remove the movieClips previously generated and leave only the new ones on the stage.

Oh, the number "5" in my for loop will be dynamically created so it may be different if the enterBtn is click again (I just used 5 for simplicity).

enterBtn.addEventListener(MouseEvent.CLICK, calculator,false,0,true);
function calculator(event:MouseEvent):void {
for (var i=0; i<5; i++) {

[Code]....

View 3 Replies

ActionScript 3.0 :: MovieClips - Remove / Hide Or Fade On Button Click

Aug 14, 2009

Basic problem here. I'm adding a bunch of movieclips using the addChild method. I simply want to remove/hide/fade them after a button click, but I am unsure of how to refer to the movieclips which I've just added.

Here is the code as it stands:
Code: Select allimport gs.TweenLite;
import gs.easing.*;
var strip:Bgstrip;
var contentBg:ContentBg = new ContentBg();
contentBg.x = 440;
contentBg.y = 166;
addChild(contentBg);
[Code] .....

View 1 Replies

ActionScript 3.0 :: Access A Button Within Multiple MovieClips?

Jul 20, 2011

I have the following code that loads MovieClips to the stage:

[Code]......

Let's say I have 18 MovieClips and on the 18th MovieClip I have a button that I need to access. How would I do that? The following doesn't work:

Actionscript Code:
sp.bm.Page18._homeBtn.addEventListener("mouseUp", goHome);

Gives error: Error #1010: A term is undefined and has no properties.

View 4 Replies

ActionScript 3.0 :: Button Tweens On Multiple Movieclips?

Nov 19, 2009

i'm trying to tween a movie clip, there are multiple, called clipsArray0, 1, 3 etc.. i can pull back the number via creating a listener but when i try and tween this i get an error as the propriety if a String.

How do i get the String name to reference the movieclip with the same name?

clipsArray[i].addEventListener(MouseEvent.ROLL_OVER, makeListener("clipsArray" + i));
function makeListener(name:String):Function{
return function (event:Event):void{

[Code]....

View 1 Replies

ActionScript 3.0 :: Multiple MovieClips With Attached Button?

Mar 10, 2010

I am thying to create a movieClip class that has a button attached at the right corner, and then load multiple instances at the stage. My problem is, that although one MovieClip is loaded correctly, all the rest have no button attached! How is that possible? what am i doing wrong???Also i would like to note, that besides the button i am attaching one more movieclip with and image (from a loader)Let me show you what I mean:

package multi{
public class Multi extends MovieClip{
var rightButton:SimpleButton=new SimpleButton();

[code]....

View 2 Replies

ActionScript 3.0 :: FadeIn + Fadeout Multiple Movieclips With One Button?

Jan 13, 2011

I'd like to build a fairly simple website where the pages fade between each other, after looking around and remembering what I could from having Flash MX (can't remember which release) all those years ago I figured the best way would be something like this:

Pages as movieclips, these would be placed inside the stage, i.e. with space around them, and buttons along on side which, when clicked will fade in one 'page', and fade out any others where the alpha is at 1.

That way, using only one frame in the main timeline and not having to create fading tweens in each movieclip I can navigate freely between the pages in any order.

I managed to get to the point where I have two buttons and to movieclips, when the first button is pressed a 'page' fades in, and when the next is pressed the first 'page' fades out as the second fades in. However the fade out is delayed and much slower than the fade in, rather than faster as it should be.

Here's the AS
page2btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_4);
function fl_MouseClickHandler_4(event:MouseEvent):void
{

[code]....

how I might restructure this to get a the visual results I want in the most efficient manner?

View 2 Replies

Professional :: Change Multiple MovieClips Properties When User Clicks A Button?

Nov 2, 2010

This seems like someting I should already know but I am working on a user interface that I want to be skinable.  I have about 8 different graphical elements and I want to change the appearance of these 8 different movieClips just by clicking a single button.  I thought I would just create a new keyframe in my main time line and then manipulate the movieClips but that changed the appearance of the movie clip on frame 1 as well.  Clarification:  I want to change the color of my user interface background and I want to change the color of some clickable images as well.  I want frame 1 to have a white background and I want frame 2 to have a red background.  Do I need to create more movie clips and drag them onto my stage or can I just use the existing movieClips since all I really want to do is change colors? 

View 5 Replies

ActionScript 3.0 :: Link Multiple Screens So That When Click Button It Will Go To Next Screen

Nov 23, 2009

I'm working on a project and I need to link multiple screens so that when you click a button it will go to the next screen.I know how to do this via the timeline but I have to do it in action script with addchild.

View 1 Replies

ActionScript 3.0 :: Controlling MovieClips Using Other MovieClips

Nov 20, 2009

Using Flash CS4 - AS 3.0

how to control a movie clip using a separate movie clip.

on scene 1 (2 frames long), i have 2 movie clips.

-bFind (24 frames long)

-textEffects (14 frames long)

i want to jump to frame 7 of the textEffect movieClip when i hover over bFind

i have my AS code in the first frame of the movieClip called "Bfind"

Code:
stop();
addEventListener(
MouseEvent.MOUSE_OVER,

[Code].....

View 5 Replies

MX04 With Movieclips Controlling Other Movieclips

May 5, 2010

I'm using flash MX 2004 Professional. What im trying to is the following: I have 9 movie clips, each has a "closed" and "open" state. Basically, when I click no.1 I want it to animate open, and then, when I click no.2, it must first check if any of the other clips are in their "open" state and if so, close them. I've worked with the following, but it doesnt seem to be working:

[Code]...

View 4 Replies

IDE :: Controlling Brightness Within Movieclips?

Nov 18, 2009

is there any way to control the brightness of a movie clip or button on mouse roll over so that it gets brighter when the mouse is on it? I could only find things for earlier versions of AS and i couldnt figure out how to change them..

View 1 Replies

ActionScript 3.0 :: Controlling Different MovieClips In Different Levels?

Feb 4, 2011

I have a movieclip on the main timeline with instance name "rpm_display". Inside that movieclip I have another movieclip with instance name "dial_graphics". My actionscript is on this timeline. The tween that uses "dial_graphics" drives "rpm_digital.rpm_counter.text" to compute a value based on the tween position of "dial_graphics".
 
I need to move the movieclip "rpm_digital.rpm_counter.text" outside of movieclip "rpm_display", but it will not work when its on the main timeline. I have tried having it on the main timeline and putting the actionscript there too using "rpm_display.dialgraphics", but this did not work...
 
should i use _parent? Not too familiar with AS3.
 
My CODE:
 
stop();
import fl.transitions.Tween;import fl.transitions.easing.*;import fl.transitions.TweenEvent;

[Code]....

View 9 Replies

ActionScript 3.0 :: Controlling MovieClips On Screen Via XML

Jul 15, 2009

I am trying to figure out how to control 3 movieClips on the screen via XML. I can successfully control one, but I want to control all 3 if the XML has the values.

Here is my code:
var ducks:Array;
var myLoader:URLLoader;
var i:uint;
var xPos:int;
var yPos:int;
var myXML:XML;
[Code] .....

I think I would need to create some sort of list for each specific node (arrayPos, xPos, yPos, isvis) and then run a for loop so that each movieClips values get assigned properly. I have uploaded the .fla and XML for anyone who wishes to view it.

View 1 Replies

ActionScript 2.0 :: Controlling The Attributes Of Movieclips Through Another?

Jan 14, 2009

I have a beginner question, apologies for rusty language and incorrect references.I have 3 movie clips on the stage. Their identifiers are 'dim', 'bright' and 'source'. What I want to happen is when the user clicks on the 'dim' movie clip, the alpha of the movieclip 'source' is set to 20. So I tried to write the following:

onClipEvent(mouseDown)
{
_root.source._alpha=20;

[code]......

View 1 Replies

ActionScript 3.0 :: Controlling A Movieclips Timeline From Within Itself?

May 14, 2010

How do I control the timeline from a movieclip from within itself?I made a menubutton for a school assignment. To make it, I created a movieclip of the button's graphic, with on the second frame the button again but with the menu open (haven't added anything in it yet).Opening the menu is as easy as

Code:
menu_mc.addEventListener(MouseEvent.CLICK,openMenu);
function openMenu(evt:Event):void{

[code].....

View 4 Replies

ActionScript 3.0 :: Controlling Nested Movieclips?

May 18, 2011

I have an animation of a spinning globe made from 2 maps placed back-to-back and a circular mask over them. The animation loops endlessly to simulate a spinning globe. This animation was made into a movieclip (globeSpin) which is nested inside another movieclip ontainer_mc). I want to stop the spinning effect when a user mouses over and start it up again when they mouse out. Code is below:

Code:
container_mc.addEventListener(MouseEvent.MOUSE_OVER, stopSpin);
container_mc.addEventListener(MouseEvent.MOUSE_OUT, startSpin);

[code]....

View 3 Replies

ActionScript 2.0 :: Controlling Movieclips With An IF Function?

Dec 6, 2003

I have created 3 movieclip buttons which have a total of 3 states eachUP, OVER and Pressed.What i am wanting to do is create a fuction that will change the state of an already pressed button back to its UP state. For exampleButton one is press and will stay in its state untill button 2 or 3 are presses then it will revert back to its up state.My way of tackling the problem was to target a frame in the movie clip that I wanted to change such as this:

on (rollOut) {
gotoAndPlay("ee");
}

[code].....

View 5 Replies

ActionScript 1/2 :: Click A Button On 2 Different Ways Shift Click Or Ctrl Click?

May 12, 2010

Lets say i have a button on frame 1. And if you press it normal, you ll get to frame 2. But then if you click it on another way, you ll get to frame 3. How do i do that easy?! With another way i mean like shift click or ctrl click or is it an easier way?

View 3 Replies

ActionScript 2.0 :: Controlling Objects (Sounds) Across MovieClips

Sep 9, 2003

I have a few movie clips running swf's and I need a play/stop button in one clip to control the audio in another clip. The buttons are in the _root clip and the audio is contained in an swf I load into an empty 'content' movie. I have labelled the frame containing the audio but can't seem to use the object hierarchy to access it. On a somewhat similar note, is there a way to have the root movie display the bytes loaded/bytes total of a swf loading over top of the root movie, i.e. in a content empty movieclip?

View 1 Replies

ActionScript 2.0 :: Controlling MovieClips (SWF) In Same Level With Buttons

Mar 4, 2002

I have a movie (back.swf) and this calls into another (menu.swf, level20). I want to control the movie clips to the level0 with the buttons on level20. I do that but I can't control in a random order.
For example:
I press button 1 and play movie clip 1.
I press button 2 and play movie clip 2.
But if I press again button 1 don't play it.
And if I press the button 3 play the movie 3 but don't allow to return to the button 1 and 2.
Every movie clips are in level0.

View 1 Replies

ActionScript 3 :: Anonymous Function As Click Handler Is Called Multiple Times Per Click

Aug 16, 2010

I have a button labeled 'blueButton' and I'd like to use an anonymous function to handle the click, like so:

blueButton.addEventListener(MouseEvent.CLICK, function(event:MouseEvent):void {
trace( "-----click detected-----" );
// now do other stuff
});

Problem is, the click handler is called multiple times per click. The number of times called seems to be random (sometimes 2, sometimes 4, sometimes 3 etc). could I be missing something in my code, or maybe I set up the button wrong?

also I noticed that it seems to always get called once on the first click. After the first click is when it starts getting called additional times, maybe that has something to do with it?

View 3 Replies

Flash :: Controlling Sub-movieclips Of A Loaded SWF From A Loading Class?

Feb 4, 2012

I have a compiled swf File (lets call it "cat.swf") that is loaded via the Loader Class of my Main movie. The cat appears without problems. But inside cat.swf there are two movieclips defined (lets call em "head" and "body"), and I have ye to find a way to get control of these from my Main movie.

When I check for numChildren of the loader Object it only gives me back one (an unnamed instance), if I cast that as a Movieclip to check for deeper children it continues all the way down like a tower of turtles.

View 1 Replies







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