ActionScript 2.0 :: Button Click In Duplicated Movieclip?

Nov 4, 2009

Before telling you my problem in actionscript, I would like to explain on how the system works. Please bear with my long explanations.I have a list of data that need to be display out. I've created one movieclip and I named it table_mc. Inside the table_mc, I put 2 dynamic text and one blue box with alpha 0. In order to display a list of data out, I used a table component in flash to duplicate the movieclip, table_mc. It saved me from doing a "for loop".

I wanted the list of data to be clickable so I converted the 2 dynamic text in table_mc, into movieclip. I named it table_but. When I clicked onto table_but, the blue box will appear, alpha 100 to show that it is being clicked.Here's the problem. I've done an actionscript in table_mc. In the list example, when i clicked onto no '2', the blue box appear and if I clicked onto no '5' the blue box for no '2' should disappear. Unfortunately the blue boxes will appear there together when i clicked onto no '2', '5' and '7' because they shared the same movieclip table_mc. Is there a way to do it when the blue box can only appear at a time?

View 2 Replies


Similar Posts:


ActionScript 2.0 :: When Click The Duplicated MC Then It Will Trace "button Clicked"

Oct 5, 2007

i just want that when i click the duplicated MC then it will trace "button1 clicked" then the other goes also like that...here is the code...

[Code]....

View 3 Replies

ActionScript 2.0 :: CS3 Movieclip Button - Click To Play, Click To Stop?

Jun 21, 2010

I am building a flash interface and I would like a menu where it is hidden to begin with (just a tab). You click the tab to expand it, and click again to collapse it. I've made a movieclip with animation of the menu opening up and closing, but I can't seem to work out how I'd go about making the movieclip open and close properly.

View 4 Replies

ActionScript 2.0 :: Duplicated Movieclip Doesn't Inherit Loaded Movieclip?

Jun 27, 2006

I'm loading an image into a blank_mc within a movieclip called 'background_mc' using the MovieClipLoader object; when the onLoadInit for the MovieClipLoader object is fired, i then attempt to clone my 'backgound_mc' object and the loaded image it contains so i can do something with it (i,e a funky masky/blur thing, not important right now)I'm successfully loading my image into the blank clip within background_mc, the onLoadInit behaviour fires and duplicates background_mc once the image has been loaded, but in a disappointing turn of events, my clone of background_mc no longer has an image attached, and has instead reverted back to it's original form, just as ti was before it had the jpeg image loaded in.

View 3 Replies

ActionScript 2.0 :: Click A Button Twice To Run Movieclip

Sep 26, 2009

