ActionScript 3.0 :: On Click Object Visible Not Visible
Aug 8, 2010
I want to click on an object and make it appear and disappear. As the object is rectangular, I figured putting a white button the same size on a white background on a layer underneath the object would do this, but I can't seem to make it happen.I'm a complete novice, frustrated as I've been trying to achieve this all day and I'm sure it should be pretty simple, but could you give me the idiots guide. I know how to name an instance, make an object, script in actions on a separate layer. I would like to draw the button myself and give it an instance rather than drag it off the button component (as I can't work out how to make the component button white, change its size etc.!)
View 5 Replies
Similar Posts:
Sep 28, 2011
My question is: Set parentSprite.visible = false will make all children in parentSprite all invisible, right? And is there any way to just make parentSprite itself invisible without effecting it's children?
View 2 Replies
Apr 1, 2009
Code:
my_Dyn_Txt1._visible = false
cb1.onRelease=function()[code]....
When the checkbox (cb1) is clicked the "my_Dyn_Txt1" is visible. The problem I'm having is - when I move forwad and back in my frames the checkboxes which were clicked are not visible due to
Code:
my_Dyn_Txt1._visible = false
How can I make ("my_Dyn_Txt1"), a clicked checkbox STAY VISIBLE even after I move forwad and back in my FLA frames?
View 11 Replies
May 19, 2011
on clicking the Search Icon , a search bar will be visible (ON) if user click anywhere on the stage the search bar will be NO visible(OFF) OR user click on ICON again the search bar will be OFF but it Stage CLICK is triggered without clicking
[Code]...
View 1 Replies
Mar 4, 2010
I want to make a little thing pop up when I put press a button... Would the best way to do this by doing a - movieclipname._visible = true/false
View 3 Replies
Sep 7, 2010
Okay, this should be relatively easy but I'm running into errors. My main character is visible in the beginning of the game (where the main menu is) and because I coded it so that all of the enemies don't spawn unless the main character is visible, the enemies spawn too. As a result, if you stay at the main menu for long enough, the score continues to go up, the health goes down when enemies attack, etc.
View 1 Replies
Mar 30, 2011
when the video reaches 1 minute, a button appears. is there a way to hide the button again if the user uses the seek bar to go back to the 30 second (or any time before 1 minute) point?
View 2 Replies
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
Sep 30, 2009
I have 7 images, 6 of which are hidden, and they're all stacked on top of one another. The Goal is to click the top one, make it disappear, and make the one below it appear. the subordinate layers need to be invisible so that the glow doesn't interrupt the glow above. Im not certain, but the imported images were converted to symbols as a Movie Clip, not a button, but i don't know if a button would still be able to maintain a layer filter...
Code:
//Create only one visible layer to avoid overlay problems (Indigo - Red)
Purple.visible = true;
Indigo.visible = false;
Blue.visible = false;
[Code]....
[URL]
View 4 Replies
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
Nov 6, 2010
I have a script that once clicked ( a button ) some other thing hides then once clicked again it re-shows. the problem is once hidden it never shows again here is the script:
menu_start.addEventListener(MouseEvent.CLICK, myClickFunction);
function myClickFunction(event:MouseEvent) {
// Hide the first and show the next here
if (menu_menu.visible == true){
menu_menu.visible = false;
} if (menu_menu.visible == false) {
menu_menu.visible == true;
}}
View 3 Replies
Feb 17, 2011
I just finished making my first flash site, the problem I'm having is that the site loads but is not visible until I double click on the blank screen.
View 2 Replies
Nov 9, 2010
when i do zoom in (by scaleX and scaleY), some of the object are shown and others disappear somewhere in the game area and on zoom out i see the whole grid again, the point is that i need to detect which objects are currently shown to the player and which aren't and hiding in the rest of the game's area.
View 7 Replies
Jun 15, 2006
Here is a mockup of how I would like the movie to look and function using a 728x270 movie size.[URL]..The 525x180 black area at the top is black and blank whenever a horizontal photo is displayed which is most of the time. The Photo Gallery is a popup and the actual size is
At the bottom is a standard 728x90 adspace that is served via an adserving system called OAS. Currently we use javascript to display ads that expand past the boundaries of the adspace. This method allows the expandable part of the ad to overlap an existing area or content such as text.
[Code]...
View 3 Replies
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
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
May 12, 2011
I have a embedded image in an html document like this
<div id = "divmarquee" runat="server" visible = "true">
<object width="475px" height="75px">
<embed src="merchant_images/The_Marquee_Deal.swf" type="application/x-
[Code].....
It was working fine in local computer but when i published to test, the div is shown empty.
View 1 Replies
Aug 23, 2007
I have a simple movie that just runs to the end and stops. When it stops, I want an object to appear and remain visible while the movie is sitting there in its stopped state. Trivial. My current model of the Flash stage is that if you drop an object onto the stage, it's there for the whole movie and it's up to you to move or hide it to get what you want. (That is, you can't add an object to the last frame of the movie, at least without bringing ActionScript into play.)
So, as far as I can tell, the only way get what I want is to add the object to the stage, make it into a button, and use alpha control to hide the object/button until the last frame of the movie, when the alpha goes from 0 to 100. This works, but I'm filled with the feeling of "this has to be overkill". I'd have the same feeling if I started the movie with the object off-stage and moved it on-stage in the last frame. Is there a more reasonable / lighter weight way to do this?
View 0 Replies
Dec 28, 2010
I have an swf file, in which on (release) simultaneously:
1) another external swf is loading: loadMovieNum ("file.swf",2);
2) hidden before object on stage is appearing: _root.object._visible=true;
All is ok, excluding that the object becomes visible 'under' that external swf. How to put it above the swf instead?
View 6 Replies
Mar 1, 2010
I have a simple FLA that pans through an image up/down/left/right. There are several hotspots (transparent buttons) that popup simple captions when the user rolls over them and launches a URL when clicked.
The captions are actually one caption that I dynamically write text to, size, and _x, _y locate when the rollover event occurs.
The caption (cap) is a rectangle and text box MC symbol which is grouped with the graphic and buttons as another MC symbol. It all works great, panning, captions.
The problem is, when the mouse is first moved, the caption box appears over the graphic. I want it invisible until a rollover occurs. I have tried a setup function action in the first frame that performs cap._visible = false;, which did not solve it. That syntax works fine following the first rollout.
on (rollOver) {
cap.desc.text = "Mr Reynolds";
cap._width = 7*cap.desc.text.length;
[Code].....
View 8 Replies
Feb 1, 2011
I creat a custom cursor in Flash.
function inicialGames():void {
cursor = new Cursor;
addChild(cursor);
Mouse.hide();
[code]....
But when add other object whit addchild(); mouse cursor stay under the other object and is not visible,but when I click is work;How i make a mouse cursor visible over the other object;
View 1 Replies
Jul 28, 2011
I have camera input app in flash (AS3) and I draw some graphics over it. I want to take the image snapshot of the stage visible area but only the video an graphics I draw over video. I want to exclude controls from the image snapshot. My display object layout is in following relation:
-stage
--canvas (Sprite)
---video (Video)[code]..........
Stage size is fixed and I want to take a image snapshot of everything that is child of my canvas element (camera input video and overlayed graphics, but excluding controls). I am able to make this image snapshot when overlayed graphics are inside the bounds of stage size. I do it like this:
var bmpd:BitmapData = new BitmapData(canvas.width, canvas.height);
bmpd.draw(canvas, new Matrix(1, 0, 0, 1, canvas.x, canvas.y));
But this gives me unwanted result when graphics which I draw on top of video on canvas exceed the bounds of stage display area. How do I limit the image snapshot only in the bounds of visible area inside stage?
View 3 Replies
Jan 10, 2010
I have an intropage with two mc buttons that resides in another mc. They are for an English and a Dutch part. So when I click on either one of them, they go to the "Home" label (frame 2). But now at the same time when the main timeline goes to "Home" I want the movieclip container that contains 6 buttons (The English or Dutch ones) to be visible false or true when I click on one or the other. As a part of the code will show some of you there must be an 1119 error that I can't figure out. It has to do with the FrameLabel that is supposedly undifined. [code]If i remove the if statement and just put the visible statement that also gives an error.But maybe the conflict could be that btnTxtFrameN_mc nor btnTxtFrameE_mc exist on the first frame where I wrote the code and only appear as from label "Home" (second frame)
View 9 Replies
Sep 29, 2011
I have a movie clip named circle_mc(see the image on the link below) and a mask object(movie clip) which determines visible area of the circle. User can change the portion which is visible (extend the red area and make it red+blue, gray area is invisible). I need to find proportion of visible area to invisible area (red+blue/gray) so that I can calculate angle.
View 1 Replies
Nov 22, 2010
especially the multiple instance hittest, i kept googling for it and AS2 always pops out. now i got it though. but i have a new problem i can't fix so to say
[Code]...
my movie clip "text" won't go visible unless i "hit" the last object on the array (traced which object gets hit and its array length number) but i can confirm my hittest via the trace method
View 6 Replies
Nov 4, 2010
I am unable to visualize the audio waveform in my flash timeline. I need to synchronize audio voiceover work and this is impossible to do without being able to see the timeline.
I am using CS4.....in previous versions I was able to see the waveform but no go for this version.....
View 1 Replies
Oct 6, 2009
I had a question if there is a way to set the stage as not visible? Meaning the .swf stage is transperent and takes the properties of the bg image of the bg of the page its laid on? I'm trying to steer away from just using flash for the site and using a mixture of flash elements in a css site but I can't seem to get the stage to be transparent.
View 1 Replies
May 3, 2010
I have six movie clips positioned across the stage and a following row of six movie clips below it. All of them move up the stage and are activated with a separate key press and it works ok first time. The following times going up the stage, the fifth and sixth movie clips are not visible on the first row, but are on the second row. The following code is what I am using for each clip - just repeated and named accordingly.
Code:
addEventListener(Event.ENTER_FRAME, leftbubbleMove);
function leftbubbleMove(e:Event):void {
if (leftbubble_mc.y > - 150) {
trace(leftbubble_mc.y);
leftbubble_mc.y -=2;
[Code] .....
View 1 Replies
Aug 1, 2010
obj_mc.visible = false; not working on mac, work good on pc.
View 3 Replies
Sep 20, 2010
I have my preloader which seems to be working correctly, however it only becomes visible as around 80%. So the page is blank up until then, then after that the loading bar is finishing and then goes to the rest of the site.
View 11 Replies