ActionScript 1/2 :: Loading MovieClip Based On What Button Clicked

Mar 30, 2009

I looped my buttons just fine. However, I am trying to load a movieclip based on what button is clicked. the code loads the same movie everytime though.

View 13 Replies


Similar Posts:


ActionScript 2.0 :: Button To Open A Movieclip And Then Close The Movieclip When Clicked On Again

May 19, 2010

I am a super noob at actionscript. And I want my button to open a movieclip and then close the movieclip when clicked on again. I have no idea what to add after that here is the code I have for the button so far.....this button opens it.

on(release){
this.linemc5.gotoAndPlay("ear");
}

and this is another button I made that can close it, but I want it to be in the same button rather than seperate.

on(release){
this.linemc5.gotoAndPlay("earclose");
}

View 2 Replies

ActionScript 2.0 :: Loading Specific Movieclip Based On Var

Mar 28, 2011

I have a text box which when submitted will action a specific task depending on what its contents is, so for example, you type "one" in and it will bring up a picture of a boat where as if you type in "two" and press enter it will bring up a picture of a car. Now thats all working fine, what I have an issue with though is that with several of the tasks I want it to open the same window but load different content within that window depending on what word was typed.

So if you type "one" it will load a grey window and load within that a picture of a boat, but if you type "two" it will load the same window but load a picture of a car inside it. Now the way i can see this working is when you submit the box it sets a variable and when the window loads, depending on what that variable is set to it will load the relevant info.

[code].....

I have also tried placing that last bit of code within "window" instead of "winbod" but it still doesn't work. I'm pretty new to variables so I know it will be to do with me not placing them right. Where abouts am i going wrong here?

View 4 Replies

ActionScript 2.0 :: Loading A Movieclip Based On The Time Of Day?

Oct 3, 2006

