Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Weird Problem With MC Visibility



I have a flash application where i use toggling the visibility of some MCs to create an effect of menus. It works fine until i revisit the initial frame to reenter parameters. Then on some cases the visibility doesnt turn off. Instead the MC is still visible but if i trace its visibility it says false even if its visible!! But if i show another menu and then close both menus in works. I have no idea what could be the problem. Can anyone help me?The url is http://bine.homeftp.net/kemont/glavno.html if you want to see for yourself. Just enter 2500 in boxes marked with an * and then try clicking the buttons. The bottom left one is to reenter parameters. The big bottom right is to send an inquiry - dont click that pleaseThanks in advance!



KirupaForum > Flash > Flash 8 (and earlier)
Posted on: 02-23-2007, 09:02 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Help: Weird Or Not So Weird Thingy With Dynamic Text Animation
http://www.david.bullaro.com/

there are 3 buttons on the right side education, experience and awards. Each loads an MC that then motion tweens into view from the side. The MC dynamically loads a text file. At the end the text blinks once. I understand the blink because i needed to reload the text for that keyframe but is there anyway around that blink?

TIA.

[F8] Weird Weird Loading Problem
Hey all,

Check out this project I'm working on:
http://www.niekdekker.com/overig/

The weird thing is, and you can see this, that the movie just stays white while it's loading. When the movie is fully loaded the movie begins.

And I am CERTAIN this has nothing to do with the way I built my flash. Even if I remove all the loading code it's still just white until it's all loaded. Think about it: There's isn't even a white frame in the entire movie!

So I dont' know what I am doing wrong.
Does anybody recognize this problem?

Thanks in advance,
Niek Dekker

Weird, Weird Stupid Problem
Ok, guys so I pressed something on my keyboard in actionScript 3 while writing code, and some weird sybmols popped up all over the place, I can't get rid of them :/

there is >> after every indent and line, and also some sort of backwards "P" on every new line.
does anyone know how to get rid of these? Cause they are crowding the code, and it's really hard to read and write.

Thanks deewds

Weird Weird Mask Problem
For some reason, all of a sudden, I'm experiencing a weird problem:

If I load an external swf into a movie clip that has a mask, the swf fails to show up. Delete the mask, and the swf appears. Put the mask back in, and POW! no swf.

The odd thing is, a project I authored a few weeks ago, with masks, works just fine!

Anybody else experience this issue??

I'm running OSX Tiger on a G5 dual processor.

Weird Weird Mask Problem
For some reason, all of a sudden, I'm experiencing a weird problem:

If I load an external swf into a movie clip that has a mask, the swf fails to show up. Delete the mask, and the swf appears. Put the mask back in, and POW! no swf.

The odd thing is, a project I authored a few weeks ago, with masks, works just fine!

Anybody else experience this issue??

I'm running OSX Tiger on a G5 dual processor.

[f8]weird DuplicateMovie...very Weird...
Hi,

I'm trying to create an application where users can add a textfield from the context menu and then extend the textbox to suit their needs. I have managed to do this pretty much but something very odd is happening when the clip is duplicated...see SWF.

Where am I going wrong if I just want the clip to be duplicated and I don't want the original clip visible otherwise the context menu would be pointless.. Notice what happens when you right-click a second time and try to extend the clip.

Code:
root_cm = new ContextMenu();
root_cm.hideBuiltInItems();
root_cm.customItems.push(new ContextMenuItem("Add card", itemHandler));
function itemHandler(obj:Object, item:ContextMenuItem) {
for (i=0; i<100; i++) {
card1.duplicateMovieClip("card1"+i, i);
}
};
_root.menu = root_cm;

And this code inside the MC

Code:
this.drag_mc.onPress = function ()
{
this._parent.swapDepths(_root.getNextHighestDepth());
this._parent.startDrag();
dragging = 1;
};
this.drag_mc.onRelease = function ()
{
trace("new_y=" + this._parent._y);
this._parent.stopDrag();

dragging = 0;
};
stop();

Finally I use this to enlarge the textbox:

Code:
onClipEvent (enterFrame)
{
if (pressing == true)
{
_parent.textbox._width = _x + 37;
_parent.textbox._height = _y + 32;
_parent.drag_mc._y = _y + 15;
_parent.drag_mc._x = _parent.textbox._width / 2;
} // end if
if (_parent.dragging == 1)
{
} // end if
}


Help would be much appreciated as I have been trying for a while now...

Weird Problem, Really Weird.
Okay, using this script on the frame...

