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




_visible Property...how Does It Work?



Hi!

I'd like to know how can I do to make a button or a graphic to become visible/invisible.

Any idea??

Thanks... and keep on rockin' !!!



FlashKit > Flash Help > Flash ActionScript
Posted on: 09-20-2001, 05:35 AM


View Complete Forum Thread with Replies

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

_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!!

[F8]using _visible Property
I'm creating a standalone .exe file in Flash. Instead of loading external swf's (the whole file needs to be completely self-contained if possible) I'm trying to use the _visible property to turn a slide show on and off. However, when I assign a "_visible = true" property to a button, the movie only stays visible for one frame then blinks off again.

Complicating this somewhat is that I'm using a scroll pane component. The button which turns on the _visible property is inside the scrolling content, and the slide show plays on a layer in front of the scroll panel. So the end result I'm looking for is being able to make the slide show visible from inside the scrolling content, then turning it off again with a button that is either inside the slide show or a separate mc.

Thanks for any help!

Gerry

_visible Property
I am loading external swfs as my webpages, but when i roll over them and go over a location where i have buttons on my homepage behind the external swf i still get the little hand pointer, but there is no button in the swf just on the homepage(parent swf) behind it. I thought of trying to make the buttons not visible when i load an external swf but that was no help because then they go away before the page is loaded. Is there an alternative to this problem. Please Help!

Help With Text._visible Property
In my movie when I get to a certian key frame I want to make 2 text fields that are in the next frame invisible. But I don't seem to understand the syntax correctly.

Would not do something like this in the keyframe before you get to the frame with the text? I need to control it from one frame ahead.


Code:
evelutionText1._visible=false;
evelutionText2._visible=false;

Problem With _visible Property
i got this as error

**Error** Symbol=Clock, layer=a, frame=1:Line 6: Syntax error.
clock_mc.0_mc._visible =false

this is the code

clock_mc.0_mc._visible =false

0_mc is a movie clip that is inside clock_mc, another clip, WHATS WRONG :S this is driving me crazy

Please Explain _visible Property...
Can someone please explain how the _visible property works and how I can use it with loading external movies into my main.swf...

I have 3 movies loading into my main and I want to hide two of the movies until my main movie is preloaded. I am using a preloader for the main movie but I don't need it for the other two movies...

Any help is appreciated.

Help With _visible Property Onload...
Hi All,

I'm hoping someone can help me with this... I have 2 EXTERNAL movies being loaded with initial load of my site into my main.swf, one of which (movingbg.swf) is being loaded with a preloader. The problem is that my other movie (menubar.swf) is loaded before my first movie. I think I should use the _visible property to solve this and here is what I have so far...

On second.swf I have:

onClipEvent (load)
{
_y;
_y = 0;
this._visible = false;
}

On my preloader located in my main I have:

this.onEnterFrame = function ()
{
var _l1 = _root;
percent = _l1.empty.percent;
if (_l1.empty.percent == 100)
{
_l1.menubar._visible = true;
this._visible = false;
} // end if
};




I am stuck because I have no idea what to use in the first frame of my main movie. I think I am on the right track here... please let me know if I am not.

Any help is greatly appreciated.

Question On The _visible Property
As in, I want to load up a bunch of jpegs, but not display them on the stage.

Is there a way to load jpegs and swfs, into the library, and not even worry about killing their visibility on the stage?

thanks

Property Assignments Etc. Ignored (_visible And SwapDepths Mainly)
Hi!

