ActionScript 2.0 :: Set Up A Code That Will Make A MovieClip Visible?

Mar 26, 2009

I am trying to set up a code that will make a MovieClip visible = false when you press the spacebar then reapear when you hit the spacebar again. I had it working once but I lost the code somehow ... think I deleted the wrong file. the one time I got it to work I used a keylistener and stuck the code in the action panel on the timeline at frame 1.

I thought maybe there is a way to do the same thing but instead of the frame 1 action panel thing. I thought you might be able to set it up in a movieclip class action script file. I did these tutorials on the kongregate site ... shootorials and they teach you how to make a MC move with the arrow keys which was easy ... they had you make a ship into a movie clip then you created a new AS class file for the ship movie clip. Then they placed the code under the function onEnterFrame() in the ship class AS file which works well when you want to move something ... because it checks every frame.

I can set up what I want in that area just fine ... problem is it fires off every frame .. so my movie clip blinks on and off several times everytime I hit the spacebar. I just want it to disapear when you hit the spacebar then become visible again when you hit the spacebar again.

Seems like this should be a very easy thing to do but I spent all day reading through tutorials and searching google everything I tried all I did was run into one error or another when I tried to compile for a test.

I am very new to all this so the other thing that confuses me is the fact that you can put code in so many different places and depending on where it goes the same thing might be written a different way depending on where you write it.

View 2 Replies


Similar Posts:


ActionScript 2.0 :: FLASH - Make A Movieclip Visible For 1 Second?

May 17, 2011

I have a quiz and when the correct answer is clicked i want to show a correct answer mc so when the answer is clicked a "correct" or an "x" will flash up for 1 second. I have to functions on for right (celebrate) and one for wrong (wrong_answer)

[Code]....

View 2 Replies

Make A Frame Become Visible And Play / When Click On A Movieclip

Apr 27, 2009

This time I'm experimenting with visibility. All the tutorials online vary a lot. I'm trying to find something noob proof. I have actionscript 2 and 3. I'm not sure which one to use..I'm just trying to learn how to make a frame become visible and Play when I click on a movieclip.

View 5 Replies

ActionScript 2.0 :: Make Movieclip Visible When Variable Empty?

Oct 27, 2009

I have an swf that plays a video (toobplayer component) and has two dynamic txt fields. The video and both txt fields are "fed" from an xml file. I also have a movie clip that loads an image on another layer and is set to an alpha of 0. Is there a way to use a conditional statement to check the video variable and if one is not present to change the image loading movieclip to an alpha of 100. here is what I am working with.[code]...

View 5 Replies

ActionScript 1/2 :: Make Movieclip Visible For A Specific Time Duration?

Apr 9, 2010

Is there any possibility to make a movieclip visible for a specific time (e.g. 5sec.)? I want to make "srch275" show for 5 seconds and then make it disapear.
 