ActionScript Code:
var Stamina = 100;
and this on a MC...

ActionScript Code:
onClipEvent (load) {
    walkSpeed = 1.5;
    runSpeed = 1.8;
    moveNum = 0;
}
onClipEvent (enterFrame) {
    if (Key.isDown(Key.RIGHT)) {
        this._x += walkSpeed;
        _root.Stamina -= .1;
    } else if (Key.isDown(Key.LEFT)) {
        this._x -= walkSpeed;
        _root.Stamina -= .1;
    } else if (Key.isDown(Key.UP)) {
        this._y -= walkSpeed;
        _root.Stamina -= .1;
    } else if (Key.isDown(Key.DOWN)) {
        this._y += walkSpeed;
        _root.Stamina -= .1;
    } else if (Key.isDown(68)) {
        this._x += runSpeed;
        _root.Stamina -= 2;
    } else if (Key.isDown(65)) {
        this._x -= runSpeed;
        _root.Stamina -= 2;
    } else if (Key.isDown(87)) {
        this._y -= runSpeed;
        _root.Stamina -= 2;
    } else if (Key.isDown(83)) {
        this._y += runSpeed;
        _root.Stamina -= 2;
    }
}

For some reason, the number never goes down by .1, it goes down by something like .100000000001. Is there a way to fix it? And how would I use Math.floor, Math.ceil, or Math.round to fix it?

StaminaBox is the name of the TxtBox

Visibility
hey all,
I'm having some problems with changing the visibility of a graphic ( i also tryed MC too). This is the code for the button to change the vis:

on (rollOver) {
gotoAndPlay (145);
}
on (rollOut) {
gotoAndPlay (135);
}
on (release) {
gotoAndPlay (160);
}
on (press) {
a = "1";
}
on (release) {
if (a == 1) {
setProperty ("_root.introtext", _visible, false);
}
}


I have some other stuff to play diffrent frames for diffrent features. but the Vis does not change on the graphic?? Any suggestions?? There is no code on the graphic telling it to appear, rather I just started it 100% vis on a frame... What am i doing wrong?

Visibility
I am trying to make a MC visable when i mouse over a button and inVis when i move out. I have that working, but how do I go about resetting the MC to frame one?? Because when I mouse out and the MC is over it stays on the last frame (i have the MC stop() at the end). Is there any way i can reset the MC???

Set Visibility Of MC's
Hi all

I am having abit of trouble trying to get MC's to be visible at certain stages of the movie. I ahve tried using the '_visible' function to no avail.

Firstly I would like to be able to set the visibility of certain MC's in frame 1.

Next I would like to know how, when clicking on another MC that action could turn on/off the visibility of other MC's.

Any help from you 'gurus' out there would be greatly appreciated. I am using Flash5.

On another matter, to get the above to work do I need to individually name/label the MC's or can I just use the names in the library?

Thanks guys

Len

Visibility On/off
I am trying to make a button act as a simple switch to make a movie clip visible or not. I have the following code, but it doesnt turn it back on. Why? thanks
Dan


on (press) {
if (_root.red4cupid._visible=true) {
_root.red4cupid._visible = false;
}

else {
_root.red4cupid._visible = true;
}

}

Visibility
How can I make a button appear/dissappear without having to use
_alpha=100/_alpha=0.
I tried using _visible but it did not work. If I use alpha the button it still there and it can be used.
Can anyone help?


Thank
Tom

Visibility
Hi all,
I created a big mechine image, all parts in this are a buttons and when cliks any part of machine you will see a popup image of that part in bigger in size.
my quary is how i will hide other popup windows when I click other part of image, giving _visible = false is some what i need to give for all popup window names, rather any easy fuctions are works, how to do this with minimum code.

thanks in advance
wating for replay

