Myclip._visible ?
hi everybody...i've got 2 movie (movie1 and movie2)when my film starts... i select random which movie to show... and start a miovie inside it..movie(n)._visible=truemovie(n).insidemovie.gotoAndPlay(2);now my "insidemovie" is the same in movie1 and movie2... and i wabt to make this to hidden (visible=false) when it (insidemovie) ends...i triedthis._visible=falsebut it doesn't work... please help me.....thanks.... Mirko
Adobe > Flash General Discussion
Posted on: 04/10/2007 07:07:23 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
MyClip.Kill() Or RemoveMovieClip();
erm ...
now i understood how to express my problem
i have a movie clip in stage with a instance name for it when the movie clip finished playing i want to kill that clip from the stage
how the function should be written ? and where that function should reside .. is it in the frame or at the end of the movie clip frame itself ? I need the code for this function, please help me !
Thanks !
MyClip.Kill() Or RemoveMovieClip();
i have a movie clip ( 30 frames) in the stage with a instance name for it, when the movie clip finished playing i want to kill that clip from the stage how the function should be written ? and where that function should reside .. is it in the main timeline frame or at the end of the movie clip frame(30) itself ? I need the code for this function, please help me !
Thanks !
How To Use GotoAndPlay() On A SWF Loaded Into An MC Using MyClip.loadMovie()
I'm using Flash MX. I have a button which exists in my main movie. It is located in a movie clip, which is in a movie clip. On the main timeline, I have an empty movie clip whose instance name is "externalMCholder".
My button code looks like:
Code:
on (release) {
_root.externalMCholder.loadMovie("Slide_06.swf");
_root.externalMCholder.gotoAndStop(3);
}
The SWF file loads into the empty movie clip just fine, but remains at frame 1. Is the problem that it tries to change frames before finishing loading the SWF file?
I thought maybe using this code would work:
Code:
_root.externalMCholder.onLoad() = function () {
_root.externalMCholder.gotoAndStop(3);
};
Unfortunately, the onLoad() event seems to have already occured before getting to this point. In other words, the onLoad() event occurs when the instance is loaded on the main timeline. This is consistent with the help documentation.
Any ideas on how to get the movie clip to go to frame 3 after it has been loaded? I've also tried using frame labels, and that doesn't seem to work either.
Thanks.
MyClip Or Button.enabled=false;
i'm used to using myClip.enabled=false to kill button functionality after a button in a series has been clicked and a transition animation has been triggered. Thereby keeping the user from clicking another button and screwing with the transition before it has completed.
in AS3, i see we still have .enabled, but when i set it to false it seems that the mouse event listeners are still picking up the mouse events and firing the associated functions...
how can i effectively disable a clip so that it doesn't broadcast events to the listener?
thanks for any help!
Control Of Movie With Myclip Commands
I am experinced in the control of movie clips remotely when the movie clip is part of the program and in my library.
Is there anyway to control a flash movie when an swf file is brought in via loadMovieNum(movie1.swf",2);
Is there anyway to tell it to stop when I want it to, or start or replay or even to tell when it is finished so I can then command something else to happen after it plays.
In other words, do I have any control over basic functions like you do with movie clips that are part of the flash program.
Control Of Movie With Myclip Commands
I am experinced in the control of movie clips remotely when the movie clip is part of the program and in my library.
Is there anyway to control a flash movie when an swf file is brought in via loadMovieNum(movie1.swf",2);
Is there anyway to tell it to stop when I want it to, or start or replay or even to tell when it is finished so I can then command something else to happen after it plays.
In other words, do I have any control over basic functions like you do with movie clips that are part of the flash program.
Control Of Movie With Myclip Commands
I am experinced in the control of movie clips remotely when the movie clip is part of the program and in my library.
Is there anyway to control a flash movie when an swf file is brought in via loadMovieNum(movie1.swf",2);
Is there anyway to tell it to stop when I want it to, or start or replay or even to tell when it is finished so I can then command something else to happen after it plays.
In other words, do I have any control over basic functions like you do with movie clips that are part of the flash program.
Control Of Movie With Myclip Command.
I am experinced in the control of movie clips remotely when the movie clip is part of the program and in my library.
Is there anyway to control a flash movie when an swf file is brought in via loadMovieNum(movie1.swf",2);
Is there anyway to tell it to stop when I want it to, or start or replay or even to tell when it is finished so I can then command something else to happen after it plays.
In other words, do I have any control over basic functions like you do with movie clips that are part of the flash program.
TellTarget Versus _root.myClip.gotoAndPlay
Flash 5/ can someone tell me what the difference is between using tellTarget and the _root.myClip.gotoAndPlay command? i just cleaned up some code on my port site and i changed all of my tellTargets to the "goto" syntax. it seems to work a bit better but i'm not sure why. i've read here before that this is the better way to go but could anyone tell me why? thanks...
_visible On MC's
Help... Here's the scenario:
I have 8 swf's loading into seperate, blank (holder) MC's. What I want is for the MC's to be invisible until a button is pressed, then the 1 MC corresponding to
the button becomes visible. When a second button is pressed another becomes visible and the rest go invisible. I don't know how to explain it properly, but you
should get the drift. The code on each button may look something like this:
on (release )
_root.MCone (_visible=true)
_root.MCtwo (_visible=false)
_root.MCthree (_visible=false)
_root.MCfour (_visible=false)
_root.MCfive (_visible=false)
_root.MCsix (_visible=false)
_root.MCseven (_visible=false)
_root.MCeight (_visible=false)
The code on each MC will be maybe like this:
onClipEvent (load)
(visible=false)
The reason for doing this is so that I can load all the clips while the intro is running to increase the smooth running of the site. Please could someone help me
with the code for the visibility on the clips AND the buttons...
Many thanks for any help given...
_visible
Hey guys, thanks for all the help so far, you have been very helpful, and i have learned a lot from it.
I have another prob here
I have made this spacegame where i have enemies coming agains me, and when i crash, its game over (hit test)
but when i am at the game over screen the enemies keeps coming over the screen. I want them to dissapear when i crash and its game over.
the game are on keyframe 1 and the gameover is on keyframe 3.. Everthing else dissapear (background, points, etc..) but not the enemyes (
Can anybody help me with this ?
thnx
Synthieboy !
_visible, Help Please
using buttons to handle MC properties (_visible). they work fine on the initial click but NOT if you click them a second time (on the second click it hides the clip again, but on the third click it functions properly????). script is as follows:
on (release) {
_root.mc1._visible=true;
_root.mc1.gotoAndPlay(1);
_root.mc3._visible=false;
_root.mc4._visible=false;
_root.mc5._visible=false;
_root.mc6._visible=false;
_root.mc7._visible=false;
_root.mc8._visible=false;
}
the default state of the MC's is
onClipEvent (load) {
_visible=false;
}
what am i doing wrong???
_visible ?
I am trying to do this with two buttons. One button only becomes visible when the other is clicked. I know the commands, but just can't get them to work.
I have two buttons, "generate" and "checkButton"
To the first button, called "generate" I apply this code:
_root.checkButton._visible = 0;
and
on (release) { _root.checkButton._visible = 1; }
Help??
_visible Bug?
Can anyone else reproduce this error?
I have an empty MC that I'm loading an .swf into.
Before I execute loadmovie, i'm setting the _visible property to false. AFTER I execute the loadmovie, I again set the _visible property to false.
The MC is still visible on the stage, even though the property reports itself as being false.
._visible ?
Hey all, I've got this form that I'm working on, with input boxes. Over the boxes is an mc of text (single frame), essentially labeling the input boxes and notifying users what info to put where. What I'm looking to do, (unsuccessful so far) is, that when the user clicks on any box to input their info, the mc visible = false.
I guess another way to word it, is there any code that can be used with selecting an input box?
Thanks,
Robb
This.MC._visible=0;
Hello,
I have 2 MCs in my library.
From the main MC, I created an instance of the firtst MC of the library. (MC1)
In the newly created MC1, I created an instance of the second MC in my library (MC2).
I want to make MC2 invisible from MC1.
I tried this actionscript :
this.MC2._visible=0;
MC1.MC2._visible=0;
But it doesn't work. After looking in newsgroups I also tried the following :
this["MC2"]._visible=0; but without success.
I'm a beginner and don't have much experience, can someone help me with this please?
_visible Help
The function below is executed and all runs well (i.e. the percentage preloader works fine and displays the percentage values in my Dynamic Text Field which has a Var label of 'loadText'. It is stored inside my percentage_mc movieclip on the main timeline), however, when the whole movie has loaded, I need to be able to hide the text field from view, but it's not working with the code I have below.
Any idea on what i'm missing? (apart from a good actionscript brain!)
Thanks for reading.
Attach Code
percentage_mc.onEnterFrame = function() {
getPercent = target.getBytesLoaded()/target.getBytesTotal();
this.loadText = Math.round(getPercent*100)+"%";
if(Math.round(getPercent*100) >= 100) {
delete this.onEnterFrame;
this.loadText._visible = false;
}
}
_visible Problem...HELP
Hello!
I am loading 10 swf's into 10 instances of a clip as a holder (as needed for positioning). In frame one of the clip that does this, I have all the instances set to _visible false. The next frame loads all the swf's into the clips. Then a mouse over list toggles the visibility for the various clips on and off. The last part works great. Like a javascript roll. However, when the movies load, even though the clips at this point in frame one where set to _visible false, I see the movies stacked up, and the last clip, 10, is still visible. There is another button on the interface that turns all those clips off and that works. Why do I see the movies in the clips when they load, even though the clips have been set to _visible false? Is there an order or processing or something? If I (and I haven't done this yet) set the mc's to visible false in frame 1 on the main timeline, would that behave any differently? It should work whereever I put it, right?
db
_visible Problems...HELP
I am loading 10 swf's into 10 instances of a clip as a holder (as needed for positioning). In frame one of the clip that does this, I have all the instances set to _visible false. The next frame loads all the swf's into the clips. Then a mouse over list toggles the visibility for the various clips on and off. The last part works great. Like a javascript roll. However, when the movies load, even though the clips at this point in frame one where set to _visible false, I see the movies stacked up, and the last clip, 10, is still visible. There is another button on the interface that turns all those clips off and that works. Why do I see the movies in the clips when they load, even though the clips have been set to _visible false? Is there an order or processing or something? If I (and I haven't done this yet) set the mc's to visible false in frame 1 on the main timeline, would that behave any differently? It should work whereever I put it, right?
db
_visible Over Frames
hi there, thanks for reading this post.
I have a movieclip called myMovie in a number of keyframes:
| | | | | | | | | | | | |
o o o o o o o o o o o o o
a
and on the first frame I call something like
stop();
this["" + myMovie]._visible=false; // as part of function
and this does make the movieClip invisible within that frame. But as soon as I go to another frame by a gotoAndPlay() action, the movieClip becomes visible. It is called myMovie on all frames.
I would like it to stay invisible. What am I doing wrong, dudes?
Thanks, Richard
How Do I Set The _visible Function?
I want to preload a movie on _level1 and make it invisible until the user clicks a button to load it into _level0 How would i do this? The code I'm using right now dosen't seem to be working.
Code in the main movie:
if (_level1.getBytesLoaded() == _level1.getBytesTotal() ) {
loadMovieNum ("allseasons.swf", 1);
allseaVisible = false;
gotoAndStop (20);
} else {
gotoAndPlay (9);
}
Code in the external .swf:
if (_level0.allseaVisible == false){
this._visible = false;
}
_level0.allseaVisible=true;
I Have Problem With _visible
i dont know what happen but first time that i click at button it not have any problem and secound time still ok but third time when i click again sth that i _visible it ...blink i try many time to find it but dont know y ??
file is at http://www.geocities.com/wondermail/Movie1.fla
_visible = False?
O.k this is what I want to happen... I load a swf into my main scene with loadMovieNum, name.swf, 1); And I added _visible = false on frame 1 of name.swf. So what I want is to click on a button within the main movie and have it bring the loaded movie into view with _visible = true, but then also make that loaded movie jump to frame 2 and play.
How would I do that. It's probably simple and I am having a brain fart, so please bear with me.
Thanks in advance, william
Stupid With _visible?
What`s wrong?
"naar_werk" is a button in a mc, in a mc.
This is what I have:
on (release) {
_root.naamtex = "tex/agenda.txt";
_root.gotoAndPlay("cv-agenda");
setprop...("instancename", _visible," must dissapeare")
setProperty ("_root.naar_werk", _visible, "false");
trace (_root.naamtex);
_root.buttonChange = 1;
}
thanx
_visible Does Not Work
Hi,
i try this:
on (press) {
_root["InhaltVorwort"]._visible = 30;
}
on (release) {
InhaltVorwort._visible = false;
}
but both versions do not work. The only thing that works is _root._visible = false. But i can not change the visible property for InhaltVorwort. Please can anyone help me?
Regards,
Alex
Question About The _visible A/s
I have an external movieclip loading into another by the a/s of
loadMovieNum("/menu.swf", 3);
it loads onto layer 3 because the menu.swf has the option to play load yet another MC inside the original.
The problem I'm having...
the second MC is just some pictures that use fades and fade in and out. When they fade in and out the original image becomes visible, which I don't want. I just want the black background to be showing...
how would I go about making the MC on 0 not be visible if the movie is loaded?
I tried
if (movie.swf=true) {
_visible=false;
}
to no avail.. lol
I'm not that great at a/s but pretty good at problem solving and this one has me puzzled...
_visible Not Working...
anything wrong with this line?
_root.stuff.gallMC._visible = false;
I can't seem to make this MC invisible.
_visible Problems....
Hi all...
On the stage I have 16 small movieclip (it's a flash gallery), then when a thumbnail is pressed, a new movieclip(viewPicture) attaches that displays the selected picture...now, I would like to hide all the things on the stage so the user can't press any new thumbs while he or she is viewing the full size picture..only the viewPicture stays visible with its exit button...how do I do that??
Now I'we used the _visible thingy and I just don't get it (well call me stupid)... I can't figure out how to write the sintax so the stage get's hidden and the movieClip stay visible..anybody out there got any ideas how to do that?
Thanks for your time...
Yurosch
Buttons._visible Not Doing What They Should Do
i posted this in another thread but it was an older thread, im still looking for the solution if anyone could help...
I start off returning 3 result sets from a mysql db via a php script. i also return values for previous, next and another called offset.
So far, the script runs the first time round and displays the 3 results. (There are 4 entries in the db, just for test purposes). I know there are 4 result sets, so i've set a variable called next to "on" and the variable previous to "off" cos i know i cant go back now. Then i've set offset to 0.
Now first off, i do have the next button visible to me, the previous button is invisible and offset is set to 0, so so far so good.
However when i press the next button, the data does move to the next result set but the variable next becomes "off" but it is still visible, the variable previous becomes "on" but is still invisible and offset becomes 1.
This is set in three frames and the code in the frames are...
frame1:
PHP Code:
if (next eq "on") {
_level0.myMc.buttonNext._visible = true; }
else if (next eq "off") {
_level0.myMc.buttonNext._visible = false; }
if ( previous eq "on") {
_level0.myMc.buttonPrevious._visible = true; }
else if ( previous eq "off" ) {
_level0.myMc.buttonPrevious._visible = false;}
stop();
the buttons in frame1 have this code...
buttonNext:
PHP Code:
on(release) {
offset = (Number(offset)+1);
loadVariables("path/to/script.php", "_root.myMc", "GET");
gotoAndPlay("nextFrame");}
then in frame2 im waiting for a variable called result to come back to tell me whether successful or not
frame2:
PHP Code:
if(result eq "ok") {
gotoAndPlay("frame1");}
else if(result eq "fail") {
gotoAndPlay("afailureframe");}
and finally on frame 3 i just have...
frame3:
PHP Code:
gotoAndPlay("thelastcheckingframe");
i have set up three dynamic text fields that show the states of next, previous and offset and each time i click the buttons they are in the correct state but the buttons are not. its driving me mad, any help is much appreciated.
Problem Concerning _visible
I've got some problems with the "_visible"-command.
I've converted two textfields into two movieclips. Then I tried to make the first one (named Test1) invible by using the following script:
_root.Test1._visible=false;
But this script doesn't work. The movieclip is still visible. Is anybody able to tell me what I'm doing wrong?
I attached the .fla-file I made for the test.
_visible Problems
Hey,
i'm trying to make a simple background change depending on the button pressed. I currently only have two.
Please take a look at the attached FLA's. If you run the larger of the two, and click on "contact", the transition should occur, and when the doors reopen, the new background does not appear. The old one disappears, though. It's driving me batty! All i'm doing when the doors are closed it putting one's visibility to false and the other to true. I'm sure my paths are correct, i must be missing something really obvious though..
The code for the visibility change is located on the MC called "transition_door_mc". The variable "file" it looks for is located on the main timeline. The value is determined by the button you press, which should also determine the file loaded and the background visibility toggle..
Help?
PS - this was created in MX2004
thanks,
-myk
_visible And Performance...
does anyone know if setting the _visible- property of mc's to false decreases cpu consumption? Or are they still calculated..?
Bart
_visible Problem
Ok Here's the problem:
I have a movieclip called "text_mc". Inside that movie clip I have movieclips "1_1", "1_2", "1_3", "1_4" on the first frame. From the main timeline I can say: setProperty("text_mc.1_1", _visible, false);
And that works perfectly.
Then I move the "text_mc" forward to the next keyframe where there are new movieclips "2_1", "2_2", "2_3" and "2_4". I can't get anything on the main timeline to find these clips and change there properties. The following will not work: setProperty("text_mc.2_1", _visible, false);
Does anybody know why?
_visible... How About _audible?
I have a movie clip that contains animation and sound. I have it on the stage, but I've set it to be _visible = false; My thinking was that if the clip was invisible, it would also be inaudible.
Is there any sort of _audible = false; equivalent that can be used? I don't want to stop all sounds - i just don't want what isn't seen to be heard.
Any ideas?
Trouble With _visible
In my game im making it so when you get hit a message appears saying "Ouch!" so I decided to use _visible to make it invisble until you get hit. But it appears at the start anyway and dissapears after a while.
Heres the script for the ouch MC:
onClipEvent (load){
function reset (){
this._visible = false;
counter = 0;
}
}
onClipEvent (enterFrame){
counter +=1;
if (this._visible == true and counter >= 48){
reset();
}
}
And heres the little bit on the control layer:
function loseLife () {
_root.ouch._visible = true;
resetAllEnemies();
lives--;
if (lives<=0) {
gotoAndStop ("Scene 2", 6);
}
}
Im new to flash actionscript so try to make things easy to understand if ive made a mistake.
If you can see the problem it would be greatly appreciated.
Thanks, Plog.
_alpha And _visible
Hi all!!!
This is my first post, I hope someone can help me out
I'm trying to change the alpha or visibility value of a dynamic textfield when reaching a certain frame, but it aint working.
Here's some of the code:
TXTDO._alpha =0;
or
TXTDO._visible =false;
How can i get this to work?
Thanks a lot!
CreateEmptyMC._visible?
I have created a new empty movie clip and successfully loaded an external swf into it. I would then, immediately, like to make the not visible and then have buttons that control when it becomes visible. Is this not possible? Here is the code I have:
code:
this.createEmptyMovieClip("textBox", 5);
textBox.loadMovie("textbox.swf");
textBox._visible = false;
But alas the textbox.swf is still visible! Why?
_visible Property?
In my main timeline i have a movie clip instance called "menu_mc" that consists of 4 buttons that animate. So when i first load the my swf or whatever i want it so 3 of the 4 buttons dont show. I tried going "_root.menu_mc.buttonName._visible=false; but it doesnt seem to work. Am i doing something wrong or what? plz help thanks!!
_visible Problem
here's my problem: I have a preloader that transfers to the movie. The movie consists of one frame, on which are many mc's. One of the mc's has "onClipEvent(enterFrame){this._visible=false}" set on it.
The problem is that when the movie is displayed, that mc shows up for 1 frame and then goes invisible, making it not look good.
I can't change it to "onCLipEvent(load)" b/c the enterFrame is crucial to the movie. I can't post the movie cause i'm scared of ppl stealing it or whatever.
_visible Command
I have a button with the follow statement
on(release){
_root.startMove.call(test, 200, 200, 350, 160);
if(test._xscale=350&&._yscale=160){
test._visible = false;
}
}
What the above does is resize a mc with code from another keyframe. I have this working correctly. What I want to do (attempted above) is have the mc vanish if it reaches a certain size.
Any ideas?
_Visible Problem?
Hi,
I have 2 buttons and 1 movieclip. One button sets the movieclip visiblity to false and the other button sets it to True. Simple so far.
The problem is i have the buttons on frame1 and the movieclip in frame 5 then the movieclip visibility remains True regardless which button i press. IF i move the movieclip to frame 1 then it works?
I need my movieclip to be in frame 5, so why cant i do this????
Thanks in advance.
LoadMovie And _visible
Hello.
Trying to load jpgs for a slideshow, but don't want to see the flicker of jpgs as they are loading. So something like this:
Code:
if (j == inputdata.length-1) {
var slide = layer(panel, inputdata[j].substring(0, inputdata[j].length-4));
slide.loadMovie(dir+"/"+inputdata[j]);
panel._visible = 1;
} else {
var slide = layer(panel, inputdata[j].substring(0, inputdata[j].length-4));
slide.loadMovie(dir+"/"+inputdata[j]);
panel._visible = 0;
}
panel._visible = 0 works very well by itself. But when (j == inputdata.length - 1), the last jpg is loaded, and panel._visible = 1, then there is a fleeting moment of flickering jpgs. How does that happen when _visible is only turned on as the last jpg is loaded? Is there a better way to handle this? Thanks much.
_visible Problems
I am trying to get movie clips that I set to _visble = false ro _visible = true. The only problem is that flash doenst seem to want to take it when the path is dynamic.
this works fine:
boardPieces[clipName][movieType]._visible = false;
this, however, doesn't:
boardPieces[clipName][movieType]._visible = true;
Now it works when they are placed right after each other (I did this for testing purposes). But when they aren't it doesn't even if I forcible set the clipName and movieType variables to a move clip that I know is there and is invisible. Any thoughts?
Help With '_visible'. Flash MX.
I have the current actionscript on a button.
on (press) {
_root.cover._visible = !_root.cover._visible;
}
cover being the name of one of my symbols.
What this does is Hide and reveal a symbol on the click of a button. What I want the script to do is reveal THEN hide a symbol on click. Flash brings up an error when I move the !, so I'm at a loss.
Any help would be much appreciated.
Class And _visible
I've done a little bit with classes and am trying to learn more, so I've been experimenting.
I have a movie clip. I clicked Properties and put in "myPlayer" as the AS 2.0 class.
Then I defined my class:
Code:
class myPlayer extends MovieClip {
function myPlayer(){
this._alpha=50;
this._x=100;
this._visible=false;
}
}
Setting the _x works, setting the _alpha works, but setting the _visible does not work. Why?
Problem With _visible
hi,
i have a series of buttons with instance name, btn1, btn2, btn3 and so on... (up to btn30)
i want to make them invisible in the first frame. so i use the following code:
for (num=1; num<31; num++) {
btn = "btn" + num;
btn._visible=0;
trace(btn);
}
when i trace btn, the output is btn1...btn30. but "btn._visible=0;" doesn't work.
btn has been replaced with btn1...and so on, when i use "btn._visible=0;", isn't it the same as using btn1._visible=0 ?
please help.
many thanks in advance.
Lawrence
_visible Question
Hey,
Im loading a swf into a container but i want it to hide until i tell it to show so ive done this.
PHP Code:
_root.onEnterFrame = function() {
loadMovie("car_doors.swf", holder);
holder._visible = false;
};
Here it hides but i cant get it to show again...
ive also tried
PHP Code:
loadMovie("car_doors.swf", holder);
holder._visible = false;
any ideas? thanks
|