I have a lot of functions which are called in an onClipEvent(enterFrame) based on a lot of boolean variables. One of the functions sets ._visible = true and .swapDepths(nDepth)
on a clip, but it doesnt happen. if I try to trace the ._visible property, it's true, but in the debugger it's still false. the clip doesn't show either. I even tried to call ONLY .swapDepths in one frame, but this results in some random behavior.
Seems like only 60% of my new settings is applied, but all of the code is correct. (believe me, I'm not green)
Is there some rules not described by Macromedia for those properties and methods? Like "this action must be executed in a frame for iteself".
I haven't found anything in the documentation.

please help!!

bonghead

Changing The _visible Property Of A Symbol
As above, how do I set & change the visible propery of a symbol?

The only reference to visibility I could find was under properties in the actionscript menu.

_visible Property Not Displaying Correctly
I have a problem with programming a simple Memeroy game, where you have to find pairs. Only two cards can be revealed at a time. If it is a pair they will stay visible, if not they should be turned again after waiting some seconds. The pictures are the underlaying layer, the backside of the cards are in movieclips of which the visible property is changed and invisible buttons on top trigger the thing.

The SWF can be viewed at http://www.mhofele.de/Memory3.swf

The code should be fine, because all the trace prompts are correct, but somehow I can't see the visibility changing on the second cards. Can someone see what is wrong with it?
Here's the code of the buttons. (There is only a global variable in the framescript, no other scripts)


Code:
on (release) {
trace ("Beginn");
if (A2._visible == true) { // this script is only doing something, when card was not revealed
trace ("card is not yet revealed");

// 1. Click
if (aufgedeckt < 1) {
trace ("1. Click");
A2._visible = false; // reveal card
aufgedeckt++;
trace ("Variable 'aufgedeckt' was increased by 1");
k = A2;
trace ("movieclip is saved in global Variable k");
trace ("k = " + k);
}

// 2. Klick
else {
trace ("2. Click");
trace ("reveal card");
setProperty("A2", _visible, false); // reveal card

trace (" is partnercard already revealed?");
if (D2._visible == false) { // if partnercard (pair) is revealed
aufgedeckt = 0;
trace (" Card was already revealed, var 'aufgedeckt' is set to 0");

}
else { //if 1. Click was not the partnercard: wait and then turn the cards

//Timer
trace ("Timer for waiting: wait 3 seconds");
x = getTimer()/1000;
y = x+3;
while ((getTimer()/1000) < y){
trace ("Timerstart:" +x +"Timer plus 3 seconds" +y);
setProperty("A2", _visible, false); // Karte aufdecken
}
trace ("Timer finished, now turn cards again");

trace ("turn this card");
setProperty("A2", _visible, true);
trace ("now turn the card that was revealed first");
trace (" What is in k? " + k);
setProperty ("k", _visible, true);
aufgedeckt = 0;
trace ("cards are turned and 'aufgedeckt' was set back to 0");
}
}
}
}
[Edited by MoniH on 05-25-2002 at 05:28 AM]

Looping And Setting _visible Property
Hi everyone, I've been a lurker for awhile, but now I'm stuck myself.

I'm basically trying to load a given number of .swfs into new mc's and then turn the _visible = false but it's not working. I think I'm reference the mc's correctly since the positioning is working...here's the code. And it is getting in the if..then statemement. THe movies are loading and positioning, just not hiding. Thanks!

PHP Code:



for (x= 1; x <= maxSlide; x++) {
    var sName = "slide" + x;
    this.createEmptyMovieClip(sName,x+1);
    this[sName]._x=0;
    this[sName]._y=50;
    var sPath = "content/" + sName + ".swf";
    trace (sName + ", " + sPath);

    if (x>1) {
        trace ("in loop, " + sName);
        this[sName]._visible = false;
    }
    
    loadMovie(sPath,sName);


CreateEmptyMovieClip() And Setting _visible Property
I am attempting to create a series of empty MCs, load an external .jpg into each created MC and then make the MCs invisible so I can have my way with them later in the file.

My code is as follows:


Code:
var slideCount = 1;
while (slideCount<=6) {
createEmptyMovieClip("slide"+slideCount, slideCount);
loadMovie("img/img"+slideCount+".jpg", "slide"+slideCount);
setProperty("slide"+slideCount, _visible, false);
slideCount++;
}
The creating and the loading are working fine. But it seems it is not possible for me to set the _visible property of the created movie to false. Strangely, any other property I attempt to manipulate this same way (_alpha, _x, _xscale, everything else I've tried) works. But not _visible. I've even tried using direct references in later frames to make these created clips invisible and it's not working.

What am I missing here? So baffled.

._visible Property True...only For Several Seconds?
Hi everyone,

I'm wondering if there is a way to make a movie clip only visible for several seconds. Instead of saying


Code:

this._visible = true;



Is there a way that "true" could be replaced with the amount of seconds somehow?

Thanks for any advice here.

Brian

_visible Property Resets After Scene Redraws
Hi,

I have a button on a scene. I make it invisible onrelease and goto a different scene. When I come back it is visible again.

What can I do besides not leave the current scene?

_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

Why _visible=true Does Not Work?
I have an horizontal sliding mc.When the target position is reached, I set the buttons to _visible=false, they are no more useful because the end of slider is reached.But then I want to set them to _visible=true when the slider changes the position back.
Everything works except _visible=true.
Can someone tell me why?


PHP Code:



import mx.transitions.Tween;
import mx.transitions.easing.*;
new Tween(mc, "_x", Bounce.easeOut, 1151, 0, 1, true);  
var target = 0;  
next.onRelease = function() {  
    target -= 770;  
    new Tween(mc, "_x", Strong.easeInOut, mc._x, target, 1, true);  
    if (target == -770) {  
        this._visible = false;
        trace(target)
    } else {  
        this._visible = true;  
    }  
};
prev.onRelease = function() {  
    target += 770;  
    new Tween(mc, "_x", Strong.easeInOut, mc._x, target, 1, true);  
    if (target == 0) {  
        this._visible = false;
                          trace(target)
    } else {  
        this._visible = true;  
    }  
}; 

Why Won't A Simple _visible Action Work
This is driving me crazy. I simply want some movie instances to go invisible when the movie starts. I have an action

setProperty ("_root.1", _visible, "false");

in the first frame to tell the target "1" to turn invisible.

Why won't this work? I am pulling out my freakin hair!!!
Also, i want the y-coordinates to determine whether a movie instance goes visible (true) or not. How can I tell if, for say, the mouse is between 80-90 pixels to do something (turn _visible of an instance true or false)

I think i'm just stupid!

ROBT

Mymovieclip._visible = False // Won't Work
could somebody tell me wy this action suddenly fail :


Code:
mymovieclip._visible = false


Instead I used setproperty(...,...,..)
and this works

I'm getting really mad !!!
News

This Is So Dumb - 1 Line _visible Clip, WHY NO WORK?
Ok, I have a clip on a movie, and the movie is 500 px in height.

When the user moves the mouse down past 300 px, I want a clip to become visible.

Right now, it's hidden with a simple _visible=false; and that works...

But this:

Code:
if (_ymouse > 340) {
movieclip._visible=true;
}
this doesn't work.

I've tried it with _root (it's on the root) but to no avail.

WHAT THE FUDSASDAS?

please help.

Does "_visible" Property Really Invisible?
A simple Question!
I have a movieClip with a lot of tweens... When I set the "_visible" property to FALSE, does my movieClip still running for my CPU??? Does my CPU still calculate the tweens of my Mc???

Thank's for lightning me???

???

Set Property (it Does Not Work)
I want to zoom in/zoom out on an movieclip.
I have tried to give the buttons an actionscrip
it has an error and i don't know what because it doens't work

Action:
setProperty ("porsche", _xscale, (int(getProperty ("porsche", _xscale))/1.15))

PLEASE HELP ME

Can't Get PrintJob Orientation Property To Work
Hello there, I am trying to enable printing of a page from a flash website i am working on. The only property I need to alter is the orientation property of the printJob object. I have tried setting this but it will not work. I have also tried another alternative suggested on the forums here of rotating the movieclip -90 but this just gives me a blank sheet! (I am not sure if this is because I am printing the root).
If anyone could let me know how to get this to work I would be really grateful
Have a good weekend
Here's my code:

ActionScript Code:
_root.my_btn.onRelease = function() {    var pageCount:Number = 0;    var my_pj:PrintJob = new PrintJob();    if (my_pj.start()) {        this._parent.bgnd_mc._visible = false;        this._parent._xscale = 95;        this._parent._yscale = 95;        if (my_pj.addPage(0)) {            this._parent.bgnd_mc._visible = true;            this._parent._xscale = 100;            this._parent._yscale = 100;            pageCount++;        }    }    my_pj.orientation = "landscape";    if (pageCount>0) {        my_pj.send();    }    delete my_pj;};

Set Property Problem Movie Looks Ok In Browser Won't Work?
PROBLEM

I have made a movie clip wich i want to scale when you roll-over.
This is what i've done!

i've made a button on the mainstage.
when you rollover the button it triggers the movie clip with set property x-scale and y-scale.
So when i publish the movie i see the movie clip on the stage and when i rollover the clip it changes the size of the clip, but when i look the to the published movie in my browser it won't work!!!!!!!!!!!
The movieclip won't scale and stays the same size.
When i look without the browser to the movie it works fine???????????????????

This is the script i wrote:

on (rollOver) {
setProperty ("test", _xscale, "400");
setProperty ("test", _yscale, "400");
}

:::: Duplicate And Set Property Dont Work Y ? Urgent Please :::::
onClipEvent (load) {
byteTotal = _root.getBytesTotal()+" in Bytes";
lastX = _root.getBytesTotal()+" in Bytes";
// for count number
countString = _root.getBytesTotal()+"";
i = countString.length;
// for split number
for (beginSplit=2; beginSplit<=i; beginSplit++) {
lastMeter = getProperty(eval("meter"+(beginSplit-1)),_x)+ (30 * beginSplit);
trace(lastMeter);
duplicateMovieClip("_root.meter1", "meter"+beginSplit, beginSplit+1000);
setProperty("meter"+beginSplit, _x, lastMeter);
setProperty("meter"+beginSplit, _y, getProperty(_root.meter1, _y));
}
}

it still at same position

Does Using The Css Z-index Property For Flash In Html Work?
i'm putting together a hybrid html/flash site and i want some html text to be above a flash file but it appears to go behind the flash file. i've set the flash file to be z-index 1 and the text to be z-index 2. i've solved it by making the flash transparent but does anyone know why the z-index solution isn't working? thanks.

TileList InnerWidth Property Doesn't Work Right
OK, from my perspective, the innerWidth property of the TileList component does not work right. I would be glad to have SOMEONE PROVE ME WRONG! *hint hint*

I want to know the width of the "content" of the TileList, not the TileList component itself, which is exactly what the Flash Help documentation says it does. However, when I try using it, it doesn't give me the width of the content; the closest it comes is giving me width of the columns that I define in the Flash authoring environment for that component.

I need to know the content width dynamically! Thx for your help!

Access Of Undefined Property. Work.addEventListener
Hello Guys,

I am hoping someone can help me, as i have been trying to get this to work for the last four hours.

I am trying to create button that links to URL address with AS3.0 This is the code I am using:


Code:
work.addEventListener(MouseEvent.CLICK, callLink);
function callLink():void {
var url:String = "http://www.hologramdesigns.com";
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, '_self');
} catch (e:Error) {
trace("Error occurred!");
}
}