Help, Anyone (Visibility)
Well I am working on a game with mx, it was originally in flash 5, but that should not matter,
this game you are supposed to be able to walk around(I finished that script) and pick up items, now originally, I was going to have it so when you walk over the item it picks it up and goes into your inventory, but my collision test wasn't working, because my code was
onClipEvent(enterFrame){
this._visible=false;
if(keygot==true){
this.visible=true;
}
this was for the clip as the item in the inventory,
now in the actual character that you controlled i had...
onClipEvent(enterFrame){
if(_root.key.hitTest(true){
keygot=true;
}
}

and yes I named the movie clip of the keys instance to 'key'.

Could someone tell me what I am doing wrong? Please?

Set Visibility
is set visibility flash 4 compatable?

Set Visibility
Hi all, aint posted for ages but here goes!!

I have 10 geographical maps which I want to be able to set the visibilty of with 10 buttons.

so I have 10 maps one on top of the other.

I have 10 buttons

all maps have instance names of map1 etc..

when I click "button 1" I want "map1" to appear but the button to stay in the over state.

then when I click "button 1" again I want "map1" to disappear and the button to go back to a normal state.

Same goes for the other buttons maps..

Cheers If anyone can help!

David

Visibility
is there any way to set the visibility of a symbol in actionscript 2?

i was thinking something like test.visible=false;

but it didnt work, can anyone help me with this.

thank you

Set Visibility
Alrighty, I have tried this 3 ways none works, I know someone can help with this as is it sorta elementary.

On the Main timeline I set one of my MovieClips visibility to false.

Later I want an embedded movie clip to play and at the end set the visibility of the movieclip on the main timeline back to true.

Making it dissappear works fine, it's making the embedded movieclip set the visibility back to true that is failing.


Should be about 1 line of code, maybe 2 but it isn't working.

_root.XX.vsisble = "true"

??

Please help me.

How Do I Set Visibility
I am working on a navbar. When you click on one of the nav buttons, I want a "window" containing sub-menu options to appear directly beneath it. I am aware that I should place the movie containing the sub-menu under the corresponding nav button and set the visiblity to zero. But what action script do I place in the Nav button's down state to cause the movie containing the sub-menu to appear?

[F8] Visibility
Hi im a noob to actionscript. im having trouble getting this simple piece of code to work. basically i have a button and a text box, when the button is clicked i want them to disappear and another text box come up as if it was to display a result, can anyone help? here is my code:

this.createTextField("testR",this.getNextHighestDe pth(),200,200,200,50)
this.visible=false;
this.testR.border=true;
this.testR.text="display";




this.createEmptyMovieClip("container",this.getNext HighestDepth())
container.createTextField("testT",container.getNex tHighestDepth(),100,100,200,50)
container.testT.border=true;
container.testT.text="hello";
container.attachMovie("Button","hideBut",container .getNextHighestDepth())
container.hideBut.onRelease=function(){
this._parent._visible=false;
this._parent._parent._visible=true;

}

Visibility
all,

ok I'm struggling with my logic and looking for a little help. I have two movie clips mute and volume when I rollover mute i want volume to be visible...and not visible onRollOut ...(no problem there) but I need to be able to move from mute to volume without loosing visibility essentially I want to do exactly like YouTube does with there volume control and mute button but as soon as my cursor moves off the mute button could someone direct me as to how to accomplish this effect ?

mm

Visibility
How do I set a button visible to false?

Stage -> ControlsBG -> btnPlay

I have tried all three and none of these work:

ActionScript Code:
stage.controlsBG.btnPlay.visible = false;
Stage.controlsBG.btnPlay.visible = false;
stage.btnPlay.visible = false;

Visibility
I bild a page in flash8 proffesional and some people who doesnt have the flash player 8 doesnt see the appearence of my buttons.
How to make a proper publish setting that It works without instal flash playeru8.
I have allready tryed to change the publish settings in to flash5 bu It says wont be possibile cause of action script 2.
So what would be the best solution,shoul I build a special button with download flash player8? If yes How do I build button which can download the flash player

Visibility
hi is there a way of having somthing invisable that isnt done by alpha 0 becouse you can still see a faint kinda outline is there like some actionscript for it?

Visibility
hi is there a way of having somthing invisable that isnt done by alpha 0 becouse you can still see a faint kinda outline is there like some actionscript for it?

Visibility
I am trying to make a movie clip invisible. i have named it mc_button

here is my code:

on (release) {
    gotoAndPlay ("Pam Out");
    with (mc_button) {
    _visible = false;
    }
}

here is the error i get:
Error: A 'with' action failed because the specified object did not exist.

what am i doing wrong, the mc is in the same clip!

Visibility
http://www.icelebration.org/studentz/330

When the about or any other button (besides the home button) is pressed, a movie clip plays and the visibility is set for the 3thirty logo (instance named Logo) to false so it will not be able to be seen. But for some reason the logo does not become invisible. Can anyone help?
the .fla is at
http://www.icelebration.org/studentz/330/index.fla

H E L P (mc Visibility)
I have i little problem...

I have movieclip that has to start out being invisible
this._visible = false

- Or something like that
What is the code for changing the visibility of an mc from the start???
PLEASE HELP!!!

PLEASE HELP Mc Visibility
Hoping for a swift reply on this one guys.....

I need to make a movieclip invisible using the _visible code, and it has to be invisible from the first frame.
How do you script this without using onEvent???
Can you script this without using onEvent????

PLEASE HELP!!!

Visibility
hey guys,
kinda lost with a problem
say if i want to change the visibility of a button/MC on a clip of a button..
will this do it?

mcButton.onPress = function(){
mcRed1._visible = 0;
}


or do i have to use _alpha, both don't seem to work for me..

Thanks

Set Visibility Via Asp
I have a MS SQL db with some values in, if a column value is equal to X then i would like to set the visibility of a movieclip to true. How easy would it be to achieve this?

I've set an ASP page that outputs the info from my database in the variable1=value1&variable2=value2 format but do not know how to get this data into flash and use it!

Are there any tutorials that cover this, as I'm new to using Flash & DB and may get easily confused. I've taken a look at the Power of LoadVars Object article, but it doesn't seem to help me

More detail:
I have a table with eg. 20 rows. There would be a movie clip pre-placed within my Flash movie for each row in the database. On getting the data from the database into flash (via asp being on an ms platform) the movie clips are not by default visible, only those whose corresponding column is X will then become visible.

Visibility
I have an MC called Port,
When I add this code to it:
_root._visibility=false
even though the MC is on a different layer,
the whole document become not seen.

Can any help me with my not so could syntax

thanks in advance
sephers181

Problems With Visibility
Hi,

something troubleing me:

I have three movie clips:

1) sound.swf, which has in the first frame a preloader with the folowing
action:
if (_framesloaded) {
gotoAndPlay (2);
tellTarget ("_level2.muska") {
_visible = true;
}
} else {
gotoAndPlay (1);
}

and in the second frame the actual music.

2) first.swf, which is the first page, that has on the first frame a
preloader and on the second the contents plus a hole in the background (to
see the preloader of sound.swf). Than in the same frame (2) i have a
movieclip called "music" that includes a button (for music on/off) and fills
the hole in the background (positioned in the same place). This is set to:

