Help Me Please.....with Variables
this should work rite
FlashKit > Flash Help > Flash MX
Posted on: 01-05-2003, 07:06 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
- EXTREMELY URGENT - Creating Global Variables Using Names Of Other Variables...
- My Variables Load With LoadVars...how Do I Execute A Loop To Assign Variables?
- Virtual Student Yrbook: Variables>Arrays>Variables? SOMEBODY RESCUE ME
- Loading Variables From Text File. ( Not Fixed Variables )
- Assigning Dynamic Text File Variables To Variables
- Return Variables From Php To Load In Flash Text Variables
- Targeting Variables Or Loading Variables In An Array
- Comparing Variables To Variables In A Text File
- Split Variables Multiple Times Into Different Variables
- Pulling URL / Get Variables OR Environment Variables
- Adding Variables To Variables In An If Statement
- Help: Passing Variables (180 Variables) To Function
- Variables Holding Variables For ASP - Here's The File. HELP
- Declare Variables AS2 Verses Variables AS3
- Load Variables, Remembering Variables
- External Varibles, Pathing Varibles, Targeting Variables OMG I HATE VARIABLES
- Finding Variables With Variables
- [MX] Using Variables To Call Variables...
- Assigning .txt Variables To Other Variables?
- Rephrase: Using Variables Within Variables
- Variables Refering To Variables
- Variables/Variables Loading
- Variables Calling Variables
- Variables Inside Variables ?
- Variables?
- Several Mc´s, Several Variables
- Can Someone Help Me With Using Variables... :(
- Asp Variables
- Variables From Txt? From Swf? From CGI?
- Variables, Variables, And More Variables
- Variables
- Swf & Variables
- If, Else If, &&, ||, =, Variables…help
- Variables
- How To Get Variables
- Variables Help...
- Variables
- URL Variables
- Variables, When And How
- Variables
- Variables
- Variables
- How Do I Add Variables
- Variables
- Variables........?
- Variables?
- Where Have My Variables Gone?
- Get URL And Variables
- Variables Help Plz
- Im New With Variables. HELP
EXTREMELY URGENT - Creating Global Variables Using Names Of Other Variables...
I have variables xtile and y tile within a movie, and I need to create a global variable that will tell all other movies that this particular movie is situated on tile [xtile][ytile], so I need to know how to create the global variable: _root.objectmovie_xpos_xtile_ypos_ytile = true;
I know how to create global variables, and how to have other movies read them, but how do I actually create a VARIABLE with this name? I tried set ("_root.objectmovie_xpos_" + xtile + "_ypos_" + ytile") = true, but that doesn't work (which I kinda knew already but thought I would give it a shot)
any ideas peeps?
please help, its vital to a project I am doing
cheers all
My Variables Load With LoadVars...how Do I Execute A Loop To Assign Variables?
I have 52 (one for each week) duplicated MCs, a loadVars(), and variables "sermonTitle" and "airDate," which I'm trying to assign with the following:
this.airDate=_root.loadContent["airDate" + sermonDate];
this.sermonTitle=_root.loadContent["sermonTitle" + sermonDate];
which is placed in an onClipEvent (enterFrame) handler of the button which is duped . The vars load when I click Video > 2001.
The vars loaded have values named sermonTitle1, sermonTitle2, etc. and the same for airDate. The numbers attached reference the sermonDate which has already been assigned though my duplicateMovieclip loop:
num = 52;
ystart = b._y
n = 1;
while (n <= num) {
duplicateMovieClip("b", "b" + n, n);
setProperty("b" + n, _y, ystart + n*17);
this["b"+n].sermonDate = n ;
trace(this["b"+n].sermonDate);
n = n + 1;
}
I've tried attaching the assign code to the dupMovieClip loop:
num = 52;
ystart = b._y
n = 1;
while (n <= num) {
duplicateMovieClip("b", "b" + n, n);
setProperty("b" + n, _y, ystart + n*17);
this["b"+n].sermonDate = n ;
this["b"+n].airDate = "airDate" + n;
this["b"+n].sermonTitle = "sermonTitle" + n;
trace(this["b"+n].sermonDate);
n = n + 1;
}
setProperty("b", _visible, 0);
and it works - as far as assigning the correct value to the correct button, but it does not associate the loaded vars with them.
The SWF is VERY sluggish, though, which makes me think the onclipEvent is not the best way of assigning vars. I get the trace(this) showing all of the variables loading, so I know that's not the problem.
Does anyone know how to best assign these? I have been advised to use a loop for it. How would I go about executing a loop for this, as I will have navs loading in different text files - Thanks
Link to SWF:
HERE
Virtual Student Yrbook: Variables>Arrays>Variables? SOMEBODY RESCUE ME
Hello, All.
I am totally stumped. I am creating a student virtual yearbook, which displays students names with pictures. I cant find a totally understandable tutorial that teaches me how to extract variables from an array. So I created an asp file that writes out all of the student records to different variable names, and load them using loadvariablesnum(). Using this ASP file works, but once I click the exit button to take me back to the front page, it is as if all of my other variables are erased.
I dont completely understand levels when it comes to loading variables, so everything is loaded like this
loadVariablesNum("http://10.0.1.2/tp/tpod/processGet_studentInfo.asp", 0, "GET"); --- "POST" gives me the same results...
To view the pictures you would click a button on SCENE 4, and it takes you to "VIEW STUDENTS PICTURES" - SCENE 11. 'EXIT' sends you back up to Scene 4, which runs an ASP file which simply grabs a message that is updated every 30 minutes. What Level would I use here??? I have tried many.
Everything works beautifully until I exit the VIEW STUDENTS PICTURES page from Scene11
I've written a pretty sizeable file that uses lots of variables.
I am pretty sure that the problem is with the ASP file: "processGet_studentInfo.asp" - because when I comment it out, the application works fine.
::::::::::::SUPPORTING INFO BELOW:::::::::::::::
Here are the variables that "processGet_studentInfo.asp" creates:
&varStudent1=Crystal&varImagePath1=http%3A%2F%2F10 %2E0%2E1%2E2%2Ftp%2Ftschool%2Fimages%2FCrystal%2Ej pg&varStudent2=Brandy&varImagePath2=http%3A%2F%2F1 0%2E0%2E1%2E2%2Ftp%2Ftschool%2Fimages%2FBrandy%2Ej pg&varStudent3=Angel&varImagePath3=http%3A%2F%2F10 %2E0%2E1%2E2%2Ftp%2Ftschool%2Fimages%2FAngel%2Ejpg &varStudent4=Cathy&varImagePath4=http%3A%2F%2F10%2 E0%2E1%2E2%2Ftp%2Ftschool%2Fimages%2FCathy%2Ejpg&v arStudent5=Destiny&varImagePath5=http%3A%2F%2F10%2 E0%2E1%2E2%2Ftp%2Ftschool%2Fimages%2FDestiny%2Ejpg &varStudent6=Amber&varImagePath6=http%3A%2F%2F10%2 E0%2E1%2E2%2Ftp%2Ftschool%2Fimages%2FAmber%2Ejpg&v arStudent7=lester&varImagePath7=http%3A%2F%2F10%2E 0%2E1%2E2%2Ftp%2Ftschool%2Fimages%2Flester%2Ejpg&v arStudent8=paul&varImagePath8=http%3A%2F%2F10%2E0% 2E1%2E2%2Ftp%2Ftschool%2Fimages%2Fpaul%2Ejpg&varSt udent9=Ginger&varImagePath9=http%3A%2F%2F10%2E0%2E 1%2E2%2Ftp%2Ftschool%2Fimages%2FGinger%2Ejpg&varSt udent10=Brittany&varImagePath10=http%3A%2F%2F10%2E 0%2E1%2E2%2Ftp%2Ftschool%2Fimages%2FBrittany%2Ejpg &varStudent11=chad&varImagePath11=http%3A%2F%2F10% 2E0%2E1%2E2%2Ftp%2Ftschool%2Fimages%2Fchad%2Ejpg&v arStudent12=jaden&varImagePath12=http%3A%2F%2F10%2 E0%2E1%2E2%2Ftp%2Ftschool%2Fimages%2Fjaden%2Ejpg&v arStudent13=Jami+Lynn&varImagePath13=http%3A%2F%2F 10%2E0%2E1%2E2%2Ftp%2Ftschool%2Fimages%2FJami+Lynn %2Ejpg&varStudent14=kara&varImagePath14=http%3A%2F %2F10%2E0%2E1%2E2%2Ftp%2Ftschool%2Fimages%2Fkara%2 Ejpg&varStudent15=Cody&varImagePath15=http%3A%2F%2 F10%2E0%2E1%2E2%2Ftp%2Ftschool%2Fimages%2FCody%2Ej pg&varStudent16=darla&varImagePath16=http%3A%2F%2F 10%2E0%2E1%2E2%2Ftp%2Ftschool%2Fimages%2Fdarla%2Ej pg&varStudent17=Jenna&varImagePath17=http%3A%2F%2F 10%2E0%2E1%2E2%2Ftp%2Ftschool%2Fimages%2FJenna%2Ej pg&varStudentCount=17&varENDER=1
-----------------------------------------------------------
Here is the meat & potatoes of the ASP file that created this:
oRS.Open "SELECT * FROM STUDENTS", oConn, 2, 3
' Move to the first record
oRS.MoveFirst
'Loop to output all the query results to the document
do while not oRS.eof
' counter to give each record a sequential listing
counter=counter+1
Response.Write "&varstudentname" & counter & "=" & Server.URLEncode(oRS("studentname"))& "&varImagePath"& counter & "=" & Server.URLEncode(oRS("ImagePath"))
' move to the next record
oRS.movenext
loop
'LET FLASH KNOW THAT WE ARE DONE RETRIEVING
Response.Write "&varStudentCount=" & counter
Response.Write "&varENDER=finished"
:::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::
Please help.
Loading Variables From Text File. ( Not Fixed Variables )
i would like to know how to make my Flash werbby load variables like this automatically everytime i load my flash webby
(this is contained inside a text file) example:
&news[15462]=hello&
&news[14890]=uuuuuuuuuuuh :P&
but i won't be using fixed numbers. these numbers will be randonmize. but how do i tell my textfield to load allll variables that contain the word "news" and a value (number) ? or is there any other ways of doing this?
[Edited by xanbarian on 07-08-2002 at 12:56 AM]
Assigning Dynamic Text File Variables To Variables
Ok so I know exactly how to load variables from a text file and catching these variables in a dynamic textbox to show there string content. But I wanted to work with the string in the passed variable (ie from txt file) BEFORE I display the text in the dymnic text box. I seem to be having trouble assigning the passed .txt file variable to a newly created variable in my movie, it keeps saying "Undefined" when I run a trace().
<code>
//The contents of the text file looks like this
&textxxx=This is the text withing the text variabale
//1st frame, layer 2 in main
loadVariables("text.txt", _root)
//1st frame, layer 1 (below layer 2)
_root.strText = _root.textxxx
</code>
->So why does it say strText "Undefined" !? Does flash not allow variables to be assigned to variables?
If you help that would be fantastic
Return Variables From Php To Load In Flash Text Variables
Im having an issue using the kirupa flash login. I already have the actual login working with php and mysql but i need to change it up a little bit and i don't know enough about php to write it myself. But here's the situation.
Flash login is a basic script, I've already modified this part and it works great
What I need to know is how to modify it so when a user logs in, php captures the $_POST and returns the alternate variable fields that consist of ("co","fname","lname","cph","email") within the ID for user and pass
also i have already made a common loadMovie to load random variables i just need the php to point to the movie
Targeting Variables Or Loading Variables In An Array
Ok I need some help
I want to make an drop box button so I can just give it a name and load the variables onto the _root stage and then it will work. So I can make one and copy it to function differently. I also have made a loop that only creates a certain number of boxes depending on the number of entries.
So I have the dropbox,'fruit' and then the loaded variables
eg. _root.fruit1vari = apple, _root.fruit2vari = pear, _root.fruit3vari = tomato
(they're loaded into the level above so I don't need 20 different load variables for one page with 20 dropboxes.
so I want the first box which is a symbol made of a text field and a button to load the fruit1var. This symbol is copied for each drop box but upon creation is assigned a simple id of n = 1
I've tried making the variable link,
buttontext = _root.fruit add n add vari
or
thisclipaddress = getProperty(this, _target)
varaddress = thisclipaddress add n vari
buttontext = varaddress
the lines go together ok but the debugger and text feild shows the whole address line not the variable contained at that address.
Thanks if anyone can help
Caspa
P.S. All of this is eventually part of a database if there are any good tutorials out there please mention them. I haven't found any just yet and I'm getting desperate. Or even an explanation on how to get a cgi script to convert the data flash sends it into an SQL query.
Comparing Variables To Variables In A Text File
I am trying to make a login in flash and I would like to have a txt file with user names and one with passwords or have one file with both. When they click submit it will see if the user name and password they entered are in the text file if they are it will do one thing and if they are not it does another.
Split Variables Multiple Times Into Different Variables
say you have the string: "tilisamazing" - how would you split that into
var 1 = til;
var 2 = is;
var 3 = amazing;
i know you can do this with substr, but what if you dont know the starting and finishing points???
i have seen people split a variable with a comma... how would u do that for this?
Pulling URL / Get Variables OR Environment Variables
If I have a flash file being called from index.html with GET variables at the end ( index.html?next=nextfile.html ) how can I have flash ( i'm using flash mx ) parse these variables so I can use them?
Or is there a better way to pass it variables, maybe in the <param> tag?
I have a basic swf that needs to have a back and next. My back will be a javascript history back button, and my next needs to read a URL from _somewhere_... The easiest way for me would be to pass it in the url, or in a <param> tag.
Thank you, in advance, for your gracious help!
Have a great week.
Adding Variables To Variables In An If Statement
I have a variable named 'Position' which is collecting numbers from various positions, and changeing = 1,2,3 etc.
I want to add 'Position' with its value to other variables:
Sentence, SentenceAnswer ets as seen below.
I have tried as you can see, but it does not work, can anybofy help.
function CheckAnswer(){
if (Sentence+'Position'==SentenceAnswer+'Position'){
_root.Feedback+'Position'=Sentence+'Position'+Corr ect;
}
Cheers
lee
Help: Passing Variables (180 Variables) To Function
hi
if i have call function like this
Math.findMax(app1, app2, app3, app4, app5, app6, app7, app8, app9, app10, app11);
but the values i have to app180
i don't want to write all this
Math.findMax(app1, ... , app180); //!!??
how i can to called the function from app1 to app180
Math.findMax(FROMapp1, ... , TOapp180);
thanx
Variables Holding Variables For ASP - Here's The File. HELP
Hey ALL,
I've created a real simple file to use as testing and have included it here. The basic idea is this.....
The green button in this file upon user click will assign the first variable [send_lv.param1] to be passed to an asp file as [active].
on(release) {
send_lv.param1 = active;
}
The second "red" button will assign a variable [stepVar] to equal "red" and then also trigger the function "yep" to execute.
on(release) {
stepVar = "red";
yep();
}
Yep simply makes [active] = [stepVar] with a trace for testing.
var myUrl_str:String = "mypage.aspx";
var send_lv:LoadVars = new LoadVars();
var load_lv:LoadVars = new LoadVars();
load_lv.onLoad = function(success:Boolean) {
if (success) {
// sendAndLoad processed successfully!
} else {
// sendAndLoad had an error
}
};
//send_lv.sendAndLoad(myUrl, load_lv, "POST");
function yep() {
active = stepVar;
trace(send_lv.toString());
}
The idea being there would be more than just "red" and a string of variables could be made active with more than one "green" button. I would than pass the whole string to an asp file that would accept them.
Thing is, this seems to work if the user clicks the sequence twice. Open the file test it by clicking the green button and then the red. The trace will come up empty the first time but will be correct if you click the green and then red the second.
Any help would be fantastic!!!!
Thanks
-jub-
Declare Variables AS2 Verses Variables AS3
Hello,
I am fairly familiar with Flash, however, I have just recently taken a class in ActionScript 2 as I had no experience whatsoever working with ActionScript. I now have a basic knowledge of how it works, however, I have Flash CS3 and so when I have tried declaring a variable with code like I learned from AS2, it doesn't work. I have perused through the "variables" section of AS forum files and have yet to figure it out. Is there something else that I need to add to the code? I realize you can still write AS2 code in CS3 but I'd like to learn AS3 as well.
For example...an instance of Circle called mcCircle1 is on the stage. So in my code, I write:
var mcCircle1:MovieClip;
When I trace mcCircle1 this is the error message that comes up in the "Compiler Errors":
1151: A conflict exists with definition mcCircle1 in namespace internal.
Am I just missing something simple here?? I'm confused... :$
Thanks,
Terri
Load Variables, Remembering Variables
I am trying to load variables from a text file, and have them available from then onwards in the movie, globally so to speak.
While I can read the variable values in a loader function which executes when the text file is loaded, I don't seem to be able to keep those variables available afterwards.
How do I that? Isn't AS3 wonderful? :(
John
Attach Code
var urlRequest:URLRequest=new URLRequest("index.as3.txt");
var urlLoader:URLLoader = new URLLoader();
urlLoader.dataFormat=URLLoaderDataFormat.VARIABLES;
urlLoader.addEventListener(Event.COMPLETE, urlLoader_complete);
urlLoader.load(urlRequest);
var sspColourBG;
function urlLoader_complete(evt:Event) {
trace("During: " + urlLoader.data.extColourBG); // returns correct value
}
trace("After: " + sspColourBG); // returns undefined
External Varibles, Pathing Varibles, Targeting Variables OMG I HATE VARIABLES
I'm making a movie.
this is the idea. 5 buttons - identical - all text based - basically they're MCs, with the instance state changed to 'button'.
on clicking, each button will open a new window, loading a URL. (this is the easy part)
the text on each button is dynamic and contains 2 text fields.
the first text field is the title.
the second text field is the descrition.
so you have 5 indentical buttons, each will have a title=description.
each title, and each descrition is a variable called from a text file. (eg, title1, title2, title3, desc1, desc2, desc3 etc).
now I can make 5 different MCs, each containing 10 dynamic txt fields, each of which calls a specific variable, but I don't want to hard-code.
Any ideas on how I can do what I want to?
http://www.7inone.info/dls.swf
this is a static version of what I want. I'm gonna upload it in a minute.
thanks in advance
sid.
Finding Variables With Variables
Hi
im building a flash site with a XML based menu and dynamic text content...
In the first frame i load a text file: loadVariables ( " content.txt " , _root ) ;
My problem is that when im press a menu button, it makes a variabel, now i need some code to get that variabel to display, the text.
Ex.
pressed button: _root.label = menu1
if label eq. menu 1 display menu1-text
but becouse its all dynamic the code will get its variables from the XML code wich generate the menu...
Hope its understandable...
Martin Andersen
[MX] Using Variables To Call Variables...
I have this in an external file that I load into a LoadVars object called PunDataFile... Feel free to roar out with laughter, they are belters.
Code:
&NumberOfPuns=3
&pun1text=What did the fish say when it swam into a wall?....Dam!!!
&pun2text=10 cows in a field, which one is an arab?.....Coo 8!!!
&pun3text=Field full of cows, which one is on holiday?....The one with the wee calf!!!
I want to pick out a random pun from the 3 or however many I have as dictated by the NumberOfPuns variable at the top.
Now I'm trying to do it using the following code....
Code:
trace(PunDataFile."Pun" + Math.ceil(Math.random()*parseInt(PunDataFile.NumberOfPuns)) + "Text");
Now I'm asking here because, obviously, it ain't working.
Could someone point me in the right direction or if there is a slicker way of doing the above, I'm open to suggestion.
Many Thanks
Assigning .txt Variables To Other Variables?
Hello- can you please help me-
I have a .txt file with my content in it which is being loaded into the swf through loadvariables. One of the variables defined in the .txt file is 'bronzeOne'. I can bring 'bronzeOne' in fine to the swf and display it in a text box (just letting you know that works), but what I want to do is assign the data in 'bronzeOne' to another variable (not text box) defined in my .fla file. It isn't working! My script looks like this-
clientoptions.txt file:
&bronzeOne=<p>blah blah blah</p>
.fla file-
loadVariables("clientoptions.txt", this);
boptionOne = bronzeOne;
Can you see that I am trying to make 'boptionOne' equal the data in bronzeOne? Why isn't it working though? The other wierd thing about it is that if I assign the same script to a button-
on (release) {
boptionOne = bronzeOne;
// and do some other stuff with other variables
}
It will work fine then! It only works when I activate with it with something, but I want 'boptionOne' to have the data in 'bronzeOne' when you first open the page. I have been trying for hours to fix this and it is probably something really easy and stupid that I am doing wrong, but it would be great if someone could help me please.
I know that one way to fix this would be to just display the 'bronzeOne' data somewhere and then let 'boptionOne' equal whatever is in that text box, but I don't want to display 'bronzeOne'- I want to pass it to another variable and do stuff with it.
Rephrase: Using Variables Within Variables
please help me get some sleep..
how can i make this work?
First Frame:
var number= 1;
var url = 'Pictures/photo'+number+'.jpg'
My 'next' button:
on(press) {
number = number+1;
content.loadMovie(url);}
Problem: button loads 'Pictures/photo1' and not photo2 as i would like.
To be able to use the next button for multiple functions i have to have my url variable set up the way i have it. how can i make var url use the new value for var number?
Variables Refering To Variables
Hi.
I am attempting to do something a bit strange, and I suspect it isnt possible...
Lets say I have an input text box and a submit button.
I want the user to be able to enter anything, absolutely anything into that textbox and when submit is clicked flash will search to see if there is a variable that matches what is in the textbox and if there is, the contents of that variable are displayed, if not then a message is displayed stating that there is not.
for exmple if there is a variable my_variable=127 and the user types in my_variable then flash returns 127.
Now I know how to do all of this except get flash to look at whats in the textbox and treat it as the name of a variable.
the reason i want to do it like this is so new variables can be defined in a text document (so anyone can add to it without having to edit in flash).
So is this even remotely possible? variables that contain variables? my head hurts!!!
Variables/Variables Loading
Hey I am having troubles with my loadvariables and would highly appreciate any help.
SO basicall i have a movie set up. Theres a movie under the root called content, that contains all the animation of the content for the page. Under the content movie is a movie called homecontent, home content contains a movie called dynamictxt which i will use for scrolling, inside of dynamictxt MC is my dynamic txt feild, The Variable that i set for the Dynamic Txt Feild is txt
so my code goes like this inside the dynamictxt MC i have 2 layers one wiht the txt feild and one with the scripting my script goes as fallows.: _root.content.homecontent.dynamictxt.loadvariables ("home.txt")
now inside home.txt I have &txt=hello guys this is my string and for some reason it isnt showing up on my SWF
And for some reason it doesnt display the txt. I have the character set as all characters, and the wrapping settle to multiple lines, and the font color is black while the background is grey.I have the Home.txt saved in the same file as the swf. if anyone knows whats up or if anyone is willing to take a look at the FLA that knows what there doing cause its a complex movie please respond. Mike.
Variables Calling Variables
hi,
i need help with a dynamic text box and what is loaded into it. the function for my buttons defines a new variable "newChoice" and sets its value to the "this.varTitle". It then tells the movie clip containing the text box gotoAndPlay (2). At that point the text box should update to the value of "newChoice" but it doesnt work.
if i tell it to update something absolute, like a string, it works, but i think there is a problem with the layers of variables i'm using. anyone know how to get around this? thanks!
//------ main function:
playDots = function () {
this.onRelease = function() {
_root.newChoice=varTitle;
tellTarget(_root.contentShift.content.wellB){
gotoAndPlay(2);
}
};
};
//------ also in the main timeline:
loadVariables("vars.txt", "");
studio.varTitle = studio_txt;
motionC.varTitle = motionC_txt;
playDots.apply(studio);
playDots.apply(motionC);
//------ the action in wellB's timeline:
//------ ("desc_txtX" is the dynamic text box)
wellA.desc_txtX=_root.newChoice;
trace(_root.newChoice);
Variables Inside Variables ?
Im loading vars from an outside source:
name1
name2
name3
in such way.
Now Im trying to call it later, but I want to do it in such a way:
(ex. x=1)
blah blah"+_root.loadvarsclass.name(x)+"blah");
How would i do this ?
Again, basically its asking which var to use based on another var inside it..
Variables?
How coud I sent variables from one MC-simbol to another
MC-simbol???
Several Mc´s, Several Variables
hi!
i had to do a movie, in which you can duplicate and position the duplicates as xou like.
1. question: is it possible to delete a SELECTED duplicate? how do i have to programm it?
2. question: how to i transfer all the information (_x & _y & count) to another swf. which has to be loaded afterwards by html?
plz help!!
Can Someone Help Me With Using Variables... :(
Well it's more like telling me how to use them...
I want in the beginning of the movie to have a text box where the user can enter a name, and then in the movie there is a text box that will change accroding to the value that the user entered
can anyone tell me how to do that please?
Help would be very appreciated...
Asp Variables
hi,
i'm running a flash player that uses variables from asp. depending on which variable is passed in, a different frame is played. however, this doesn't seem to be working.
my syntax at the moment is .......
if ( question_type == "M" ) {
gotoAndPlay ( 9 )
}
this seems to work localy, but when published to the web is doesn't.
any ideas?
thanks
H
Variables From Txt? From Swf? From CGI?
Hi all
I can make the variables to be read from a text file,
it is definitely ok!
But how about swf>?
I tried many time but it just not work...
Is it impossible to load variables from the swf?
Thanks in advance!
MKit
Variables, Variables, And More Variables
Here it is-
Example:
var1
var2
var3
var4
var5
var6
...var100
I need to insert a value into each one.. but would like a script like(i know this is not correct, need some help on how to write it)
i=1;
do {
var[i]=random(1000);
i=i+1;
} while(i<100)
anyone know how to correctly call a variable using another variable?
Variables
I'm a newby...I'm uisng a goto action via frame labels to jump to specified frames within a movie. How do I keep the image in a specified frame apparent while bringing up another? Ex., building a puzzle, and as one piece is filled in it stays filled while others can be filled in as well. I'm assuming I need to use variables?
Swf & Variables
I have come stuck with, what I think is, a simple task
but I just can't work out. Please help!
I have a movie(main timeline) that loads a .swf which works fine. However the
variables in the movie (swf) (dynamic text boxes) are not displayed on the main time
line, only when I click the button again then I can see the variables but the
page layout disappears.
Main movie (level0) has a dynamic text box (variable 1 = abc) and a button to
load the .swf
.swf has dynamic text box (variable 2 xyx) and a picture on screen.
When I click button I see picture but no variable. However, when I click
button again the picture disapears and the variable in text box appears.
I want the pic and var to be visable at one time. I've tried _level1, _root
etc but can't get this to work.
Basicly, the value of the variable in the swf comes up in the main timeline but not at the same time as the graphics on ther stage.
Please can you let me know what I am doing wrong. Thanks a lot.
If, Else If, &&, ||, =, Variables…help
I dunno what the hell I'm doing in actionscript, and I'm hoping that maybe someone can tell me what is wrong or maybe a better way to do this.
I have in one MC two buttons. The first button will act like a toggle to change the x,y coordinates of the second button. The second button's starting x,y is 100,100.
The idea is that by pressing the first button, and if the second button's x is less than 300 and/or y is less than 400, to set the x,300 and y,400. But the trick is that the second button is dragable and before it gets the x,y set to 300,400 I want to set the current x,y as a variable so that the next time I press the first button and it equals 300,400 it goes back to the previous x,y (whatever it may be if it was dragged).
SO...I know this is wrong cause its not working...but here is what I have so far for code on the first button.
---------------------------------------------------------
on (release) {
if (_root.window.Size_x != 300 || _root.window.Size != 400) {
PrevX = "getProperty ( _root.window.Size, _x )";
PrevY = "getProperty ( _root.window.Size, _y )";
setProperty ("_root.window.Size", _x, 300);
setProperty ("_root.window.Size", _x, 400);
} else if (_root.window.Size_x == 300 && _root.window.Size == 400) {
setProperty ("_root.window.Size", _x, "PrevX");
setProperty ("_root.window.Size", _y, "PrevY");
}
}
---------------------------------------------------------
all buttons are inside MCs and have instance names. Its just that this little bit doesnt work.
any help at all would be much appreciated.
MainFrame76
Variables
hi again.
ive come across a bit of a problem, know exactly what i want to do, but i cant find the way to do it without miles of code that doesnt work
i have 199 instances of an object on the stage, called 1-1 through to 1-199
i am loading a variable from a text file, the variable loads, no problem there.
the variable loaded is simply a number from 1 to 199, i want to make the instance corresponding to that number visible, while all the others stay hidden (also no problem with making them hidden in the first place)
how do i use the variable to tell it which one to make visible ?
pleeease
Karo
How To Get Variables
in my flash movie i have the links of buttons in my navigation set to index.php?page=1 to tell the flash navigation that it's at a certain page and therefore do certain actions in the movie (i.e. load a certain movie, play a particular frame etc). However, I'm kind of stuck because I don't know how to read this variable into the flash program. All my buttons have the following:
on(release) {
getURL("index.php?p=1","_self","post");
}
so it passes the "p" variable of a value of 1 to the next page, but I don't know how to read the "p" variable into the flash movie in the next page. Can anyone help me out?
thanks,
jay
Variables Help...
I have loaded variables from a text file into Flash. They are all like the following:
1q = firstq
2q=secondq
3q=thirdq
1a = firsta
2a=seconda
3a=thirda
etc...
This is going to be a quiz in Flash. For each question, Iwant the display the question and answer. I thought if i had a counter, I cold just reuse the same scene over and over.
I have 2 text boxes, one for the question (named "qbox"), the other for the answer (named "abox"). The counter, i is increased each time. Basically, if i=2, I want qbox=_root.2q and abox=_root.2a.
I tried the following set variables:
i=i+1 - increment i
var1 = "_root."+i+"a" - gives me '_root.1a'.
but then if I try: abox=var1, I get '_root.1a'. Can I get the "_Root.1a" to evaluate the the variable in the txt file, in this case "firsta"?
If not, how would I go about this?
TIA,
paruby
Variables
I need to call a variable so I can loadVariables to a perl script. I know
how to do the loadVariables part, but I don't know how to create the
variable to be loaded.
For example, I have four sections of the site that I want to tell the perl
script that that section has been visited.
They are answerware, staff, services, clients. When the section (all
sections are within a single MC 'content') is visited (click on the link and
it goes to the appropriate lable in the MC 'content') I want it to basically
create a variable stating 'answerware' or one of the other sections, then
load the variables to the perl script.
How do I create a variable that will announce to the perl script that a
certain frame has been visited?
1. I don't have a submit button. Basically, my client wants me to gather as
much information as possible, and also asked me to track when each section
of the site gets visited. I am just trying to learn as much AS as possible,
and know just enough to be frustrated. I just can't get over that hump.
2. The information that people view when they click on 'answerware',
'client', 'staff' or 'services' is all in a MC titled 'content'. When the
end user clicks on the 'staff button', which goes to frame lable 'staff'
within the MC 'content', how can I send information to the perl script that
my client has set up (test.pl) that states that that frame has been visited?
Basiclly, my client wants to know what sections have been visited.
URL Variables
sorry, but I am a newbie to flash and have been trying to use the variables passed in the URL within a movie. but I have no clue how to call them. please help
Travis Harris
Variables, When And How
ok not the best title in the world but oh well
ok now my movie is setup like so (paraphrases so you can visualize structure)
1 scene, this is a menu system... kinda basic
MAIN TIMELINE {
MOVIECLIP {
2 Layers:
1 with variables, 1 with animation in it, this is the button instance 20 frames long, all tweened, 1 sitting there 5 thru 10 mouse over animation. 15 thru 20 mouse out animation
BUTTON {
out frame just the text for menu.
hit frame the hit box...
}
}
}
i have this code on the button instance(in each keyframe) itself,
-------------------
on (rollOver) {
gotoAndPlay (5);
}
on (rollOut) {
gotoAndPlay (15);
}
on (release) {
getURL (bandhistoryurl, frameloc);
}
-------------------
for bandhistoryurl, that is my variable for the webpage... this is in the other layer so i only have to enter it once. while frameloc is the frame target to send the webpage to.
my problem is having to change these variables in their own respective movie clip... takes a long while... while what i was hoping to do was somehow declare these variables in the main timeline all in one location so i would just have to edit that one script making things alot simpler for me...
ok now that thats out of the way.. on to the question at hand
is there a way to set variables in the main timeline, and refrence those variables from inside a movieclip?
i have tried all i can think of but any comments will be welcome
thanks in advance
JOSEPH
Variables
I've been reading the tutorials for about an hour now and I can't seem to learn how:
To send variables to CGI (I guess) so they could be stored.
Retrieve those variables with Flash
What is a CGI?
How to I make or get a CGI file to send the variables to.
Do I have to do something special to the CGI to make it save the variables?
Or do I just send the variables and the CGI will just take them in and store them?
THANKS
PLZ HELP
Korey Lin
Variables
Hi,
Got a question, is it possible to pass variables from a swf to another???
If it´s possible how do i do it??
Variables
I've got a movie with some buttons. I want to assign variables to those buttons, so that whenever a user clicks on one, it plays a movie clip (animation of doors closing) and then at the end of the movie clip is actionscript that says something like "if profile was clicked, load movie profile.swf" Also, if possible I would like it to load the external swf one level below the main swf, so that the menu is visible at all times. (if the external swf loaded on top, the menu wouldn't be seen) Please help!! Thanks.
Justin
How Do I Add Variables
I have a need for a flash. what it is suppose to do is compare two numbers one is static and the other changes as you click a button.
Also i would like to play a movie depending on the results.
is this possible.
Variables
I posted a while ago, but got no response. SOMEBODY must know my answer!!! I want to, when the user clicks one of 5 buttons, have a movie clip of two doors closing (which eventually cover the stage) and then depending on which button they pressed, the appropriate external swf would be loaded. Right now I have this:
On each button: (variable customized to each button)
On (release) {
_root.myvar = profile;
tellTarget ("movie_holder") {
Play ();
}
}
At end of the movie clip I want to play onClick:
if (_root.myvar == profile) {
loadMovieNum ("profile.swf" , 1);
}
(same code as above repeated 5 times, one for each variable)
Ok, so here's my question....WHY DOESN'T THIS WORK????
PLEASE HELP!!!!
Justin
Variables........?
Hi,
First let me explain the setting of this problem: There are 5 buttons on the "home" page. When you click on one of them they each play the same animation (wich is directly in frame 2)and then comes my problem: at the end of this animation the movie should know where to go, all of the buttons are set to play so if you click one of them he plays the same animation as if you clicked another button...
I think I need a variable but how do I do something like this?
PLEASE tell me...
Thnx
Variables?
I have a navigation bar w/ 9 buttons. I would like each button when clicked to go to the same scene and then on the last key frame of that scene "get url" of the appropriate html file. My question is, is there a way that I can tell Flash which button was pressed and therefore which url to go to?
I really don't want to make 9 scenes for the sake of changing the "get url" on the last keyframe of each!
Thanks!
Rick
Where Have My Variables Gone?
Hi, I'm using this bit of AS to call in some variables to my movie:
phpstring = ("http://myserver/namecheck.php?uname=" + uname + "&email=" + email + "&random=" + counter);
loadVariablesNum (phpstring, 0);
This works fine when the movie is run on its own.
However, I am now trying to preload this movie into another using this method:
loadMovie ("movie.swf", loadtarget);
totalbytes = -1;
The movie preloads perfectly, but when I come to run it, the variables that should be returned from the php call get lost somewhere. Is this because they are being loaded into the preloader movie? If so, how do I specify that they should go into the preloaded movie instead?
I hope this makes sense, my brain is starting to overheat!
Get URL And Variables
Hello,
Does anyone know if you can call a variable using the Get URL command?.....The variable would contain the URL destination.
thanks!
Variables Help Plz
Hi Peeps.
I have this scipt in my flash file
Code:
s = 1;
do {
_root.topic_list_icons+_root:s.gotoAndStop((_root:topiclist_smile+_root:s));
s = s+1;
} while (s<=12);
I think it looks ok but it dont work ;( Any Help would be appreciated.
Ps It works fine If I force it and put topic_list_icons1 instead of topic_list_icons+_root:s
Immy
Im New With Variables. HELP
Hi. ive got a text field, and i want to make it so if you click a button, it adds 10 to whatever number is in the box. how do i do this?
|