Is there a way to load a MC based on an internal clock (or if that's too complicated, a digital clock based on the Digital Clock tutorial)? I also read up on the Loading Random MC tutorial, which is helpful but rather than it being random is there a way to set it so that the MC loads, for instance, everyday at noon? And it would keep this MC generated for 24 hrs until the next one that loads 24 hrs later.

View 14 Replies

ActionScript 3.0 :: Get The Photos To Be Displayed Once A Button Has Been Clicked By Loading Them From The Library?

Feb 10, 2012

i have created an ios app in cs5, I am using a button when touched it should display a photo gallery. I Have researched plenty of tutorials but most of them you need to import the images onto the stage first, i only want the photos to be displayed once a button has been clicked by loading them from the library, once the photos have been loaded the user should be able to go back onto the app.

View 3 Replies

ActionScript 2.0 :: MovieClip Button Stay Down When Clicked

May 21, 2007

Ok, I've search through the forums but none of the posts seem to work for me. I've got 4 buttons that each have an onRollOver, onRollOut, and onRelease function on them. I would like the onRollOver state to stay in place after the user clicks the button they're over. Then, when the user clicks on a different button, that buttons down state sticks, and the previous button's state unsticks and goes to the rollout function. I've read through and tried this thread:[URL]

View 5 Replies

ActionScript 3.0 :: Move MovieClip Position When Button Clicked

May 22, 2010

I have a simple arrangement where a movieclip moves to a new x y position when a button is clicked. I want the movieclip to slowly move or 'glide' there instead of jumping straight to the new position.

Heres the code..
btn_up.addEventListener(MouseEvent.CLICK, moveUp) ;
function moveUp(event:MouseEvent):void {{
allcontent.x += 200;
allcontent.y += 200;
}}

View 1 Replies

ActionScript 3.0 :: Remove A MovieClip From The Stage Once A Button Has Been Clicked?

Mar 5, 2010

What i want to happen seems quite simple yet i keep getting the error "access of undefined property" when what i'm trying to remove is in fact defined in the same class but it obviously cannot gain access to it.

I want to remove a MovieClip from the stage once a button has been clicked.The MovieClip is created in the same class as my button function i created. The button works fine but whatever i try to put within the function to remove the MovieClip cause the error i mentioned at the start.

View 5 Replies

ActionScript 3.0 :: CurrentFrame - Doesn't Replay A MovieClip If Button Clicked Again

Mar 1, 2010

I'm coding buttons and have them all switching but I want to set b1 so that it doesn't replay a movieClip if it's clicked again. So I click on b1 and bring up page1, if I click on b1 again it replays the fade-in. How do I set this so if it's already loaded it won't load again?

[Code]...

View 3 Replies

ActionScript 1/2 :: Arrays N Loops - Movieclips To Hide Except For The Movieclip Similar To The Clicked Button

May 30, 2011

[Code]....

I'm stucked here. I want the font type "BauhausMedium" to apply when ft_01 is clicked, font type "Haettenschweiler" to apply when ft_02 is clicked, etc... at the same time I want all" ft_01a", "ft_02a", "ft_03a" movieclips to hide except for the movieclip similar to the clicked button. E.g. if "ft_02" was clicked ft_02a to be visible =true and rest to be visible = false (ft_01a, ft_03a).

View 5 Replies

ActionScript 2.0 :: Active Button - Stay The Rollon Color After It's Clicked And Then The Rolloff Color When Another Button Is Clicked?

Sep 29, 2008

How can I make it stay the rollon color after it's clicked and then the rolloff color when another button is clicked?

[Code]...

View 7 Replies

ActionScript 3.0 :: Detect Wheather The Button Is Clicked Or Not And Disable It If Clicked?

Jun 9, 2010

I have 4 navigation button and like home, about us etc....  And i want to disable home when it is click and cannot clicked it until the user click another button first. means if a visitor is at home page then home navigation is disabled, and all other are active, and when they click at aboutus button then the pages goes to the about us page and the about us button is disabled and other get active. I want this solution in AS3 with oop concept.

View 6 Replies

ActionScript 2.0 :: When Mouse Is Clicked, Detect Which Movieclip Is Clicked

Sep 9, 2009

I have parent movieclip and in that many different children movieclips

What i want to do is when i CLICK, i want to detect which movieclip it has clicked and call corresponding function (defined by onpress event) of that movieclip.

View 6 Replies

ActionScript 2.0 :: Buttons To Stay Orange Once Clicked And Only Roll Out Back To Grey When The User Has Clicked On Another Button In The List

Feb 7, 2007

I've got about 6 buttons laid out, one on top of the other in a list format. In their normal state the buttons are grey in colour, when I rollover them, the buttons flash and turn to orange. Now, what I need to happen is this: I want the buttons to stay orange once clicked and only roll out back to grey when the user has clicked on another button in the list. I've been told that the best way to do this is via adding a listener, however I am a little unsure as to how to go about this. I've checked the flash help file and have a basic understanding of how listeners work...but can't really wrap my head around applying it to this situation. Perhaps I will need to have all the buttons as separate broadcasters?

View 2 Replies

ActionScript 3.0 :: Unable To Click Some Words In The Text And Based On The Selection Clicked?

Mar 8, 2011

I have a simple TLF text box on stage. i want to be able to click some words in the text and based on the selection clicked got to some other place on a timeline or set a variable (not a link to an external web page).
 
sounds like it shout be simple but i cannot seem to find any information about it.
 
i seem to remember having done something similar years ago in as1 or as2.

View 3 Replies

ActionScript 2.0 :: Nav Button States - Button To Stay In It's Active State Until Another Button Is Clicked

Dec 17, 2004

I have a menu with five nav buttons (atcually MovieClips). Each has three frame labels: "on", "stay", and "off". The rollover and rollout animations play flawlessly, but I'm at a loss as to how to give each button a sticky "active" state. I'd like the button to stay in it's active state until another button is clicked, then I would like it to play it's "off" animation. Each MC has this code:

[Code]...

View 2 Replies

ActionScript 2.0 :: AttachMovie - Loading MovieClip When Button Pressed

Apr 11, 2008

Adobe Flash CS3
publishing as Flash 8, AS 2.0
I have a movieclip named menu (instance name = mainmenu). Inside of that there is a button named btn_about (instance name = about). On the main stage there is an empty movieclip named empty_mc (instance name = mcholder, linkage id = empty). I want a user to press the button which causes a movieclip in the library named tesst (Linkage name = testid) to load into the empty movieclip (mc_holder).

Here is the code on the button:
on (release) {
this._parent.mcholder.attachMovie("testid", "tesst1", this.getNextHighestDepth());
}
It does not work.

View 2 Replies

ActionScript 2.0 :: Movie Clip Button Up-state, Stay Up Until Clicked On Other Button?

Feb 23, 2006

how to keep a Movieclip Btn 'Over State' to stay in the over position until another button is clicked?

View 1 Replies

ActionScript 2.0 :: Write A Code For A Button When The Button Is Clicked It Should Move To The Nextframe?

Nov 28, 2007

how to write a actionscript code for a button when the button is clicked it should move to the nextframe.

// About and smile1 button scripts
stop();
_root.smile1.onPress = function() {
if (mouse_over_smile1) {

[code]....

i have given 3 functions as onEnterFrame,onPress,onRelease. i tried all these but didnt get the result.smile1,smile2,smile3 are button instances which are declared on the monie clip.my main thing is i hav a button, when i click on that button it should go the next frame which i have declared in "gotoAndPlay(6)" method.

View 1 Replies

ActionScript 2.0 :: Movie Clip Finish Playing When A Button Is Clicked And Then Go To The Frame Label Associated With The Button

Jun 2, 2011

Anyway what I need to do is have a movie clip finish playing when a button is clicked and then go to the frame label associated with the button. I hope I'm explaining myself ok. So if I had say 4 buttons Home Gallery About Contact If Contact is clicked then I want the Home page to play (Which is a fade out) and then go to Contact Page (which will fade in). Then If Gallery is clicked then I want Contact to fade out and then go to Gallery page and fade in.

View 6 Replies

ActionScript 2.0 :: Make A Button In Such A Way So That After Clicked On It The Button Will Change Colour Indicating That The Link Has Been Visited?

Sep 1, 2004

I am trying to make a button in such a way so that after you clicked on it, the button will change colour, indicating that the link has been visited.

View 3 Replies

ActionScript 2.0 :: Disable A Button After It Is Click And Then Enable It Once Another Button Is Clicked?

Sep 8, 2009

I'm trying to figure out how to disable a button after it is click and then enable it once another button is clicked. I'm stuck on how to enable the button.

on (rollOver) {
this.gotoAndPlay("s1");
_root.slideshow.gotoAndPlay("s4");

[code].....

View 1 Replies

ActionScript 2.0 :: Make A Movieclip (or Button) Appear On Coordinates Randomly When Loading Flash?

Nov 25, 2010

i can't seem to figure out this:

I have 3 coordinates on a stage.
Coordinate1 (x50;y50);
Coordinate2 (x150;y150);
Coordinate3 (x250;y250);

How to make a movieclip (or button) appear on one of theese coordinates randomly when loading flash?

Coordinates don't change but movieclip (or button) goes to one of theese positions upon flash movie starting.

View 6 Replies

Professional :: Make A Button Active If Another Button Is Clicked?

Dec 13, 2010

I want to make a button (or graphic) active and visible if another button is clicked. But it must be invisible and unclickable before the other button is clicked. (this is a "find the differences between the 2 pictures game" and I want circles to appear over the differences that the user finds but only after he clicks it)

The button (or graphic) I want to become active has instance name of "sockcircle_btn" The button you click to make it appear is called "sock_btn"

In the first frame of the sockcircle_btn layer, this is my code

sockcircle_btn.addEventListener(MouseEvent.CLICK,sockcircledisable);
function sockcircledisable(evt:MouseEvent):void{
sockcircle_btn.mouseEnabled = false;
}
 
In the sock_btn frame (frame 3) this is my code

sock_btn.addEventListener(MouseEvent.CLICK,sockcircleenable);
function sockcircleenable(evt:MouseEvent):void{
sockcircle_btn.mouseEnabled = true;
}

The file is setup to loop between frames 2-3. But the sockcircle_btn never enables even when sock_btn is clicked.

View 5 Replies

ActionScript 2.0 :: Play Button Out Label When Another Button Clicked?

May 2, 2006

Pretend a button is selected - when that button is selected it goes to the active frame which shows that the button is selected. When you click another button it currently resets itself - BUT - I want it to go to and play frame "mouse_out" and than reset itself. Below is the code I am currently working wtih:

[Code]...

View 6 Replies

ActionScript 3.0 :: Replacing Movieclip With Another Movieclip When It's Clicked On?

Jul 9, 2009

I've got music player and one of the controls is a movieclip which acts as a PLAY and PAUSE button. What I would like is to swap the image of this movieclip everytime it's clicked. How would I go about doing this?

Here's my code...

ActionScript Code:
playPause_btn.addEventListener(MouseEvent.CLICK, onPlayPause);
function onPlayPause(event:MouseEvent):void{

[Code].....

View 1 Replies

ActionScript 2.0 :: Loading Same MC As Clicked To Placeholder

Nov 24, 2004

I've been having a small problem loading movieClips into a placeholder. Right now I'm dynamicly creating a thumbnail gallery of images, and I want theese thumbnails to be displayed in full size in a placeholder. I just can't figure out how to put the selected movieClip into the placeholder.[code]

View 5 Replies

ActionScript 2.0 :: [FMX] Loading Same MC As Clicked To Placeholder?

Nov 24, 2004

I've been having a small problem loading movieClips into a placeholder. Right now I'm dynamicly creating a thumbnail gallery of images, and I want theese thumbnails to be displayed in full size in a placeholder. I just can't figure out how to put the selected movieClip into the placeholder.Here's the code used for generating the thumbnails:

Code:
myData = new LoadVars();
// myData.load("getpictues.php")

[code].....

View 5 Replies

Replacing Movieclip With Another When It's Clicked On?

Jul 9, 2009

I've got music player and one of the controls is a movieclip which acts as a PLAY and PAUSE button. What I would like is to swap the image of this movieclip everytime it's clicked. How would I go about doing this? Here's my code...

[Code]...

View 1 Replies

ActionScript 3.0 :: Movieclip Cannot Be Clicked?

Apr 12, 2011

Ive got my target game where the target spawns on the stage at a random position. When the target spawns however, i am unable to click it to shoot it?

Ive got my event listener for the target in my actions on that frame, but its giving me the following error:

1061: Call to a possibly undefined method addeventlistener through a reference with static type class.

If i comment out the addEventListener for the Target the game runs but i cant click it, if i dont comment it out i get that error and the game wont run.

View 14 Replies







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