onClipEvent (load) {
_visible = false;
}

3) menu.swf, which loads sound.swf into _level1 and first.swf into _level2

So, the idea is to have the page loaded in the following sequence: first the
menu, than the first page, which in the hole in the backgroudn displays the
preloader of the sound.swf and then, when music is loaded, it starts playing
and the button for on/off appears.
Everything works as it should except the button doesn't show... any ideas
why?

Thanks, matej

Thanx For The Help With Toggling Visibility
ok guys

Thanx for your suggestions on scripting for toggling the visibility of a movieclip, after playing around for a while I came up with this script which works pefectly:

on (release) {
if (_level0.roads._visible eq true) {
setProperty (_level0.roads, _visible, false);
} else {
setProperty (_level0.roads, _visible, true);
}
}
Nice One!

Simon

Visibility Problem
Is it possible for when a button on the main stage is pressed to have an action on that button that targets a clip on the main stage that has had it's visibility set to false, And have the button action set the clip's visibility to true and then go play a frame in that clip?

Meaning a movie clip is on the stage but invisible until a button is pressed outside the clip and told to go play a frame in the clip and then when it is done playing the frame have a stop action and another action setting it's visibility back to false. Is this possible? If so could someone please explain to me how this is done. I would so appreciate any help. Thanks all.

Mike

Mouseover Visibility
Hello there. I started using Flash yesterday to create a flowchart that a user can follow through by clicking on the process boxes to lead to the next process/desicion etc...

All that works fine, but i want information to be displayed about each process in a box that fades into view when the user rolls the mouse pointer over the process. can anyone tell me how to do this please?

Thank you.

Visibility Question
i am trying to get a movie clip to change from visible to non-visible. heres the scenerio:

i have a button, a movie clip and a dynamic text box.
every time the button is pressed , variable 'a' has 1 added to it
i want the movie clip named 'b' to be visible all the time except when a=3.
the dynamic text is only to show what variable a is equal to.

this is the script i used on the movie clip (this action script is attached to the movie clip)

{if a = 3
this.visible = false
}
{if a = 4
this.visible = true
}

but when i run the movie, the movie is never visible at any value of 'a'

whats wrong?

i would apreciate any help. thanks

Problem With Visibility...
Here is the scoop... I have the code below attached to a button on my stage... It displays a graphic that is draggable.. my problem is that it seems to "stick" after trying to roll off. It's very finicky, I want it to go away if you drag off the button but again it's finicky.