However, I am retrieving this error on running.

1120: Access of undefined property work. work.addEventListener(MouseEvent.CLICK, callLink);

I have attached the .fla file if anyone can assist me with where I am going wrong it would be much appreciated.

Text Property Doesn't Work After Goto
Hi there!

First of all I'm sorry for my bad English but I'll try to explain my problem as good as possible.

I've just started learing Actionscript and I'm now working at my first project. I'll try to develop a chat based on Flash(Actionscript) and PHP/MySQL. The PHP and MySQL part isn't the problem but I've got a little problem with the Actionscript part.

My main-chat-frame comprises of a chatlog part which is a TextArea instance and a InputText instance to enter a text. By pressing the enter key the script automatically sends the text you entered to my PHP Script, which inserts the message to a MySQL database. On the left side there are a few buttons for specialfunctions. If you press one, you should be directed to another frame (gotoAndPlay). Each frame is stopped with a stop() command at the beginning of the code. Everything works fine.

So, if you press one of those buttons you get directed to another frame using gotoAndPlay(). But if I go back to the main frame (again using gotoAndPlay()) I'm not longer able to get the text the user has entered.

my_textfield.text is always empty if I first directed to another frame and then back to the main frame (everthing else works)

Can you help me with that?

Thx for your help

Access Of Undefined Property. Work.addEventListener
Hello Guys,