sruch_btn.onRelease = function () {if (cosearchbx.text == "APPLE"){srch275._visible = true;}

View 1 Replies

ActionScript 1/2 :: Movieclip Has A Toggle Button To Make It Visible True And False?

Jul 19, 2010

on frame 1 I've got 10 movieclips and each movieclip has a toggle button to make it visible true and false.
 
How do write the script to do the following on frame 10?
 
if only 1 movieclip is visible make one_mc visible true
if only 2 movieclips are visible make two_mc visible true
if only 3 movieclips are visible make three_mc visible true
... so on for all 10 hope this make sense.

View 10 Replies

ActionScript 1/2 :: Make A Movieclip Visible False When A Scroll Bar Starts To Scroll?

Jan 29, 2011

How do make a movieclip visible false when a scroll bar starts to scroll?
 
//I tried this and had no luck.
this.onEnterFrame = function(){
obj_mc._visible=false;
}

View 1 Replies

IDE :: Make A Movieclip Finishes Playing Before Executing The Next Line Of Code?

Mar 30, 2009

I've created an movieclip button that onRelease: moves to the highest depth and expands to the entire page and onRelease again: contracts to a thumbnail and moves to a lower depth.'ve got the animation working. However, I'd like the movieclip to finish playing the contracting to a thumbnail animation to the end before moving to a lower depth. Here's a concatenated version of the code://Variable that I set to know when the button was clicked first to expand.

_global.releaseOut;
mc1.onRelease = function()
{

[code].....

View 2 Replies

ActionScript 2.0 :: CS3 : Make A Combination Of Keys Make A Movie Clip Visible?

Aug 11, 2009

How can i make a combination of keys make a movie clip visible? Basically i want something like this to work:

if(Key.isDown(Key.Alt && Key.A)){
reminder._visible = true;
}

So when someone presses the Alt and A keys down at the same time the 'reminder' mc becomes visible?

View 2 Replies

ActionScript 2.0 :: Opening URL - Use Default Error To Make An "error Movieclip" Visible?

Jul 27, 2006

ok now i have a variable "URL" [URL] (or something like that - it works anyway) and a search box replaces the url and places it in the url as appropriate Error opening URL "[URL]" now if someone types "hello" and submit, it looks for "[URL]" but if the image isnt in the folder it will come up as Error opening URL "[URL] in the OUTPUT box now is their any way at all to say in the actionscript (the image searched wasnt in our database please try again) i know its a default message flash comes up with but is their a quick way to use this default error to make an "error movieclip" visible?

View 1 Replies

ActionScript 2.0 :: Cannot Get Global Variables Visible In Code Scopes

May 10, 2006

I'm loading an external XML file, obviously, and populating arrays with its data. There's also a variable that holds the total number of projects within the XML file because the menu they'll eventually inhabit requires the information for later "for loop" traversal. I can't seem to get globally declared variables to be visible in other code scopes.

Here's what I'm working with right now:
//global array loading...
_global.thumbs = [];
//_global.description = [];
//_global.tempClips = [];
//_global.totalProjects;
[Code] .....

That's just the most current incarnation. I've tried declaring the variables inside the loadXML function and outside, with later references made both omitting and maintaining the "_global" prefix all along the way.

View 4 Replies

ActionScript 3.0 :: Visible Movieclip Inside An Invisible Movieclip?

Aug 3, 2009

Is there any ways to set a movie clip(item2) invisible but set another movie clip which located inside item2 visible?

View 1 Replies

ActionScript 3.0 :: Make Var Visible To Two Functions?

Jul 7, 2010

following code:

[Code].....

even once i'v executed "getMcInfo", I get "null" from the trace statement in "changeBorderColor", I should get [object blabla]. I know this has something to do with the scope of the variable "MC" but i just can't fine a solution..

View 1 Replies

ActionScript 2.0 :: Make A MC Not Visible After A Certain Time?

Jan 29, 2010

Is it possible to have a MC go to ._visible=false after a certain amount of time? So you would roll over it and let's say after 2 seconds it would become not visible. Is this to do with the setInterval function? Actionscript knowledge is slim so be gentle.

View 9 Replies

ActionScript 2.0 :: How To Make Mc Visible Function

Jan 17, 2004

i have this script to animate my button. so fare it works fine. the buttons are mc and have three states: one for up, one for over and one for press.when first loading the swf, i want to have the first button already in the 'press' status.i tried to do it with this:but1.mc_butup._visible = false;but that confuses my function of the button states.this is the scrip i have so far:

Code:
var buttonActive;
_global.buttonRelease = function(which) {

[code].....

View 2 Replies

ActionScript 2.0 :: Make Mc Visible And Invisible?

Mar 21, 2010

I want a movie clip to be visible for 3 seconds then invisible then visible again after 3 seconds.

View 4 Replies

ActionScript 3.0 :: Change Bitmap Code To MovieClip Code?

Nov 17, 2011

I'm working on an app for iOS where I want to load content dynamically from the library that contains text and graphics inside different MovieClip's.However, I have a problem, the code I have is for bitmap!How can I change it so it works for MovieClip instead?I want to use the MovieClip instead of bitmap?Also want to use the MovieClip class instead of Sprite class?[code]

View 5 Replies

ActionScript 3.0 :: Make An Object Visible Off Stage?

Jul 14, 2009

I would like to make an object visible off stage. So that the object is floated over the HTML. Any Ideas. I don't seem to be able to do it using Transparent Window in the HTML publish options and think it may only be possible using javascript (layers) but I would much prefer to only use flash so if anyone has a idea I'd love to hear it.

View 2 Replies

Professional :: How To Make Things Visible Offstage

Jun 6, 2010

I'm trying to allow all things oitside of the stage peramiters to be visible in the browser screen so certain elements can be longer than the stage and still be shown Can't remember if it's a flash thing or an html thing.

View 6 Replies

ActionScript 3.0 :: Make String Of MCs Invisible/visible?

Jul 28, 2010

I have a map of states state when a particular state is clicked on, the fla centers on and zooms to that state. When you click on a state a unique ID is pulled from an xml. Using this ID, I can then call all the counties that are part of this state through the county's xml which is also loaded on my stage.or example if I click on Arizona, it zooms and I get a trace of all the instance names of the counties within Arizona.

//call all instance names of Arizona counties
cldcnfips=(cntXml.Records.Record.(STATE_FIPS==cldstfips).afips.children());
trace(cldcnfips);

[code]......

View 7 Replies

ActionScript 3.0 :: Make Object Visible Only In Certain Frames!

Aug 18, 2011

For keeping the actionscript in the first frame; I'm creating buttons only in the first frame that doesn't change; but I want for some of them to be visible only in certain frames! Is there any code for doing that?

View 2 Replies

Flash :: Can't Make 22 Pieces Of A Puzzle Visible

Jan 4, 2012

I am making a jigsaw puzzle in flash. But I have a weird bug. There are 25 pieces, 5x5. I am passing in the background bitmapData to the pieces as they are created.

For each piece I create a single puzzle-shaped mask bitmap.

So each piece contains a bitmap whose bitmapdata is the puzzle texture. And each piece has a mask piece.

When I just show the masks, all 25 pieces are drawn to the stage.

But when I use the piece masks to mask out the texture, I seem to have a hard limit to 22 pieces in which the mask is applied. This happens if I am using 25 peices or even 80 or 100. Each time, only the last 22 pieces created will display the texture. [code]...

View 1 Replies

Flex :: Make Textarea Visible On Top Off Al The Other Textinput

May 27, 2009

I created my own validation control.

[Code]...

When I validate the txtinput and it's not valid, the textarea will appear with some information in it. Now I have several textinput fields in a canvas

[Code]...

View 2 Replies

ActionScript 3.0 :: Make A Button Visible Only In A Particular Frame?

Jan 13, 2009

im working on flash cs3

my as3 code is:

Code:
function eventResponse1(evt:MouseEvent):void {
gotoAndStop(30);}
lab_but1.addEventListener(MouseEvent.MOUSE_UP,eventResponse1);

[Code].....

View 0 Replies

ActionScript 2.0 :: Make Buttons Visible/invisible?

Oct 23, 2009

I have a file where everything is on frame one, and I have a nav bar. I want there to be a couple of buttons showing up below the main nav bar when one nav button is clicked, then disappearing when any of the other buttons are clicked.

View 1 Replies

ActionScript 3.0 :: Make Flash Visible And Invisible?

May 5, 2011

I have a flash and want to make it only visible when loading 100%. In frame 1 I write stage.visible = fault; or this.visible=fault;

it doesn't work ! the flash still display !

View 7 Replies

ActionScript 3.0 :: Randomly Choose Something To Make Visible?

Jul 13, 2011

Why doesn't this code work it gives me runtime errors[code]...

View 2 Replies

ActionScript 2.0 :: Make A Few Mc's Visible On The Stage With A SetInterval?

Feb 18, 2005

I use the following function to make a few mc's visible on the stage with a setInterval.

[Code]...

View 7 Replies

ActionScript 3.0 :: How To Make Cursor Visible In TextField

Sep 20, 2007

How to make the cursor visible in a TextField (either flashing or still). I have created an on screen keyboard to use with a TextField so that the TextField doesn't receive direct keyboard/mouse input, but there is no cursor to see where you currently are. I have tried the setSelection() stuff with no luck..

View 1 Replies

ActionScript 1/2 :: Make 3 Movieclips Visible For 7 Seconds And Then Disappear?

Jul 12, 2010

When on frame 10, make 3 movieclips visible for 7 seconds and then dissapear? How do I write the code?
 
I'm not sure how to put things together.
 
clearTimeout(mc4_mcT);
mc4_mcT=setTimeout(mc1_mc,5000);
mc1_mc._visible = false;
mc2_mc._visible = false;
mc3_mc._visible = false;

View 2 Replies







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