on (rollOver) {
standings_b._visible = true;
startDrag ("standings_b", true, 11, 36, 60, 43);
}
on (rollOut) {
stopDrag ();
standings_b._visible = false;
}

[Edited by nollieflip on 03-08-2002 at 06:21 PM]

Checking For Visibility - How?
I am trying to make a menu-like thing.
There is a button I am using to show/hide another object.
And that is where the problem is.

How do you check if an object is visible?
Might sound like a dumb question but I am stumped.
No matter what I put, it just seems to ignore the condition.

Thank you for your time~

Visibility Of Layers
Hi there,

is is possible to put an action on a button which indicates that a layer has to become (in)visible?

Visibility Button
Ok i want a visibility button but heres my problem i have 3 MC's two of them are text and the other is a mouse trailer i want when you press the button its makes one of the text disppear and the other appear then the circle appear and when you press it again it disappears but whats happening is its going over both of the if statements and there canceling each other out so i tried to make it work in a twisted sort of way maybe you can help me
thanx in advance

[code]
on (release) {
if (ball._visible=true) {
_root.a = 1;
}
if (ball._visible=false) {
_root.a = 2;
}
if (_root.a=1) {
ball._visible = false;
turnoff._visible = false;
turnon._visible = true;
}
if (_root.a=2) {
ball._visible = true;
turnoff._visible = true;
turnon._visible = false;
}
}
[code/]

SetProperty Visibility Help
help me please!

i need to learn how you use the setProperty+visibility stuff to make the contents of a layer be visible, and invisible, with a click of a button?

please point me with specific instructions or a tutorial.....

PLEASE HELP ME! I WILL WORSHIP ANYONE THAT HELPS ME

Buttons And Visibility
I have a button and a image symbol that I want to make appear/dissappear (toggle) depending on the actions performed by the user. I just can't figure out how to do this.

thanks

SetProperty Visibility....
Hi,
I am trying to load a scene with buttons at the top of the page. Attached to each button is a movieclip that I would like to appear when you press the button. I am trying to do this using the visibility option for the setProperty. Unfortunately this doesn't seem to be working for me...

This is the code I am using when the page first opens:

stop ();
setProperty ("text", _visible, "true");
setProperty ("bass", _visible, "false");
setProperty ("piano", _visible, "false");
setProperty ("drum", _visible, "false");
setProperty ("trumpet", _visible, "false");
setProperty ("sax", _visible, "false");


Is this wrong? Can someone please help?

Thanks!

HHHeelllpp Me With Visibility
I'm having real problems with the _visible property of a movie clip.
I just can't modify it

the stage is made of a blue circle (clip)
and a premade button

here's the code i've been writting on the button

on (release) {
_root.btntest._alpha = "30";
}

and it just doesn't want to work
Can anybody help me ??

Visibility Problem
thanx but i figured it out now I have another prob...i want to write is the visibility of somthing 100 then goto "this" flame numkber

how would i write that in code.

Thanx in advance

Too Many Calculations And Visibility
I'm working on a 3D application with a bunch of calculations. Some of those calculations are manipulating objects that are off of the stage. All those calculations make it very slow on below average computers.

My question- Does anyone know if I set the visibility to 0 of an object that is being manipulated by actionscript does the actionscript still manipulate the object even though is isn't visible?

What about masking it? If the object is not under the mask are the calculations still taking place?

Any other suggestions on how to eliminate the math being performed on objects off stage. I know that I could probably just check the x&y coordinates, but I really want to avoid doing that for every item in the movie.

Thanks.

Visibility Of Aline
Hi
I am having version 5 of Flash.I have drawn a line with a bar at the end.Value of X-axis apears in a text box as I darg the bar across the line.
I want the line to become visible as I drag the bar to the origin and become invisible as I drag it in the opposite direction.What should I do for it without writing code.

Reseting Visibility
i have 2 movieclips randomly placed on the x axis moving down the stage. once their y position is greater than 390 i have them return to a random position on the x axis, ok no problem.

but i also have a ball inside of the two movieclips that you hand to the two movieclips walking by. so when you hand it to one of them the ball becomes visible, but i want the ball to be invisible once they restart their path. so i set the visibility to 0 once they leave the stage. now if i try to hand another ball to one of the movieclips the ball wont show up at all.

anyone have any ideas how to fix this problem? if you need a better explanation just ask. Thank You!

Copyright © 2005-08 www.BigResource.com, All rights reserved