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???
???
FlashKit > Flash Help > Flash ActionScript
Posted on: 10-18-2003, 01:04 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Mc._visible=true But Still Invisible
Hi,
I have a possible glitch. If I have a movieclip that
has ._visible=false and I change it to _visible while hovering the
mouse over it, it won't appear, but the debugger still says that
_visible=true!!! And if I repeat that process but hover the mouse
somewhere else, it won't appear also which bugs me. BUT! If I start
from fresh and the mouse is NOT hovering over it, it will appear and
if I repeat it and the mouse is hovering over it, it will appear...
STRANGE!
It seems there is some initialization problem there but I can't find
it. If hovered over in the beginning, it will stay hidden all the
time, if not, it will appear even if hovered over... HELL!
Yeah and RollOver and RollOut with onRelease are defined in the first
frame, but the movie has only the first frame.
WTF ???
(Sorry for that quirky explanation, but it's what I get)
Mc._visible=true But Still Invisible (new Stuff Added)
old stuff
{
Hi,
I have a possible glitch. If I have a movieclip that
has ._visible=false and I change it to _visible while hovering the
mouse over it, it won't appear, but the debugger still says that
_visible=true!!! And if I repeat that process but hover the mouse
somewhere else, it won't appear also which bugs me. BUT! If I start
from fresh and the mouse is NOT hovering over it, it will appear and
if I repeat it and the mouse is hovering over it, it will appear...
STRANGE!
It seems there is some initialization problem there but I can't find
it. If hovered over in the beginning, it will stay hidden all the
time, if not, it will appear even if hovered over... HELL!
Yeah and RollOver and RollOut with onRelease are defined in the first
frame, but the movie has only the first frame.
WTF ???
(Sorry for that quirky explanation, but it's what I get)
}
new revelations
{
Right, I found the prob, however it still is a funny one (for me).
That movieclip uses GlowFilter (glow on RollOver) and if it catches RollOver BEFORE being declared visible, it parses some nonsense into filters and messes the visibility up. It still catches events, changes the cursor on RollOver, but stays invisible no matter what.
The import code for GlowFilter resides at frame one (only one frame in that movieclip) along with event declarations, shouldn't it have been executed at the start of application ? Obviously, I don't want that movieclip to be visible at the start, so I set it's ._visible=false at frame 1 of his parent. Does this prevent the code from being executed or what ? Does the codeflow stop at it's parent when told that the child's visibility is false, so the unlucky movieclip never gets initialized ?
Clearly, if RollOver is caught before GlowFilter is imported, the code messes it all up.
I'd welcome any progressive thoughts.
}
_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
_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?
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
Visible .... Invisible... Invisible
i am going insane!!!!
here is my structure:
In MAIN.swf, scene 1, i have a ANIMATION (called buttons)
with a collection of buttons... in one of the BUTTONS I have (which works fine):
on (release) {
setProperty ("/buttons", _visible, "0");
}
---> sample1.swf (level 43)
on (release) {
setProperty ("_level0.scene1.buttons", _visible, "1");
}
does anyone have any clues why this is not working?!!
NOTE: i have tried making the
1) 1 to true,
2) setProperty ("_level0.scene1.buttons", _visible, 1)
3) _level0.scene1.buttons._visible = 1;
any other suggestion?
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
_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?
|