I am new to Action Scripting 3.0 - and I am having difficulty getting a button to open a URL.

I have created an invisible button called work (hoping that it would) and this is the action scripting I have created.


ActionScript Code:
work.addEventListener(MouseEvent.CLICK, callLink);
function callLink():void {
  var url:String = "http://www.hologramdesigns.com";
  var request:URLRequest = new URLRequest(url);
  try {
    navigateToURL(request, '_self');
  } catch (e:Error) {
    trace("Error occurred!");
  }
}

When I run/publish this script flash reports back this error. 1120: Access of undefined property work. work.addEventListener(MouseEvent.CLICK, callLink);

I hope someone can help.

TextArea Doesn't Work W/ Html Property
IDE version : Flash 8 / CS2

I have big troubles with TextArea component using html and embedFonts properties with integrated font.

In brief words:

-When embedFonts and html properties are true and using integrated font, my textarea is empty. No error in action script.

-When embedFonts is true and html propertiy is false and using integrated font, I see my text with the integrated font but all html tags appear as text elements.

-When embedFonts property is false and no reference to integrated font, just html property with true, text appears with html aspect. But with default font.

trying to understand and fix the problem, but with no success. I did not find any information about this strange behaviour....

_alpha Property Doesn't Work With A Dynamic Textfield
Hello guyz,
i've a problem.. maybe look as a stupid problem but i cannot solve it.. :(