I was just wondering why it is that after I have clicked a button to run a movieclip, I have to click it twice to run it again? I would like to be able to run it again with just one click - it is for a true and false set of questions. The movieclip is an animation that runs if correct (and there is another if it is incorrect.

Here is the button script

on (release) {
_root.tf1_mc._visible=false;
_root.tf2_mc._visible=true;
_root.tf2_mc.gotoAndPlay(1);
}

comment: tf1_mc runs when the true button is clicked and tf2_mc runs when the false button is clicked. The script above is for the false button

View 3 Replies

ActionScript 2.0 :: Can't Click A Button Inside A Movieclip

Jan 6, 2010

I have made a sort of drop down menu of a movieclip. There are actually two, the first one named list_over_mc is only to detect when the mouse is in the area for when to drop down the menu (onRollOver) and the other one, list_mc, is holding the menu itself. The problem is that when the menu is down nothing happens when I click the button (now named knapp1_btn). I have tried with another but with the same sort of script (but placed outside of the movieclip list_over_mc) and that works so I'm guessing it is because the button is "over" the other movieclip.

View 3 Replies

ActionScript 3.0 :: Button (MovieClip) With Two Click Functions

Aug 9, 2009

I'm almost 100% sure that I have to write an if, else statement for this. Below is the code I have for a button(movieclip) I created. It is suppose to play an animation when you click on it. Then when you click it again it's suppose to play a second animation that will take it back to the original state. What is happening is, it goes straight to the clicked state without playing the animation. However when you click the second time it plays the animation that takes you back to the original state. Am I correct in believing the only way to get the animation to play on both clicks is to use an if, else statement.

function clickPlus(event:MouseEvent):void {btn1.gotoAndPlay("clickOpen"); }btn1.addEventListener(MouseEvent.CLICK, clickPlus);
function clickX(event:MouseEvent):void {btn1.gotoAndPlay("clickClose"); }btn1.addEventListener(MouseEvent.CLICK, clickX);
btn1.removeEventListener(MouseEvent.CLICK, clickPlus);

View 3 Replies

ActionScript 3.0 :: Movieclip Array On Click Of Each Button?

Jul 7, 2010

I have browse button on stage. when i click this i am uploading a image to a movieclip. then the movieclip is added to the stage. my issue is when i click the browse button 2nd time i need to select another image and add to another movieclip and display it  to the stage

View 2 Replies

ActionScript 2.0 :: How To Get MovieClip To Hide On Button Click

Jan 20, 2009

I got this code but when i click on another button is is still there how do i get it to disappear? I have two movieclip one is the snow and another movieclip is an empty mc called snow2

ActionScript Code:
i =0;
while (i<25) {
//duplicateMovieClip (dot, "dot" +i, i);
dot.duplicateMovieClip("snow"+i, i);
i++;
[Code].....

View 1 Replies

ActionScript 2.0 :: Set MovieClip Visible On Click Of Button

Feb 2, 2009

public function mc1():Void {
for (i=0; i<9; i++) {
c = c+30;
//here my_clip is a refrence to stage
var mc_new = my_clip.attachMovie("mc_bread", "bread_"+i, my_clip.getNextHighestDepth()+1, {_x:80, _y:385-c});
mc_new._visible = false;
[Code] ......
See the function visibility I am trying to set visible a movieclip on a click of a button. this code gives no error but still movie clip is not visible.

View 1 Replies

ActionScript 3.0 :: Show Movieclip Upon Button Click?

Aug 3, 2009

I am building a navigation menu with buttons that call and show a movieclip just below the button. I have no more compiler or output errors. Despite this, I still dont have a working navigation menu.The movieclips are only found in the library and are being called by buttons on the timeline. I currently have all the actionscript on frame 1 on a separate layer of the main timeline. None of the buttons or movieclips have code associated with them individually.The code I have created is as follows (I omited some bc the functions get repetitious).

Code:
stop()
va html_con_mc = new MovieClip

[code].....

View 2 Replies

ActionScript 2.0 :: Play Movieclip On Button Click?

Feb 21, 2011

how to play a movieclip on button click in actionscript 2.0.

View 3 Replies

ActionScript 3.0 :: MovieClip Button - Go To Frame One On Click

Feb 18, 2009

I put a mcBtn in the end game frame, put this code in the frame:
mcBtn.buttonMode = true;
mcBtn.addEventListener(MouseEvent.CLICK, playGame);
function playGame(e:Event):void {
play:(1);
}
The object is to go to frame 1 when you press mcBtn. When I click it, Nothing.

View 2 Replies

ActionScript 2.0 :: Get A Movieclip Bigger When Click A Button?

Nov 29, 2004

What AS should I use to get a movieclip bigger when I click a Buttom? I want the object to grow at a size "x" and then stop....

View 7 Replies

ActionScript 3.0 :: CAN'T CLICK On Any Button - Movieclip Layer Work

Jul 31, 2010

i CAN'T CLICK on any button, movieclip layer and have actionscript work, it just says "CURRENT SELECTION CANNOT HAVE ACTIONS APPLIED TO IT" what do i have to do so that i can click on my button's and go in action pannel and be able to input my actions without it saying "CURRENT SELECTION CANNOT HAVE ACTIONS APPLIED TO IT"

View 4 Replies

ActionScript 1/2 :: One Click Two Buttons - Replicate To The Other Button Within The Movieclip

Mar 16, 2012

I have a button on the stage which works fine and performs various actions. I have a movie clip on the stage, that contains 10 different buttons which when you click advances you to the next button and does different things and so on and so on. Again independantly this movie clip with buttons works fine.

What I want to do however is this. I want to click on the main button on the stage, have that 'click' replicated to the other button within the movieclip so I can action both with a single clip.

View 31 Replies

Flash :: Loads A New Movieclip/swf File On Button Click?

Sep 5, 2011

I am creating a library like flash file for our game. I am using adobe flash cs5 with as3 and adobe indesign. I am still very new at flash(a real newbie) and i am wondering if anyone could help me in my problem.

i have a movieclip file named "mainPage". mainPage contains 6 buttons (with a cyrstal design) but lets focus only on 1 button. The 1st button contains the name Art_btn which calls the movieclip artBook when the button is clicked (which is my problem) . I have another movieclip named "artBook". the contents in my artBook are separated or written on each frames that could be called when clicked next or prev.

here is my prob. i dont know what is the right code that would call for artBook when Art_btn is clicked.i tried inserting codes such as loadMovie, gotoAndPlay and addChild but when I test it, the mainPage contents doesnt show up and it produces errors.

[Code]...

View 1 Replies

Flash :: Getting Instance Of Button/movieclip On It's Click's Handler?

Nov 25, 2011

It used to happen in AS2.0 as follows :

my_Mc.onPress = function()
{
trace( this)
}
//output :
[my_Mc Movieclip]

[Code]...

View 2 Replies

ActionScript 2.0 :: User Click MovieClip Button To Go To Another Page

Mar 22, 2010

I want to have an application where the user click on a movieclip, and is then taken to a another page. What I need is the code so as a user clicks a moviceclip (for example MC_1) it holds a variable (say = 1), as the movieclip is pushed a movie plays which at the ends checks for the variable change and then re-directs the user some where?

View 1 Replies

ActionScript 2.0 :: Change Alpha Of Movieclip On Button Click?

Feb 18, 2011

I am unable to change alpha of movieclip on button click using as2.[code]...

View 1 Replies

ActionScript 3.0 :: Change Alpha Of Movieclip On Button Click?

Feb 21, 2011

i am developing one small imteractive game.in that i'm getting one difficulty.Difficulty is: i want to play a moviclip whenever i 'll click on button ,and .For that i hav applied logic in following way.

function onMouseClick(event:MouseEvent):void
{
this.alpha=0; (alpha of 1st movieclip will 0 )

[code]......

View 5 Replies

ActionScript 3.0 :: Show / Hide Movieclip When Click On The Button

Sep 28, 2010

I just did a button and 3 movieclips. What i want? Well, when i click on the button to change the movieclips. click 1 = movieclip 1 when i click again on the button it change to movieclip 2 My problem is that i can`t make so it can change to movieclip 3.So when i click it must be something like this> click 1 = movieclip1, click 2 = movieclip2, click 3 = movieclip 3 so on...

[Code]...

View 2 Replies

ActionScript 2.0 :: Cross MovieClip Navigation Via Button Click

Feb 7, 2004

Here is how my movie is set up.
Frame one -> MovieClip #1
Frame two -> MovieClip #2
within each movieclip there are 10-15 frames.
Here's the problem. I want to be able to go from frame one in MovieClip#2 to the last frame in MovieClip#1, via a button click.

View 5 Replies

ActionScript 2.0 :: Click On A Button It Load Up Intro Movieclip

Sep 27, 2002

I want to know what action I should use for this. For example, I want to click on a button, it load up my intro movieclip, after the movieclip is done and it automatically load to my next scene.

View 14 Replies

ActionScript 2.0 :: Get Some Actions On A Duplicated MovieClip?

Sep 24, 2010

I am trying to get some actions on a duplicated MovieClip Now what I got is something like this:

Actionscript Code: I have some loop wrapped around this so the 'i' changes.duplicateMovieClip("target", "new"+i, 100+i);// I use 'i' because i need a few of those...for(i=0;i<somenumber;i++){_root["new"+i].onEnterFrame = function(){//actions}}

And it won't work. Logically it just makes MCs "new1" "new2" "new3" and so on.And then it checks for those.If i put a MC named "new3" on stage, it works. I guess i'm just stupid and doing the duplication wrong or something.

View 9 Replies

ActionScript 2.0 :: [FMX]Removing A MovieClip That Is Not Duplicated

Feb 1, 2003

I've seem to have hit a snafu in a small animation I am creating for my next tutorial. What I have, is a movie clip that gets duplicated when the space bar is pressed. The movieclip has actions setup so that when the movieclip reaches a certain y value, it will remove itself via this.removeMovieClip()

The problem is, every movie clip that is duplicated does remove itself like it is supposed to. The exception is the original movie clip that I duplicate from. That movie clip seems to want to stay and cause problems (it is not removing itself because it isn't duplicated via attachmovie or the duplicateMovieClip method).

View 6 Replies

ActionScript 2.0 :: Getting A Duplicated Movieclip's Name On Event?

Sep 8, 2005

I cannot find a solution anywhere for this issue. Searching the forum yields: "The following words are either very common, too long, or too short and were not included in your search: name"

Anyway, the thing is this.

I duplicate a movieclip several times, which is a button, and name the instances c0, c1, c2, etc. I want to use substring to extract the number behind this name when someone clicks on one of these buttons. I have the following function in the button:

Code:
on(rollOver) {
x = substring(this._name,1);
ripples._x = coords[x].split(",")[0];
ripples._y = coords[x].split(",")[1];
}

As you may guess, I need the number in the variable x. However, the pointer "this" apparently points to the level this button is on (_level0), and not the button itself. So "this._name" gives me nothing.

My question to you all is, how do I obtain the buttons instance name the user has clicked on? Or for that matter, any other property. How do I address the button itself, from the on(XXXX) function?

The code to spawn the buttons is (in a loop):

Code:
duplicateMovieClip("clickdot","c"+x,x+10);
setProperty("c"+x,_x,coords[x].split(",")[0]-8);
setProperty("c"+x,_y,coords[x].split(",")[1]-8);

Obtaining the coordinates instead of it's name would suffice as well.

View 4 Replies

ActionScript 2.0 :: Using LoadMovie In Duplicated MovieClip?

Jan 3, 2006

I can't manage to load jpg in some duplicated mc. I tried to add the as to the container mc "img"

Code:onClipEvent (load){ this.loadMovie(_parent._name+".jpg"); which trace the correct path to the jpg but the jpg don't show up. (Which would be wrong as if I remember well, the mc when being duplicated loses the loadMovie part????To be confirm) So I thought that maybe the best would be to have it done while duplicating the movie but whatever I have beeen trying has been unsucessful. Here is the codes with duplicating mc.

[Code]...

View 1 Replies

ActionScript 2.0 :: Duplicated Movieclip Ontop?

Dec 30, 2008

whenever i duplicate this movie clipthe duplicated movie clip goes ontop of everything elsehow do i duplicate it in a manner that prevents it from sittingon top of everything else in my screen?

View 2 Replies

ActionScript 3.0 :: Package Class That Opens A MovieClip On A Button Click?

Jul 13, 2009

I have a timer on my main flash document, and a package class that opens a MovieClip on a button click.
 
I want to stop the timer when the user starts the movieclip and then restart it when they close the movieclip. I don't know how to send information back to the main flash document from the package though.
 
Calling an object's method from the main flash doc is object.method(); But I need to do the reverse. I know this a low level super easy question, but I cant find the answer. Something like _MainDocument.function(); would be my guess. Or is there a addEventListener(class Deconstructs, doSomethig) ?

View 4 Replies







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