ActionScript 2.0 :: Button._visible With LoadVars?
Sep 17, 2004
I'm working on a site that has dynamically loaded text menu loaded with the following action:
[Code]...
what i would like to know, since this is new to me, is can i have a button instance on the stage under each variable from menu01.txt, and set the buttons to _visible=true; or _visible=false; depending on wether or not there was text loaded in the dynamic text field? also, how can i get flash to recognize wether or not text was loaded or not loaded if the var is empty?
View 4 Replies
Similar Posts:
Apr 13, 2004
One of the moderators, could you've a look at this tutorial: [URL] it doesn't works with me, maybe because I've 2004 so if you change loadVars() into LoadVars() it should work
View 2 Replies
Sep 1, 2003
Whenever i try to display anything returned by LoadVars.getBytesLoaded or Load....Total, it gives me NaN.
View 14 Replies
Oct 17, 2006
I have a survey in Flash with 5 questions. Three questions have input text boxes for the user's answers, and two have sets of radio button options. I want to send the answers to a PHP script and insert them into a MySQL database.The text boxes work fine, but the values for the radio box responses show up as "undefined" in MySQL. I'd like to know how to pass the values from the two radio button groups into the LoadVars object. The code I have is:
Code:
submit.onRelease = function(){
var questionVar:LoadVars = new LoadVars();
questionVar.question1 = question1.text;
questionVar.question2 = radioGroup1.getvalue();
[code]....
View 2 Replies
Jan 5, 2009
I'm writing a script for a form that uses related comboboxes. Depending on which item is selected from the first list the associated combobox will become viewable so they can then choose from the correct list to proceed with the form. I had a working code that had a ton of if then statements but the script becomes rather lengthy and hard to update quickly, so I wrote this to streamline the code. The following is the handler for my combobox.
ActionScript Code:
function comboBoxes() {
if(bldg_list.getSelectedIndex() == 0){
bldg_mark._visible = true; //Indicates required field
[Code]....
The units variable returns the correct data on trace(); But will not reveal the associated combobox. My guess is, because I'm trying to reveal the component with a variable instead of the actual name it doesn't understand. Is this correct? Is there a workaround?
View 8 Replies
Jun 24, 2005
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...
View 1 Replies
Jan 5, 2010
I'm using AS2 (Flash 8), and I created a subclass of MovieClip - Card and attached an instance to the stage using attachMovie. However, I can't seem to make it invisible using _visible. Using _alpha works, however, but I would like to use _visible instead. where the problem might be? Here's the relevant code:
[Code]....
One more thing, what are the events for when the mouse cursor enters or leaves a MovieClip? I've tried onRollOver and onRollOut, but those are apparently not the correct events...
View 2 Replies
Jul 3, 2007
Not having a movie clip on the stage until needed (attachMovie when it's time, and then kill it as soon as it's temporarily of no use).visible = false^ Is there a difference in processor demand? When setting visible to false, it seems to me that a few extra variables would need to be stored for the movie clip..._x, _y, _width, _height, _alpha, etc., etc., etc...but I wasn't sure how Flash goes about handling these things or which was better practice?
View 9 Replies
Feb 28, 2009
I am a little new to actionscript and I have run into a wall that I can't break down. Basically, I am using the _visible. command to turn on and off some overlapping movie objects (it's a complex actionscript button). The actionscript works just fine click on a button and it turns red click on another button and the first button turns black while the latter now turns red. The problem is that something in my actionscript is causing the following to occur. I click the first button and it goes red. I click the second button and it goes read. The first button stays red until I rollover my mouse on the button (I don't have any rollover functions) and all of a sudden it seems to refresh and go back to black as it should have done automatically..
/*
var frameStop:String = null; // stop current external swf movie from playing
var xy:Number = null; //level number of the movie clip to be stopped
[code].....
View 1 Replies
Feb 25, 2005
I am just wondering what the differences between these two are. I have an animation that I am trying to make as optimized as possible to get the best possible frame rate. I have clips on the stage that start out visible, but are then set to _visible = false for the remainder of the animation. Basically I am just wondering, is a clip still using cpu power if it is set to invisible? Would it be more optimized to swapdepth the clip to a removable depth, then remove it from the stage with AS?
View 2 Replies
Nov 1, 2003
I used the following code to read a file "images.txt" and build a movieclip by loading the images specified in the file.
I wanted to make this dyanmicaly built movieclip invisibe. i.e "setProperty (_root.preloader['part'+count], _visible, false);" line in my code below is not working.
[Code]....
View 3 Replies
Jul 4, 2009
I am working on a 'guide to the solar system' in Flash CS4, even though I use AS2 due to AS3 is confusing. If I rollover Venus for example, I want the rest of the planets to disappear using the '_visible' command. All of the planets are buttons like 'venus_btn'.This is my code for 'venus_btn':
Code:
on (rollOver) {
mercury_btn._visible = false;
}
This doesn't work, do I need to set a class or a varible? That's all the code I've used.
View 3 Replies
Nov 1, 2003
I used the following code to read a file "images.txt" and build a movieclip by loading the images specified in the file. I wanted to make this dyanmicaly built movieclip invisibe.i.e "setProperty (_root.preloader['part'+count], _visible, false);"line in my code below is not working.
[AS]
var count = 0;
var offset = 0;
[code].....
View 3 Replies
Jul 26, 2005
I discovered _visible. What I can now do is pile everything onther same frame and change the _visible of items when I want them to show. Before, I used to have different items on different frames. And I would move to the frame when I wanted an item to show. Method one is a little bit harder, but once you've done it a couple of times, it becomes easy. And I find it easier and quciker to develop once mastered. The second way, well I kind of thought: maybe this is less processor intensive? Movies are only brought onto screen when they need to appear. Is this true??
View 1 Replies
Sep 1, 2010
how do I keep something invisible until the frame of it tween starts then keep it visible until its unloaded?
onEnterFrame = function()
{
a1._visible = false;
}
if(Key.isDown(Key.SPACE))
{
a1.gotoAndPlay(2);
a1._visible = true;
}
View 1 Replies
Dec 3, 2006
I have some AS that creates a movie clip and later tries to make it go away. However, _visible isn't working as I would think. Here's a sample: I create the triangle:
[Code]...
It doesn't work, however. So, I tried trace(triangle30._visible) both before and after the second chunk of code, and it does indeed change from true to false. However, the movie clip is still visible on the screen.
View 2 Replies
Feb 24, 2008
I followed Kirupa's custom scroll bar tutorial and I'm trying to tweak a few things. Where would I put the code to make the arrows invisible when the content can't be scrolled any higher or lower? This is different from the scrollFace being invisible. I don't mean when there is no scrolling at all. Also, where would the "return to visible" (else) code go? The code I plan on using is:
btnDown._visible = false;
else btnDown._visible = true;
btnUp._visible = false;
else btnUp._visible = true;
View 5 Replies
Jun 27, 2005
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...
[Code]....
View 2 Replies
Mar 31, 2007
if i have my main swf created that is contain _root.main.somewhere and i did load some movieClip inside that somewhere!
_root.main.somewhere.picHolder.loadMovie("swf/myDesired.swf");
and inside the external file "myDesired.swf",considered as OTHER SWF, i have a movieClip:
_root.sub.myPic01
what i am doing is:
from the main swf file
_root.main.somewhere.picHolder.sub.myMC01._visible = false;
but that is not taking any action!
View 1 Replies
Mar 30, 2006
OK, I am trying to do my first simple user authentication for a test built in Flash. I'm just checking to see if someone with the same name and email exists in the mySQL database and then echoing out entryAllowed=false if they exist.
Code:
PHP Code:
//query is successful and these vars trace out in flash
[code].....
View 1 Replies
Jan 20, 2009
I have created a site that calls in text from an external .txt file. The text file is a flat file that is updateable using PHP. What I need is for the Flash site to reflect the current contents of the text file each time it's updated through the PHP interface. I'm using the standard:
myData = new LoadVars();
myData.onLoad = function() {
text_txt.text = this.blog;
[Code].....
I did get it to 'kind of work' at one point, but the output text would flash 'undefined', then show the contents of my text file, then go blank then start that loop over again. Not acceptable.
View 1 Replies
Jan 26, 2009
I keep getting this error when I try and load a text file in a dynamic text field.
'The identifier 'loadVars' will not resolve to built-in object 'LoadVars' at runtime.'
This is my code:
Code:
on (release) {
loadText = new loadVars();
loadText.load("text1.txt");
[Code].....
I want the file 'text1.txt' when I load frame 1, then when I move to frame 2 it will load 'text2.txt' etc etc right upto 20.
View 2 Replies
Feb 4, 2010
I want to load data from a text file with four elements (account, first name, last name, club status). There are 88,000 accounts.
[Code]...
View 10 Replies
Sep 2, 2009
I am converting a class into AS3 (was AS2). What would be the best way to replace the loadVars ? This is how the code looked like in AS2
ActionScript Code:
public function load(csvPath:String): void {
// Use the LoadVars class to load in the CSV file as a String
var csvLoad:LoadVars = new LoadVars();
[code]...
View 1 Replies
Dec 29, 2009
I have managed to develop code that will run a php script by passing a variable (obtained from a combobox control) to the MySQL database. Initially this works fine but if I try to repeat the excercise using a different value nothing happens.[code]...
View 4 Replies
Feb 15, 2010
I have read a little bit about loadVars and loadVariables, so I am trying to read and write to a .txt on my server. This is my functions: (only Read works, but Send doesn't)
ActionScript Code:
function Load(F, VAR) {
var DATA:LoadVars = new LoadVars();[code]...........
There are no errors or something; but the file is the same after Send();
View 5 Replies
Feb 8, 2003
When I was working with a txt file locally I used this command
file = new LoadVars();
fileURL = "PhoneBook.txt";
file.load(fileURL);
[code].....
View 7 Replies
Sep 27, 2004
I try to get a variable from php : I have a button with :
on (release) {
$myLoadVars = new LoadVars();
$myLoadVars_received = new LoadVars();
$myLoadVars.var_to_php = myComboBox.getSelectedItem().label;
$myLoadVars.sendAndLoad ( "script.php",$myLoadVars_received);
$affich_var = $envelope_received.var_from_php; }
PHP //
script.php :
<? $result = mysql_query( "select counter from data_base where data1='".$_POST['var_to_php']."'");
$counter = mysql_fetch_row($result);
echo ("&var_from_php=$counter[0]");
?>
My result of all this : nothing happens. no variable is received from php. (The is no request ( from the firewall ) from flash to access the internet). So I think the error is around the sendandload. By the way, the php script works perfectly with loadVariablesNum.
View 4 Replies
Apr 19, 2005
Okay, so ive loaded some data from PHP into a textbox in Flash with loadVariables, but then found out, that loadVariables, havent got a way of checking if everythings loaded. So im gonna use LoadVars instead,This is the old loadVariables code:
Code:
on(rollOver){
loadVariables("document.php", _parent, "POST");
[code].....
View 1 Replies
Aug 1, 2005
Just wondering if you can use the sendAndLoad method of the Loadvars object to send "POST" data to a server then recieve the response in an XML object.
[Code]...
View 11 Replies