Making Invisible
Hi,
I found some vibrating code online that's less than easy for me to understand. I'm trying to make the initial circles become invisible in the final frame (frame 2 of the movie clip) somehow. I don't know a lot about actionscript but I've tried setting their alpha to 0 and setting them as not visible, but something about the original code isn't letting me I think.
Thank you for any help
ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 07-31-2005, 05:35 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Making Invisible Buttons Really Invisible...
here is what i want to do:
i want to place invisible buttons across my .fla that trigger random actions in other movie clips. however, i do not want the user to know that they are triggering these invisible buttons - how do i do this?
when you roll over a button, whether visible or invisible, the cursor changes from an arrow to a hand - how do i prevent this from happening (meaning, how do i keep it as the arrow instead of changing to a hand on roll over/roll out)?
thanks
alex
Making Something Invisible
When a user clicks on a menu button I want a graphic to disappear.
What is the code for this? Is there a .Invisible function?
Buttons And Making Them Invisible
here's one that is stumping me right now... I have two buttons overlaying eachother. I only need one visible at a time, and would like to hide the other
i.e. Play/Stop button.
how can I hide one of the two buttons?
Thanks bros and bro-ettes
Making A Scrollbar Invisible ...
Hi,
It's been a while since I posted, but I'm stuck here !
The situation :
I've got a dynamic textfield 180px wide and 480px high (instancename: 'column') which gets data from an XML file and a Movieclip (instancename: 'bar') acting like a scrollbar on the right of it. Now, this works just fine.
Point is that the text may vary in length quite a bit.
What I want is to make the scrollbar invisible when the text is shorter than the height of the dynamic textfield.
I've been fooling around a bit, but I can't get the necessary information
I've been using trace(); to find out what information I could get, but even _width and _height are said to be 'undefined'
Any suggestions on how to fix this ?
Making Symbols Invisible
Ok I have 64 pictures on 32 frames, thats 2 pictures per frame If the person types the right password, then the top pictures are invisible, and the bottom pictures can be seen, and if the password types the wrong password, the top pictures stay there and are visible. The follow code is on the submit button...
The top pictures are movieclips name Symbol3 to Symbol36 and they are instances called Symbol3 to Symbol36. However, the top pictures dont go invisible
on (release) {
if((username=="blah") and (password=="blah"))
{
for(i=3;i<=36;i++) {
setProperty("_root.Symbol" add i, _visible, false);
}
gotoAndStop("granted");
}
else
{
gotoAndStop("granted")
}
}
Making A Layer Invisible
Hello
I'm making a matching pairs game using 12 cards/buttons. I want to be able to remove the card/buttons after the pair has been found is there a script where i can make this button disapear when i return to the main interface? I am a novie but have a basic concept of scripting been pulling my hair out!
thankyou
Liam
Making A Mc On Stage Invisible.How?
Hi there,
I've got an mc on my scene.When I hit but1 I won't it to be visible.When hitting button2 the mc shood appear invisible on the scene.
The mc should stay in the same frame.Any solutions,script on this?
Big thx in advance
Grtz,
Making EG. A Photo Invisible?
Hey everyone
Let's say that I have the letter "O" written with large points in a flash file. I want a picture to be behind the O, but only to be visible inside of the O? How can I do this?
- Thanks - Rune
Making Buttons Invisible
Hey,
Simple question. How do I make all future instances of a particular button invisible once the user has clicked it?
Thanks.
Making The Scrollbar Invisible If There Is No Need For It
Hello peeps,
Hope you are all OK. For the record, I'm using Flash MX 2004 and have used the Flash MX Scrollbar component in my movie.
I have succesfully fetched content from a .txt file after following this tutorial. Here is the code I have used (it's in the same frame as where the text box first appears):
Quote:
//tell Flash to display special characters
System.useCodepage=true;
// set the text field to use HTML tags
aboutuscontent.html=true;
//create a new "LoadVars" object
myLoadVar = new LoadVars ();
//load the contents of the text file into the LoadVars object
myLoadVar.load("aboutus.txt");
//check to see if the loading is completed and, if so, put the contents in the text field
myLoadVar.onLoad = function (success){
if (success == true) {
aboutuscontent.htmlText=myLoadVar.aboutTxt;
}
}
It works fine! However, I'm trying to make the scrollbar invisible if there is no need for it, by adding this code:
aboutussb._visible = (aboutuscontent.maxscroll > 1);
at the bottom, however... this has just made the frame scrollable while the scrollbar stays invisible. I'm a bit confused!
Any help would be v much appreciated.
Thanks, Sion
Making An Invisible Holder?
i'm wondering how to make an invisible holder movie clip for loading externally stored jpgs. i've made other sites where the holder mc's sat on a solid background color, and i could make them invisible just by making them the same as the background color. but for this site, the background is an image, like a photograph.
would you recommend copying and pasting that part of the background image where the images would load, and use that as the background layer of the holder clip, then paste that movie clip back into place on top of the original image, or is there a simpler way?
any suggestions are much appreciated.
[F8] Making Movieclip Invisible
Does anybody know how to make a movieclip invisible? I just want the object to remain invisible when the movie loads. I tried this
movie1_mc.visible = false OR
movie1_mc.visible = 0
But nothing happened
Any help would be great!
Thank you
[F8] Making A Layer Invisible?
Hey...
Is it possible to make an entire layer invisible using actionscript as it is to make instances invisible?
Thanks!
i.e.
Thelayer._visible = false;
Making Buttons Invisible
Hey, guys! I'm trying to load external gallery swf file into presentation. It goes perfect but when I wanna go back to the first slide the buttons don't disappear!!!!Only buttons! Everything else does. This part of actionscript goes as follows:
myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function(ok) {
newBut = _root.attachMovie('numTemplate', 'num'+i, i);
newBut._y = sliderHolder_mc._y+sliderHolder_mc._height+5;
newBut._x = (i*newBut._width)+sliderHolder_mc._x;
newBut.myNum = i;
newBut.num_txt.text = i+1;
newBut.onRelease = function() {
targX = 0-(this.myNum*274);
};
myXML.load('new.xml');
This's just a part of the whole actionscript.
Could anyone, PLEASE, help me!! What is the script for making buttons disappear when going to the next slide!!!!
HElp!!!
Making Things INVISIBLE
I want to have a keyframe that when I get's hit that it goes invisble.
I've tried
Code:
_root.tab1._visible= false;
_root.tab2._visible= false;
but that doesn't seem to work.
The MC tab1 and tab2 are on the _level0 and the keyframe that I want to trigger it is in a MC called backGroundFrame
Thanks for the help
Making Something Invisible On Loadup
ok, so im making a flash website, and i want a little caption to appear at the bottom of the screen when you rollover the menu buttons,
i've figured out all the rollover crap, but now, i need to know how to make the caption invisible when the site loads up.
the button, is a "button" symbol, the caption is a "graphic" symbol,
whats the code to make the "caption" invisible on start up ???
thanks
Making A Button Invisible
Hi all. I have an actionscript question that I'm hoping someone can help me out with. I've built (with help from these forums) an image scroller but I'd like to make the 'next' and 'previous' buttons invisible at the first and last frames frames respectively. The code I'm using for the scroll is below. I think the code I'm after should be something like this:
HTML Code:
if (targetX<720) {
btn_Previous.visible = false;
}
But I can't work out where I should put it (or even if it's correct) within the scroller code.
HTML Code:
stop();
var targetX:Number = 0;
var speed:Number = 6;
m_Images.onEnterFrame = function() {
this._x += (targetX-this._x)/speed;
};
btn_Next.onRelease = function() {
if (targetX>-8640) {
targetX -= 720;
}
};
btn_Previous.onRelease = function() {
if (targetX<0) {
targetX += 720;
}
};
Making A Droptarget Invisible
I have a clip set to _alpha = 0. However, when I run the .swf I can still see a ghostly outline of the clip. I don't want to use _visible = false because I am using the clip for a _droptarget. Is there anyway to make the clip not visible but still hitable.
Code:
dryIce_label.onRelease = function(){
dryIce_label.stopDrag();
if(eval(_root.dryIce_label._droptarget) == _root.hotspot3){
_root.container_mc.dryIce_label._visible = true;
this._visible = false;
numPlaced ++;
checkCorrect();
}else{
dryIce_label._x = 618;
dryIce_label._y = 157;
}
}
Making UIScrollBar Invisible
Hi,
let say I have a frame 100x100. In this frame there's a dynamic textfield. Is it possible to make a UIScrollBar visible when the dynamicly loaded text exceeds the frame height and invisible, when it doesn't exceed the frame height?
THX for your help
Making A Component Invisible...
Hi,
I'm trying to make a component in my movie invisible using the instance._visible = false ActionScript command. It's a button that was converted to a symbol from a series of filled rectangles and ovals. It will not go invisible although I can use the same script on a simple, independent text-box and it works fine. Am I missing something?
Thanks in advance - Jim.
Making Something Invisible On Click
Hi
i am having difficulties with making a button dissappear when the user clicks on it.
How is this done, i've given the button an instance name, now what?
Making Portion Of MC Invisible?
Can you make a portion of a movieClip invisible with AS?
For instance, make the 200 first vertical (y-pos) pixels invisible on a movieClip thats 500 pixels high?
Making A Textfield Invisible?
Hello,
I'm trying to make it when you click on the Photos button the text field behind the movie clip which loads the gallery.swf invisible because I am using xml and would like for the textfield to be invisible because I'm also using the scroller component, I tried this code but it did not work:
Code:
butPhotos.onRelease = function() {
mytextField._visible = false;
myTextField.htmlText = text_4;
myTitleText.htmlText = title_4;
empty_mc.loadMovie("gallery.swf")
};
Can I do this using code or is it easier to make a new frame and deleting the textfield and scroller and just on the butPhotos tell it to go to that frame and when you click on any other of the buttons which need to load in xml just tell it to go to the frame with the textfield and scroller on it.
Thanks
Mike
Making A Button Invisible
Hi all. I have an actionscript question that I'm hoping someone can help me out with. I've built (with help from these forums) an image scroller but I'd like to make the 'next' and 'previous' buttons invisible at the first and last frames frames respectively. The code I'm using for the scroll is below. I think the code I'm after should be something like this:
HTML Code:
if (targetX<720) {
btn_Previous.visible = false;
}
But I can't work out where I should put it (or even if it's correct) within the scroller code.
HTML Code:
stop();
var targetX:Number = 0;
var speed:Number = 6;
m_Images.onEnterFrame = function() {
this._x += (targetX-this._x)/speed;
};
btn_Next.onRelease = function() {
if (targetX>-8640) {
targetX -= 720;
}
};
btn_Previous.onRelease = function() {
if (targetX<0) {
targetX += 720;
}
};
Making Something Invisible On Click
Hi
i am having difficulties with making a button dissappear when the user clicks on it.
How is this done, i've given the button an instance name, now what?
Making Portion Of MC Invisible?
Can you make a portion of a movieClip invisible with AS?
For instance, make the 200 first vertical (y-pos) pixels invisible on a movieClip thats 500 pixels high?
Making An Invisible MC Visible Again
I have a scrolling dynamic text field. I have a script to check wether the text is long enough to require scrolling; if not, the slider is to be turned invisible.
The script looks like this:
if (_root.text.textbox.maxscroll<=10) {
setProperty ("_root.slider", _visible, false);
} else {
setProperty ("_root.slider", _visible,true);
}
The problem: The slider will turn invisible, but when the player jumps to another frame, where a longer text file is being loaded into the text field, it won't turn visible again. What's wrong here?
Making A Droptarget Object Invisible Or Nearly So
I'm using this script to create a hittest drag and drop scene...
----
on (press) {
startDrag (this, true);
}
on (release) {
stopDrag ();
if (this.hitTest(_root.adams)) {
this._xscale = 10;
this._yscale = 10;
} else {
setProperty (this, _x, "365");
setProperty (this, _y, "78");
}
}
---
what I want to do is have the visibility of the drop target, in this case "adams", drop to 50% when the hitTest is true (when the thing I'm dragging is the correct item for the "adams" target) How can I do this within this script?
anything will help! Thanks!
Drag & Drop, Making Invisible
I'm having trouble with actionscript in Flash 5 (maybe I'm mixing it up with Flash 4) trying to make an item disappear after it is dragged to a container. Using Normal Mode I have entered the following code:
on (press){
startDrag ("_root.item1", true);
}
on (release){
stopDrag();
}
That much works, but then I tried to add an if/else function to make item1 disappear if it is over the container and in Normal Mode it came out like this:
on(release){
if(_root.item1._droptarget == _root.container){
setProperty ("_root.item1",_visible, false);
}else {
_root.item1._x = x_pos;
_root.item1._y = y_pos;
}
}
Possibly it's not working because the setProperty line is not within the if statement - I have tried going into Expert Mode and changing it so that it looks like the example in my Actionscript book, but then I get messages saying the Syntax is wrong. Any suggestions? Thanks!
Making Things Visible/invisible
I'm working on a Graph Theory project, and I need the nodes of the graph to appear on the stage one at a time every 1/4 second.
In the first frame of my movie I placed this code:
vectorNodos = new Array();
for (i=0; i < 20; i++) { //There are 20 nodes
name = "nodo"+i;
vectorNodos.push(name); //saves name in an array for later use
this[name].label = i; //sets a textbox in the node to "i"
this[name]._visible = false; // makes it invisible
this[name].swapDepths(100 + i); //I need the nodes to be on top of everything else
}
A few frames (frame label: "nodos") later I placed this:
name = vectorNodos[i]; //gets the name from the array
startTime = getTimer();
currentTime = getTimer();
while (currentTime < (startTime+250)){
currentTime = getTimer();
}
this[name]._visible = true; //makes the node visible again
pop.start(0,0); //plays a popping sound
i++;
On the previous frame I set i to 0, and on the next frame I placed:
if (i<20) {
gotoAndPlay("nodos");
} else {
nextFrame();
}
Now this is the part that's driving me insane: The movie starts with the nodes invisible, and when it gets to the part where the nodes should start popping up, the sound plays properly (a "pop" sound every 1/4 second), but after the first node pops up, all the others pop up at the same time, and their labels are gone, and they're below everything else. I also tried changing their alpha setting instead of the visible setting, and nothing has worked so far. There's no other code or functions that involve the nodes, and I don't know what I'm doing wrong. Any suggestions?
Making A Button Invisible After It's Clicked?
Ok I am making a type of flash card jeopardy game in Flash MX and I want to make it so that when I click on a button it goes invisible or more or less unclickable?
So I have some buttons I click one to take me to another frame then when I go back to the frame with the buttons it's shaded out/not there/not clickable.
Does anyone know a actionscript that would do such a thing?
Making The _root Invisible When Load A Swf
My homepage loads swf through the menu. On load, the homepage has to be invisible. Here is the part concerned :
this.createEmptyMovieClip("container",this.getNext HighestDepth)
Galleriehotel_mc.onRelease=function(){
loadMovie("travelgallerymiddletrial.swf","containe r")
};
How do I have to proceed ?
Thank you .
Making Invisible, Then Mouseover=visible.
Hi everyone.
n00b so be gentle!
I have some movie clips i want to be hidden and when a user mouse's over different buttons they appear (and dissappear when the user mouse's out....)
I have a very limited knowledge of AS, i know i should use the command 'this._visible = false;' on the MC to make it invisible, and then something like '_root.movie_mc._visible = true;' to make the MC's appear...
I have tried these commands on their own, but to no avail....
Little help please?
^_^
Problem With Making Things Invisible
I made a site. Its in as2. Then i made a 3d logo using papervision3d in as3. I made a loader swf that loads the as2 file and the as3 file. It works. The only problem is when you click on a button in the as2 file i want to make the as3 file disappear, then reapper when you re-enter the main screen.
Thanks
Making An Object Temporarily Invisible
I have an embedded mpeg as my very bottom layer, what i want to do is have a section of a shape go behind an object in the mpeg when it moves so that the shape appears behind the movie object. How do i go about doing this?
Thanks!
Making Drawn Curves Invisible
I've gotta small question:
I've made a drawn menu with curves in my root. This menu loads dynamically swf into an empty container mc. Within some of these swfs, there are full page image galleries. However, the drawn curves seem to stick on top of these swf: I can still see them although the rest of the content is invisible. Now I want to make those curves also invisible... but how? some code for the menu:
Code:
//API AND LINES//
box2.lineStyle (1, 0xff00ff,0);
box2.beginFill(0xCCCCCC,0);
box2.moveTo(0,0);
box2.lineTo(0,20);
box2.lineTo(20,20);
box2.lineTo(20,0);
box2.lineTo(0,0);
box2._x=245;
box2._y=140;
this.onEnterFrame = function () {
line.clear ();
line.lineStyle(0.5,0xCCCCCC,20);
line.moveTo(contact_mc._x,contact_mc._y);
line.curveTo(245,120,box2._x,box2._y);
line.moveTo(expertise_mc._x,expertise_mc._y);
line.curveTo(245,120,box2._x,box2._y);
line.moveTo(projects_mc._x,projects_mc._y);
line.curveTo(245,120,box2._x,box2._y);
line.moveTo(office_mc._x,office_mc._y);
line.curveTo(245,120,box2._x,box2._y);
line.moveTo(profile_mc._x,profile_mc._y);
line.curveTo(245,120,box2._x,box2._y);
drwLines();
updateAfterEvent ();
}
Now I want to realise a function in an externally loaded swf that makes these lines/curves invisible. i was thinking myself of something like
Code:
btImages.onPress = function (){
_root.line.lineStyle(0.5,0xCCCCCC,0);
gotoAndStop (3);
}
But unfortunately thsi doesnt work. Any of you kirupians have got a great idea? I'd be more than happy =]
Making A Movie Clip Invisible
hi
i have to make a movie clip invisible when i press the enter key.
i used the script:
onClipEvent (keyDown) {
if (Key.isDown(Key.ENTER)) {
this._visible = false;
}
}
i have attached this to the red coloured movie clip.
can u help me out with it.
i am attaching the zipped flash file.
Making Something Visible/Invisible After Pressing A Button
Its like this
I have 3 buttons on one frame, and each of those buttons should be linked to a background. the background isn't on the same frame, the backgrounds are on 3 sequential frames after another frame between the background choice frame and the 3 sequential frames with the backgrounds on it.
so the build up is like this:
first frame with the choice buttons (3 buttons for every movieclip background)
(a) frame(s) in between
1 frame with the 3 background movie clips
another frame with the 3 background movie clips
last frame with the 3 background movie clips
Now what I would like to know is how to program in actionscript that when I press the button the backgroundmovie clip button, that it shows the movie clip in those 3 sequential frames and not the other back ground movie clips in those 3 frames
I would be very pleased if you could help me out
could some moderator move this to the actionscript forum?
Making A Movie Clip Invisible, But Tangable
How can I make a movie clip invisible, but movable by my mouse still? I have a movie clip that only moves on the x Axis and I want the left side of it (where there appears to be nothing unless you move the movie clip over a certain spot) to be movable. In other words, I want to be able to movie the movie clip without having to touch the clip exactly. I tried using the alpha, but wierdly, it still gives me some sort of shaded-like box. If I use the _visible = false; it makes it invisible and not touchable. How can I get the best of both worlds? thanks - Chris
Making Cursor Invisible After Idle In 10 Seconds
I have this script that is making the cursor invisible if the mouse have not been moved in 10 seconds.
But it only works correctly the first time. When the 10 seconds is gone the cursor is invisible allright, but after that, the cursor is only visible for 2 seconds at a time each time the mouse has been moved.
The cursor is sort of flicering. What can be done to the script?
var global_nMouseCheck:Number = setInterval(mouseCheck, 10000);
var global_oldMouseX:Number = _xmouse;
var global_oldMouseY:Number = _ymouse;
function mouseCheck():Void {
if (global_oldMouseX+global_oldMouseY == _xmouse+_ymouse) {
Mouse.hide();
} else {
global_oldMouseX = _xmouse;
global_oldMouseY = _ymouse;
}
}
_root.onMouseMove = function() {
Mouse.show();
updateAfterEvent();
};
Making Movie Clip Invisible On Different Frames
Hello everyone,
Probably a really stupid and easy question...I'm just not thinking straight
Basically I have 2 frames...on the second from is a MC called car. I was curious as to what actionscript is that I would add to frame 1, to make the MC invisible on fame 2?
For example: _root.car._visible = false...will only work on the 2nd frame (where the MC is located) and I was curious what the code would be to change it invisible thorugh the first frame...
Thanks for reading, hope it isnt to hard to understand
Problem With Making Invisible. File Attached [F8]
I have these 2 buttons and when I press button 1 i want Text group 1 to be shown and Text group 2 to be hitten.
When I press button 2 to I want text group 2 to be shown and text group 1 to be hidden. why wont the textbokses hide?
Look at the attached file.
In first frame I have this:
text1._visible = false;
text2._visible = false;
On the first button I have this:
on(release){
text2._visible = false;
text1._visible = true;
if (_root.playBluklat == false) {
_root.gotoAndPlay("per");
}
else if (_root.playBluklat == true) {
_root.gotoAndPlay("per3");
}
}
Making A Button Invisible According To Incremented Variable
Hi, I am trying to make a button invisible once a variable reaches a certain number.
Here's my code ::
Code:
if (idx > ((_root.vars2.countImages)-2)){
_root.moreMC._visible = false;
}
else {
_root.moreMC._visible = true;
}
can anyone see any problems with this code? No matter what I try, it doesn't work.
thanks
Making All Instances Of A Symbol Invisible With The Click Of A Button
Hi,
I've been wondering (and indeed trying over and over again) how to make all instances of a symbol invisible with the click of a button.
First of all, it came to my mind that it would be useful to just put all of the instances onto a layer and disable the visibility of this layer using Actionscript. However, as I found out quickly, Flash doesn't support this handy feature (yet?).
Next, I tried to use a variable (I'm not a programmer at all) and had Actionscript in the instance's -well- Actionscript area which checked whether the variable was 0 using OnClipEvent(mouseMove). If it wasn't, it would do a sharp exit using this._visible=false and disappear in style (at least, this is what I intended). Naturally, it was the button's job to change the content of the variable.
It never worked quite as I expected but I figured it would be of little use anyway since I would have to assign a different name to each instance which would be quite cumbersome.
So, how do you accomplish this feat? How do I make all instances of a symbol invisible with the click of a button?
I appreciate any help.
CrabKey
|