i've a for statment and in it a dinamically attached movieclip from library..
into this movieclip there's a dynamic textfield and i insert into it a string ..
all rights..
but my problem is to assign _alpha property to the mc ! !

for example
Code:

// container is a mc on the stage
str = "my name"
for (var i=0; i<str.length; i++) {
    letterMc = container.attachMovie("mc", "mc_"+i, container.getNextHighestDepth());
    letterMc._x = xpos
    letterMc._alpha = 10 // this doesnt' work [/b]
    letterMc.field_txt.autoSize = "left"
    letterMc.field_txt.text = str.substr (i,1)
    xpos += 10
}


the line letterMc._alpha = 10 doesn't work.. infact the textfield into the letterMc movie clip is always visible..

i've tested into flash debbugger and i've noticed that _alpha property of letterMc is 10 ! ! ! but the textfield is always entirely visible !!?

can depend from the type of textfield ( that's dynamic ) ??

please help me to solve

hello

tnx a lot ;)

Get Property Visibility Set Property Visibilty
I am trying to work out some navigation on a site to make it more user friendly.
I have a number of buttons which when clicked set their correspoding graphic to visible and all the other relevant graphics to invisible.
This is so I can get the graphics to appear in the same place but only one visible at any time so no overlap.
What I already have is a rollover so that when the user rolls over the buttons the corresponding graphic will appear. Then dissappear on rollout. And the script to place my graphic in the right place and make it visible. Here is the script.

on (rollOver) {
setProperty("_root.drag0", _visible, "1");
setProperty("_root.drag1", _visible, "0");
setProperty("_root.drag2", _visible, "0");
}

on (rollOut) {
setProperty("_root.drag0", _visible, "0");
setProperty("_root.drag1", _visible, "0");
setProperty("_root.drag2", _visible, "0");
}

on (release) {
setProperty ("_root.drag0", _x , 323.4);
setProperty ("_root.drag0", _y , 360);
setProperty("_root.drag0", _visible, "1");

}
The bit I can't work out is how to get the graphic which has last been clicked and locked visible (rather than temporaly visible on rollover/out)to revert to being visible on the rollout of the other buttons.
I think I need to use the get property and set property but can't quite work out how to link the two so that it checks which graphic is visible before the rollover on a different button, makes it invisble on the rollover and reverts it back to being visible on the roll out.

Sorry That was long finding it hard to explain.
Thanks for any help you can offer. I am using flash mx 6.0.

Preloder ScaleX Property And X Property
Hi!

within the loader listener's progressevent I had my preloader mc update the scaleX property and works fine, thus, it moves and scales just like a preloader does until it reaches 100. My only concern is when scaleX updates the preloader mc 'x' location seems to be moving as well making the preloader clip looked liked it scales on both sides (both ends of the line). As i examined the preloader mc 'x' property it stays the same all throughout. This is weird.

anyone?

thank you in advance.

_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;
}
}

Object.property.property ?
I'm making a movie that will read data from an object and build some rows and columns of radio buttons, but I'm having some trouble dealing with the objects that I'm using to store data on the _root.

Here's what I'm trying to test:

I have the following code on the root of my movie:


PHP Code:



radio_button_object = new Object ();
radio_button_object.row_2 = 2;
radio_button_object.row_2.radio_button_1 = true;
radio_button_object.row_2.radio_button_3 = true;




Within a movie clip named "radio_button", I've got the following code:


PHP Code:



myObj = eval ("_root." + this._name + "_object");

// inside a for loop I'm going through rows
// inside that for loop, I have another for loop that goes through columns

for (i...) {
  for (j...) {
    if (myObj ["row_" + i]) {
      if (myObj ["row_" + i + ".radio_button_" + j]) {
        (eval ("row_" + i + ".radio_button_" + j)).gotoAndStop ("selected");
      }
    }
  }
}




I've tried:


PHP Code:



myObj ["row_" + i ["radio_button_" + j]]




and:


PHP Code:



myObj ["row_" + i] ["radio_button_" + j]




But I've had no luck.

Essentially, I'm looking for object.property.property, except that the object name and all property names are variables.

Can anyone help me out?

Thanks!
cooper
www.pigdogtoad.com

My Property Is Your Property.thankyou.
im trying to create a drag and drop where you drag the image to the left of the screen and if dropped more than half way across the stage the image has a word,but once dropped can also be dragged back to how it was originally. I was thinking its something to do with getting thexproperty(as its all horizontal)

I'm new to flash so would really appreciate anyones help,
ta.

_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

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