SEARCH YOUR SOLUTION HERE  

visible children with invisible parents

Hi all, I've looked but can't find this anywhere.

This may well just be because it can't be done but here goes.

Does anyone know of a way that I can make a MoviecClip "visible=false" whilst stopping just one of its children's, children's, children...etc from also going invisible.

I am aware that it can be done by setting them all individually but this will take a lot of code (and I like tidy code...and I'm lazy), and I am reluctant to use a loop as it will interrupt the animation that is going on at the time.

Any suggestions would be appreciated.

Posted On: Thursday 25th of October 2012 10:41:47 PM Total Views:  410
View Complete with Replies




Related Messages:

_visible property doesnt work for true   (121 Views)
I have a clip which is basically a set of button clips. When a button is clicked it fades (i used the ._alpha property) and finally when its 0 alpha, it removes itself (by using _visible=0 property). It works perfectly. Now when another button is clicked. I wanted the button which is currently not visible to restore its visibility. But using _visible=1; just isnt doing it (pastbutton._visible=1;). I tried a lot of trouble shooting, trace shows that the correct button path of the last invisible button is stored in pastbutton. But still when the next line says pastbutton._visible=1 still it doesnt restore the target button which is stored in the pastbutton variable. Can someone help me please
Flash [AS3] Invisible hover region   (100 Views)
I need an event to fire when the mouse enters a certain area. There will be two of these areas on each side of an image that will be changing every couple of seconds (so both hover regions will be changing with it). (They will make a button appear to advance or go back an image.) I'm sure there are a few ways to do it, but what is the best way to get this to happen I could try a mouse listener for the whole thing and test if it's within the coordinates but that seems gross... Danke
Apply blendmode colour only to visible pixels   (132 Views)
Hi all, I have a movieclip that contains a sequence of images. Each one is a transparent png of various shapes and sizes. So, here's the tricky bit! I want to use this clips multiple times in a dynamic manner, colouring ONLY the visible pixels in various colours. I have tried putting a normal movieclip over the top of these images and setting their blend to colour, which works perfect except when i add this container clip to the stage is also colours everything beneath it with the shape. Does anyone have any ideas as to how i can apply this movieclip's colour to only the visible pixels of the png bitmaps Any clues is greatly appreciated Cheerio, James
AS3 - invisible button doesn't work in loaded swf   (127 Views)
! i have a main loader swf file called loader.swf and it loads 10 swf files inside a container. the 10 swf files have invisible buttons and when i test the 10 swf files alone the invBtn-s are work fine, but when i load them with the loader.swf the invBtn-s simply don't work or react the mouse or anything... what should i do
can a mask be visible?   (158 Views)
I have a mask revealing an image... pretty simple stuff. But now I want the mask to also be visible while is is revealing the image. is this possible
AIR Image resizing independent of visible stage   (123 Views)
Ok, here is what I am trying to do: I have an air window that opens up and loads an swf half-size (my swf stage is 1280x720, but the 'preview' is 640x360). Right now, the user can import any-size image. From here the user has the ability to alter their image (elements on the stage, the positioning and scaling of the imported image, etc.). I know that there is a way to "screengrab" the stage and save that out to the user's hard drive (I got that working). Is there anyway to do this same thing, but at the full size of the stage. Meaning, the screengrab is only half-size, but is there anyway to perform similar stuff without screengrabbing, i guess Does this make sense
Embedded font not visible   (153 Views)
I stumble upon some problems with Flash IDE's font embedding, so I gave it a try and went full AS3: Code: function configureTextField(field:TextField, color:uint = 0x0099FF, size:int = 16) { field.scaleX = field.scaleY = 1 field.defaultTextFormat = new TextFormat((new DefaultFont()).fontName, size, color, true, null, null, null, null, null, "center") field.embedFonts = true field.antiAliasType = AntiAliasType.ADVANCED } [...] var fields:Array = [txtUser, txtPassword, txtName] for each (var field:TextField in fields) { configureTextField(field, 0x666666) } "DefaultFont" being a library symbol of a proper font. Problem is, this function only works in half the fields I pass to it, randomly. When it "fails", the field seems empty (even when it's not) and if it's an input one it's not possible to even place the text cursor in it. No error, no warning and the fields are exact copies of the other with different instance names. In the example above "txtPassword" worked but not "txtUser". What could it be
performance impact: addChild/removeChild vs visible   (160 Views)
I have made a flash as3 application with several different Sprite objects containing all sorts of visual content. The display of these objects is controlled through user clicks on a navigation menu. I was wondering which of the following strategies to use: 1. add all objects to the stage and set their visible property to false or true according to the user input. 2. add those objects which have to be visible using addChild() and removing the 'invisible' objects using removeChild(). My main concern is which of these strategies has the lowest impact on flash player performance.
Invisible Button Problem   (118 Views)
i have created some buttons from movieclips, and an invisible button which if rolled out will turn the visibility off. This works fine but the invisible button covers other mc's on stage and are not functional. Any suggestions
An ActionScript file can not have more than one externally visible definition?   (151 Views)
all, I am still trying to wrap my head around Adobe Flash CS5.5. I have this small error, & it is not changing, no matter how many times I edit it. The error in CS5.5 says this: 5006: An ActionScript file can not have more than one externally visible definition: charscore, healthscore This is the code: Code: package src { import flash.display.*; import flash.events.*; import flash.text.*; //public class Document extends MovieClip { var charscore:int = 0; var healthscore:int = 50; //public function Document() { init(); stage.addEventListener(MouseEvent.CLICK, startgame); } //public function init() { start_screen.addEventListener(MouseEvent.CLICK, onMouseClick); stage.addEventListener(Event.ENTER_FRAME, onEnterFrame); // set object limits to be same as stage limits for all objects score.text = myScore.toString(); start_screen.x = 273.50; start_screen.y = 201.45; } //public function onMouseClick(e:MouseEvent):void { start_screen.x = - 400; start_screen.y = 195.45; start_screen-x = - 400; start_screen-y = 247.95; trace("start game"); } //public function onMouseClick(e:MouseEvent):void { win_screen2.x = -13.35; win_screen2.y= 11.00; } //public function onMouseClick(e:MouseEvent):void { win_screen2.x = 608.00; win_screen2.y = -261.15; win_screen2-x = - 400; win_screen2-y = 247.95; trace("complete game"); } //public function onMouseClick(e:MouseEvent):void { loose_screen2.x = 45.20; loose_screen2.y = -43.45; } //public function onMouseClick(e:MouseEvent):void { loose_screen2.x = 662.30; loose_screen2.y = 188.50; loose_screen2-x = -534.05; loose_screen2-y = 399.45; trace("loose game"); } addEventListener(Event.ENTER_FRAME, onEnterFrame); } //function startgame (m:MouseEvent):void //{ //start_screen.x = -300.45; //start_screen.y = 197.45; //trace("start game"); //} //public function onEnterFrame(e:Event):void { scorebox.text = charscore.toString(); health.text = healthscore.toString(); trace (charscore +"and"+ healthscore); if (char.hitTestObject(ladder1)) { char.touch1 = true; trace ("touching ladder"); } else { char.touch1 = false; } if (char.hitTestObject(ladder2)) { char.touch2 = true; trace ("touching ladder"); } else { char.touch2 = false; trace ("NOT touching ladder"); } if (char.hitTestObject(diamond1)) { charscore += 10; diamond1.y = -10; trace ("got diamond"); } if (char.hitTestObject(diamond2)) { charscore += 10; diamond2.y = -10; trace ("got diamond"); } if (char.hitTestObject(diamond3)) { charscore += 10; diamond3.y = -10; trace ("got diamond"); } if (char.hitTestObject(diamond4)) { charscore += 10; diamond4.y = -10; trace ("got diamond"); } if (char.hitTestObject(Health1)) { healthscore += 10; Health1.y = 0; trace ("got health"); } if (char.hitTestObject(Health2)) { healthscore += 10; Health2.y = 0; trace ("got health"); } if (char.hitTestObject(Health3)) { healthscore += 10; Health3.y = 0; trace ("got health"); } if (char.hitTestObject(Health4)) { charscore += 10; Health4.y = 0; trace ("got health"); } if (char.hitTestObject(Monster1)) { charscore += 10; char.y = 0; trace ("hit"); } if (char.hitTestObject(Door)) { win_screen2.x = -13.35; win_screen2.y = 11.00; } //public function CheckHitPC():void { // if the char hits this Monster1 reduce health in Document //if (MovieClip(parent).pc.hitTestObject(this)) { //char.health--; //} //MovieClip(root).checkBulletHit(this); // root is the stage of the movieclip which GameMan is related to // parent is the level loaded onto the stage in which these NPCs are placed } } } Where am I going wrong
Flash CS5 Setting Selection Box To Invisible   (103 Views)
When I select, highlight, crop, or transform an image or symbol how can I turn the box showing me what I have selected to invisible In Photoshop you just do ctrl + h, but this doesn't work in flash.
FLASH AS2 how to make a movieclip visible for 1 second   (124 Views)
down vote favorite hi 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: function celebrate() { _root._root.>>>>>> _root.triangle_mc.scaleTo(100, 0.4, "easeOutBack", 0, glamour); _root.triangle_mc.scaleTo(100, 0.4, "easeOutBack", 3); _root.triangle_mc.brightOffsetTo(23, 0.4, "easeOutSine", 0); _root.triangle_mc.brightOffsetTo(0, 0.5, "easeOutSine", 3); _root.triangle_mc.tween('_y', 370, 0.4, "easeOutBack", 0); _root.triangle_mc.tween('_y', 418, 0.4, "easeOutBack", 3); } function wrong_answer() { _root.>>>>>> _root.triangle_mc.scaleTo(100, 0.4, "easeOutBack", 0); _root.triangle_mc.scaleTo(100, 0.4, "easeOutBack", 3); _root.triangle_mc.brightOffsetTo(23, 0.4, "easeOutSine", 0); _root.triangle_mc.brightOffsetTo(0, 0.5, "easeOutSine", 3); _root.triangle_mc.tween('_y', 370, 0.4, "easeOutBack", 0); _root.triangle_mc.tween('_y', 418, 0.4, "easeOutBack", 3); } so can anyone help with this issue of showing a mc clip for 1 second many
invisible button action script plays in reverse   (134 Views)
I just started working with Action Scripts and I am at a standstill with a problem. Any suggestions would be appreciated. I'm using Action Script 2 and FlashMX version 6. I have a sound volume slider that I am trying to make visible on rollover and otherwise invisible all other times. The action script I'm using is: slider._visible = false; on(rollOver){ slider._visible = true; } on(rollOut){ slider._visible = false; } But what happens is the reverse. It becomes invisible on rollover instead. I've tried every combination but I can't seem to solve the problem. When I use the script on the invisible button I get this output message: Scene=Scene 1, Layer=Inv_btn, Frame=1: Line 2: Mouse events are permitted only for button instances on(rollOver){ Scene=Scene 1, Layer=Inv_btn, Frame=1: Line 5: Mouse events are permitted only for button instances on(rollOut){ Scene=Scene 1, Layer=Inv_btn, Frame=1: Line 1: Statement must appear within on handler slider._visible = false; When I try to put the script on the instance of the button, the action window tells me actions can't be applied to it. When I delete the script, it still is the same problem...invisible on rollover...but the output messge is this: Scene=Scene 1, Layer=Inv_btn, Frame=1: Line 1: Statement must appear within on handler slider._visible = false; I've tried to put the actions in a separate actions layer but sill have the same issue and the same output as when I put it on the invbutton layer. I'm at a loss. Been trying to figure it out for two days now. I want to use the sound slider to control the volume of the music in a flash animation. I would so appreciate help. I am attaching the fla file in zip[ATTACH]InvisibleSoundSlider[/ATTACH]
Mc.visible = True button not working?   (117 Views)
, I'm using Flash Cs4 with As3 to make a project. In part of it I have an object which is invisible, but when a button is pressed is made visible. Only problem is, it won't make it visible. Does anyone know what my problem could be Heres my code PHP Code: importflash.events.Event;importflash.events.MouseEvent;aSettings.visible=falsevarsetVisible:Boolean=false;buttonVisibility.addEventListener(MouseEvent.MOUSE_DOWN,function():void{ if(setVisible=false){ aSettings.visible=true; setVisible=true; trace(setVisible) }elseif(setVisible=true){ aSettings.visible=false; setVisible=false; trace(setVisible) }}); I'm not receiving any errors at all, but whenever I click the button the output says "false", so I know that its not changing it to true. I can't seem to figure out what I've done wrong, so its probably just a newbie mistake of mine...
[CS3] invisible btn on top of mc not working   (138 Views)
OK I have an mc with tweening movieclips that were ripped from an original page of a project I have to re do. The original was coded differently so I need to drop the mc in the new movie. The fla here is just the mc I'm having a problem with in a simple movie with frames to illustrate what I need to do symbol1 is an mc of movieclips, when the animation is done when you press on each clip the color changes and stays until you click the next. This was originally in a an swf that used the clip to display what page you were on, follow OK, that part of the clip works fine but I need to make the clips act as buttons so when you press on each not only does the animation turn blue but it will call an onRelease _root gotoandstop (frame) function which will move the movieclip pages to there proper frames . The only way I figured to do was to make an 1 invisible btn , 5 instances of that with 5 different names. Put all the button actions on a frame and that would work. Problem is that it does work but the mc clip underneath no longer works. If I drag the btn instances off the top of the mc's and test the movie , the original animation works fine. So it seems the btn actions stop the mc from running, any way around this as I need both to work. fla link is here http://idesignnewyork.com/2009/onittest.fla swf url is here http://idesignnewyork.com/2009/onittest.swf
Issues with visible=false   (144 Views)
Hi. I'm a newbie in flash and i've encountered problem using visible = false command. I'm making a quiz page with flash so beside all the choices there are ticks and crosses indicating if the answer clicked is correct or wrong. In the main page i have a button for the user to click to get him to the quiz page with the following code: on(release){ _root.quiz_mc.gotoAndPlay(40); _root.quiz_mc.correct1._visible=false; _root.quiz_mc.correct2._visible=false; _root.quiz_mc.correct3._visible=false; _root.quiz_mc.correct4._visible=false; _root.quiz_mc.correct5._visible=false; _root.quiz_mc.wrong1._visible=false; _root.quiz_mc.wrong2._visible=false; _root.quiz_mc.wrong3._visible=false; _root.quiz_mc.wrong4._visible=false; _root.quiz_mc.wrong5._visible=false; _root.quiz_mc.wrong6._visible=false; _root.quiz_mc.wrong7._visible=false; _root.quiz_mc.wrong8._visible=false; _root.quiz_mc.wrong9._visible=false; _root.quiz_mc.wrong10._visible=false; } At the click area for the choices of the question i have the following code: on(release){ _root.quiz_mc.wrong2._visible=true; } So what i'm trying to do is to make all the ticks and crosses invisible at first, and when the user click on the area then either the tick or cross would be visible, indicating if the question is answered correctly or wrongly. It seems to be okay but i just can't figure out where i gone wrong. Please advice.
[CS3] Button Rollouts, and "invisible barrier".. driving me crazy please help   (128 Views)
Hi all.. thanks for taking the time to look at my problem, its actually making me lose hair. PROBLEM 1: RollOuts Im trying to make my new site in flash, which is pretty much unchartered territory for me. The first problem i've come accross is rollouts.. I've tried numerous tutorials, but either it just plain hasn't worked for me (after triple checking the steps) or it mentions something i havent heard of and cant find in my version of flash (flash pro 8) In my "over" tab in the button, i have a movie. its simple, it moves a box into my deed position (tween) from the right. I want it to move back to its original position (again with a tween/animated effect) when the mouse leaves the "hit" area.. how do i achieve this A few things i'v been told on other sites just plain havent worked because i get an error saying mouse events cant be used in movies just buttons. PROBLEM 2: "Invisible Barrier" As mentioned above, my button is basically a box moving into position from right to left using a tween. The thing i haven't a clue how to do is stop the thing being seen in its original position. I've made a very quick example here http://www.coredesignz.co.uk/testbutton.swf What i want (for the top button) is for the green box to be invisible when its to the right of the black line, so it looks like the bottom button (theres just a white box covering it on the bottom) Is there a way to do this, or is there a different way to achieve the deed effect Apologies for this being so long winded.. If you can help it would be much appreciated.. I've been using flash for just a day so far, so try dumb it down as much as possible. Please dont post links to tutorials.. Though helpful they may be, i've probably tried it.
Using an event handler to call multiple events you want (temporarily) invisible   (246 Views)
Is there a tutorial out there on a way to use an event handler (i.e. a button) to call up one visible event, and another number (i.e. three ">) more) to be invisible on the stage, with the other invisible items to be made visible by another button (or buttons) I've had an idea I've been experimenting with for awhile that I've not yet made work...now I'm trying a different tactic.
Textfield not visible in parent Sprite   (106 Views)
Given this: PHP Code: varcontainer:Sprite=newSprite(); var_myriad=new_Myriad(); vartff:TextFormat=newTextFormat(_myriad.fontName,24); vartf:TextField=newTextField(); tf.embedFonts=true; tf.autoSize=TextFieldAutoSize.LEFT; tf.text="world"; tf.setTextFormat(tff); ...why is it that I can see my text when I do this: PHP Code: addChild(tf); but I can't see my text when I do this: PHP Code: container.addChild(tf);
loaded swf not visible until resize   (150 Views)
ive come across a strange problem, maybe. Im loading in my main swf, which will take the place of the preloader(which consists of the entrance) like so... Code: var entrance:Entrance = new Entrance(); addChild(entrance); import gs.TweenLite; import gs.easing.*; stage.addEventListener(Event.RESIZE, onStageResize); stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; function onStageResize(evt:Event):void { entrance.x = stage.stageWidth/2; entrance.y = stage.stageHeight/2.4; entrance.width = stage.stageWidth/5; entrance.height = stage.stageHeight/1.7; } entrance.x = stage.stageWidth/2; entrance.y = stage.stageHeight/2.4; entrance.width = stage.stageWidth/5; entrance.height = stage.stageHeight/1.7; var req:URLRequest = new URLRequest("waterLight2.swf"); var loader:Loader = new Loader(); loader.load(req); addChild(loader); loader.alpha = 0; loader.contentLoaderInfo.addEventListener(Event.COMPLETE, done); function done(evt:Event):void { entrance.play() addEventListener(Event.ENTER_FRAME, entranceHandler); } function entranceHandler(evt:Event):void { removeEventListener(Event.ENTER_FRAME, entranceHandler); TweenLite.to(entrance, 1.5, {alpha:0, ease:Strong.easeIn}); addEventListener(Event.ENTER_FRAME, removeEntrance); } function removeEntrance(evt:Event):void { if (entrance.currentFrame == 30) { TweenLite.to(loader, 1.5, {alpha:1, ease:Strong.easeOut}); removeChild(entrance); removeEventListener(Event.ENTER_FRAME, removeEntrance); } } However, for some reason or other, my loaded swf isnt visible until i resize the stage. Ive been trying various things with the way the preloading is done, but it doesnt seem to change anything, and also ive tried taking out the tweens but that doesnt do anything either. Has anyone had this problem before If so, some advice would be much appreciated.