LoadVariables Qustion
Hi all. My problem is this one. I have a .txt document that set these values.
&Maxserie1_1=Bilder/3dsmax/BallLek/Mini/BallLek1.jpg& &Maxserie1_2=Bilder/3dsmax/Racers/Mini/Racers1.jpg& &Maxserie1_3=Bilder/3dsmax/Hayabusa/Mini/Busa1.jpg& &Maxserie1_4=Bilder/3dsmax/Mack/Mini/Mack1.jpg&
Is there an easier method than the following:
imagearray[1]=Maxserie1_1; imagearray[2]=Maxserie1_2; imagearray[3]=Maxserie1_3; imagearray[4]=Maxserie1_4; .. imagearray[100]=Maxserie1_100;
With lot's of images this could become a problem.
I was thinking about a for loop
for(var i=1; i>100; i++) { //an ordinary for loop imagearray[i]= ?? ;//what I'm I suppose to write instead of the 2 questionsmarks trace (imagearray[i]);//should write Bilder/3dsmax/BallLek/Mini/BallLek1.jpg Not 1 or Maxserie1_1. } The ["Maxserie1_"+i] don't work here!
Alekssander
ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 03-16-2004, 08:43 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Small Qustion
hi everyone iam a new user of flash MX , there is something i want realy to do it but i dont know how. that is i have a text file and its about 700 page for sure its too big to put it all in the project so i want to know the action script which enable me to call or view the text file in aseperate window when i hit the button throw the flash project .. please send me the way or the action script on tantawymaha@yahoo.com .. thats all thanks for your help
maha tntawy
Button Qustion
i need help, I have a button i am making, i want it to have the text to go to a slow transition to another color. So it is slow, it will start as white on a navy blue button and then slowly transition to a green text on a navy bluw back ground.
Thanks
Qustion About XML And Actionscript
I try to open a UML in flash using actionscript
There is my code:
var request:URLRequest = new URLRequest("Request.xml");
var loader:URLLoader = new URLLoader();
function loadComplete(event:Event):String {
this.loader = loader;
return loader.data;
}
//output undefined
trace(loader.data);
The problem is my other function can not use loader.data.
And I can not return it as a string
Is there a way to use load.data in other place?
Maybe Unusual Qustion
hi guys!!
i'm heaving a problem with macromedia flash...
i have designed a webpage and in page created a kind of flash photo album.. now what i want is when someone click in the photo to open a movie in Win.MediaPlayer outside of browser, .. i'm planing to use this page in Lan mode like a movies launcher.. so the page is not going to be on internet, all activities are going to be in LAN, but i dont know in which way to do this, link a photo or a button that would open a movie in winMP.. is there a way to help me on this.. i will appreciate very much that!
Stupid Qustion....
Hey I dont usualy do much code but I do a lot of animating. Anyways I have a link and I want it to open up uin a new window, I know it's got somthing to do with _target=blank??? or somthing like that....anyways here is the string of code im using now. this one opens in the same window, i need it to open in a new one.
on(press) {
getURL("http://store.nokia.ca/home.php?cat=249&sort=orderby&sort_direction=0&page=6","_parent");
}
Help With Dumb Newbie Qustion
i'm having trouble doing something
i want to constrict a dragable object on a line on the y axis, like a scroll bar.
every tutorial i've checked out on this site goes into intricate detail of how to make complicated scrollers but i haven't found that little piece of info.
please someone put me out of my missery
Imported Jpeg Qustion
If I want to import a picture of something that isn't a box or circle shaped object, like a bird for example, how do I get rid of the white box shaped border around the object? I can't lasso the object since it wasn't created by flash...is there a way around this?
[F8] Quick ActionScript Qustion.
Alright so heres what i want to do.
I have a movieclip thats called into another movieclip.
That movieclip contains 4 dynamic textboxes .
and this movie clip is called in multiple times when certain buttons are pressed so I use (+i) when I add a new movieclip.
What I want is for the information in these text boxes to be sent out in a php email.
How would I go about doing that.
Any help would be great.
ButtonMC Qustion For Da Scripterz
Ok, I know I posted something like this the other day, but I figured out the solution. Now I have a question that experienced scripters might be able to answer for me.
When the mouse rolls onto the clip, the animation plays. When it rolls off, it plays. However, if the user moves off before either animation is finished, the results are less than desireable. I'm thinking I need some sort of test or anything like that. I've thrown up the .fla and if anyone can help me out, many thanks to you
peace
ayanami
Payment Qustion... Opinions
hi,
one guy asked me if i can build him a FLV player like www.proxus.com and i think i can... how much should i charge him for this kind of component ?
tell me your opinions. thanks
Basic Html Qustion
i know this is simple... how do i center my swf on my html page vertically... so no matter what resolution the screen is set at, the swf will be exactly in the middle?
thanks
Quick Qustion - Difference In Streaming
Hi, I am new to the back-end work of the websites ( I am a webdesigner). I have been trying to understand exactly what a streaming media server is? so when I am hosting my website on a particular server, is not the same thing? what is the streaming server used for specifically? Thank you
[qustion]rollover Effect Stay On Button
eg. i want my rollover colour to stay when user mouse down on the button... i had ever try to do a stop(); at the down keyframe, but i notice that the button clip unable to put any action script, is there any alternative?
Qustion Embed Flv Movie In Flash Website. HELPPlease
I made a flash site which embed a skinless flv video
(file name play.flv) in FLASH CS3. BTW, i do this coz
Flash can give a skinless flv movie but dreamweaver can not.
After publish, CS3 grenarate 3 files,
A swf file : Play.swf (same name as my flv file) ,
A html file : index.html
A Javascript file: AC_RunActiveContent.js
have no prolem when i preview on my computer
BUT After i upload these 3 files and my original flv file to server, i cant not see my flv movie playing at all. Also not work when i try this in Dreamweaver.
anyone can give me a idea what can i do?
thanks very much for your time!
LoadVariables: Can Two LoadVariables In The Same Script Cause A Problem?
Hi,
It seems that for some reason, my attempt to send vaiables is not working. I'm not certain if its my syntax or the fact that I have a second loadVariables later in my script(with a different name of course). help?
heres a sample of the script that I'm using:
ClickedSendVar = new loadVariables();
ClickedSend = "bob="+bob+"&fred="+fred+"&jim"+jim;
ClickedSend.send(_root.on_card, ClickedSend, "POST");
LoadVariables From CGI
Why does it work from my HD, and not on the Web.
When I run the SWF in flash it load the vars ok. Then I tested outside Flash, in the Flash PLayer, and in the Browser both from the HD. The file was on my HD but the script still gets the vars from a valid URL.
I load the vars like this:
loadVariablesNum ("http://www.mydomain.com/cgi-bin/flashclock.pl", 1);
In the dubugger window, all the vars are loaded correctly only when the file run from the HD.
Then I run the (SWF) file from the web, and the debugger window only show me the _level0 objects and vars. NOTHING from _level1 (to witch i'm loading them).
I tested the PL right in the browser to, and it outputs everything correct, like:
&name=paul&weight=85&...
Is loadVariablesNum a wrong method to get the vars from a pl file.
H E L P !!!!
LoadVariables + Php
I have this tiny PHP script that I would like to call in order to generate a string to be used as a variable:
Code:
<?php
// filename is 'metar.php' located on server 'your_url_here'
echo "metar=";
$fp = fopen ("http://weather.noaa.gov/pub/data/obs...tions/CYUL.TXT", "r");
// The above URL retrieves the latest weather data for Montreal's Intl. Airport.
// Hack the source at http://www.gimpster.com/php/phpweather/index.php PHP Weather for how to interpret the value.
while (!feof ($fp)){
$metar = fgets($fp, 4096);
echo $metar;
}
fclose ($fp);
?>
In my flash movie, I call that script on fr.1 using
Code:
loadVariables("http://your_url_here/metar.php", "");
and I have a dynamic text field which is linked to the variable metar.
Of course it doesn't work so far. Any pointer why and/or how to make it work?
thanks and cheers
D.
LoadVariables Bug?
Im getting feed back from my users that when they try to login it hangs.
all im doing is a simple task they type userid and pass click next
loadvariables from a CGI script which checks the userid and pass sends back a responce of either wrong or ok
while flash is waiting for this responce i do this.
if (responce eq "ok"){
gotoandplay("ok")
}
elseif(responce eq "wrong"){
gotoandplay("wrong")
}
else{
prevframe
}
#################
the previous frame is just a play() to check the status again.
so why is it hanging? is there any know problems with this method like using it in different browsers or platforms??
or if anyone has a better method i will be happy to listen.
Danny
LoadVariables
Hello,
I have 10 frames in my movie and each frame has 2 loadvariableNum command to load text into 2 different dynamic text boxes in my main movie. 1 loadvariableNum command looks for data from the database and the other from a text file. When I try it out, only 1 LoadVarNum command works, meaning that text var 1 will populate with text but not text var 2. I have both variables loading into level_0. What is the processing order for LoadVarNum command? Is there a certain order that they load in?
Loadvariables Help
I have a simple menu on a page called menu.html with four selections (red, yellow, green and orange). This opens a pop up window (menupop.asp) with the following code:
<%color = request.form("color")%>
<script>
var color = "<%=color%>"
</script>
This page has a flash movie with the code:
stop ();
loadVariables ("menupop.asp", "0", "POST");
gotoAndStop (color);
There are four frames with labels red, yellow, green and orange, but is not going to the right frame.
Any solutions?
I'll try to upload the pages later (my server's being a pain).
-Brandon
[Edited by bugkarma on 10-16-2001 at 02:00 PM]
Help With Loadvariables
I have a simple menu on a page called menu.html with four selections (red, yellow, green and orange). This opens a pop up window (menupop.asp) with the following code:
<%color = request.form("color")%>
<script>
var color = "<%=color%>"
</script>
This page has a flash movie with the code:
stop ();
loadVariables ("menupop.asp", "0", "POST");
gotoAndStop (color);
There are four frames with labels red, yellow, green and orange, but is not going to the right frame.
Any solutions?
You can see the pages at http://www.neweconomydesign.com/test/menu.html
-Brandon
HELP With LoadVariables
I ma trying to load variable values from a text file. Nothing seems to work to make this happen. I have a file in the same folder as the .fla file. It is called "data.txt" and it contains the following-s1Var=4
In the first frame of the movie I have the following code
loadVariables("data.txt",0)
trace(s1Var);
this always returns 0. How do I make this work???
LoadVariables
Please someone help!
Does anyone know where i can get some information or an example of how to use the loadvariables command.
I am very confused on how to use it.
I have a templete that i need to have variables from a data file to load into.
On the first frame of my swf. i have
loadVariables(url.questions)
the url is typed out correctly, this is the data page with various variables with values.
the questions is the name of the text variable in the flash movie where i want the value of the variable from the data file to be placed.
I have many questions, how does the loadvariables know exactly what variable i need and where to place it.
i hope this makes sense. please, if anyone knows what i am trying to describe or knows of a tutorial i can use, please tell me. the stress and pressure from my bosses is horrible.
if you have not figured it out, i am just learning actionscripting.
thanks,
dawn
LoadVariables
How does the loadVariables command work?
I want to create a button that, on release, reads variables from a text file. Then the variables must be put in textboxes.
I have a .swf file and the text file in a folder on my hd.
What has to be in the text file and how does the loadVariables command work?
Say I want to read test="hello" and then have in a text box in the movie "hello" in a text box
Loadvariables
Hello, I am creating windows in flash and I am trying to import data from a text file using loadvariables. i.e.
("aboutUs.txt", "_root.aboutUsWindow.window.text_box");
the text file looks like this:
textField=<blah blah blah>
(textfield is within text_box).
This works fine except that now, I want to load multiple variables into different text fields from the same file.
Please help.
prac2
LoadVariables
Hi,
I have an flash movie and I have a movie clip in that. I change the color of the clip according to the database value which I get using ASP. In the frame actions actionscript, I change the color of movieclip according to the return value from ASP, still the color does not change. I checked the variable value and it is not set too. I gave red color before calling LoadVariables (which passes green), the color is not changed. What can be the reason. I have written the code in any event, just in the frame actions main script place.
Any help is appreciated.
Thanks
-r-
LoadVariables
Hi, I need help with loadVariables. I have a movie clip named "blah" containing a dynamic textbox with the variable set to "text," and I have the line:
loadVariables("blah.txt",_root.blah.text);
loaded into my actions layer. Yes, blah.txt is in the same directory as the flash. I want to load blah.txt into the textbox. What am I doing wrong here? Thanks
LoadVariables()
Hi there,
Would like to ask regarding the movieClip.loadVariables() action. The second parameter is supposed to be "GET" or "POST" right? Is this "GET" or "POST" action the passing of variables into flash, or is flash passing variables into another application?
For that matter, I am aware that by specifying the additional parameters with the URL string, you can simulate a GET request to a server. I'd like to ask then, how can I use Flash to do a POST action?
Thanks.
Regards,
KA
LoadVariables (again)
I want to load a list of (text) variables from a .txt file into a mc, using a split (into an array). There should also be a (invisible) button attached to each variable, in order to enter a url link and the number of variables is not fixed. I tried everything, I have the overall idea, but it still won't work... Can someone explain me step by step what to do ?
Loadvariables
I want my buttoninstances to have a variable name.
I made an MC,
on frame 1 : loadVariables("/fotos/fotos.txt",_root);
on fame 15: event1.eventname.Text= _root.event1;
event2.eventname.Text= _root.event2;
...
in the txt file :&event1=button1
&event2=button2
...
but I don't see the button names when I upload the site, or even when I preview the html file.
this I probably a dumb question, but how comes?
LoadVariables
Hi,
I have a problem with loadVariables.
In the first frame, I try to execute the script counter.php
In the second and third frames I check, if I receive the variable “hits”
The variable “out” is a text box and “loop” is only a counter. “hits” is the variable I want to receive
See my short code description:
Frame1:
loadVariables("http://mitglied.lycos.de/fcneptun/c/counter.php"+"?ran="+random(9), "", "GET");
Frame2:
out = ++loop + ") Waiting .... hits: " + hits;
Frame3:
GotoAndPlay( 2 )
OK, If I try the MC local on my test computer, it works perfect . But if I put the MC on my web space, it don’t works !!!!! My web space is on a different provider “members.aon.at”. My be is this the problem????
Please help!
Thanks
David
LoadVariables() & Php
zipper'll,
will the function loadVariables() send variables to php, have them altered and then recieve them again?
or is something like a getVariebles() needed (if it exists) to get them again
thankthanks
thrill,
lloydmannes
Loadvariables & Asp
when i send a particular variable to an asp page using loadvariables it arrives at the asp page appended with a html formatting tag. do you know why? thanks Shane.
LoadVariables - I Just Don't Get It - Please Help
Okay, I just don't get LoadVariables. Can someone break down exactly what happens with this command?
I have an asp page that returns a simple string in the format indicated in the documentation:
var1=1&var2=2&var3=3
So I call that asp page with loadVariables: loadVariables ("http://www.whatever.com/my.asp/",0)
What happens with that call? I always assumed that this would be equivilant to writing
var1=1;
var2=2;
var3=3;
directly into the code, but it just doesn't seem to work that way.
I'm seriously stumped on this one.
Loadvariables Via ASP
I am trying to grab a variable that is in an ASP file using loadvariables. Do I have to use loadvaribleNum and a get or a post to do this?
Loadvariables
hi....
I have a dynamic txt field in which i want txt to get loaded from a notepad file... Now this text needs to be replaced by a new txt after every few seconds...
Actually the text is nothing but comments of an exhibition that was held in 2001. So i 've to load text from this notepad where all the different comments of different companies and people are stored one at a time and this has to be refreshed after every few seconds in the same dynamic text field.
please attend to this query ASAP coz i'm really despearte to incorporate the same in my working flash file...
Thanx in anticipation of an early response...
Alternate email : muksy2175@rediffmail.com, muksy2175@hotmail.com
LoadVariables Help
I am trying to bring in text from a text file, but I can't seem to get it working. This is what I did:
I created a text file that looks like this:
myText=text text text text
I created a movie clip in my main movie. It contains a dynamic text box called myText.
In the first frame of the main movie I put the following code:
loadVariables("mywebsite.com/myText.txt", "_root.box");
Any ideas? I would really appreciate any help.
-gamist
LoadVariables From Asp
Hi there, I'm using 'loadVariables("xxx.asp", _root); to get text into a dynamic text field. It works fine when I navigate to the .swf directly but not when embedded in the page.
I'm using Mac OS10.1.5 + ie 5.1.
Is this a problem specific to my platform or something else ?
Urls:
Page : http://www.freerideculture.com/eelad/index.html
.SWF : http://www.freerideculture.com/eelad/flash/menu.swf
The culprit is the news headline which should appear in red at the top...
This is just a test version before linking it with a database...
Loadvariables
HElp!! I'm adding a scrollable text loaded externally I always did in Flash5 but now it doesn't work anymore, tried and checked 100 times but no can do. I don't get this. I checked the form already and even convert the textbox and the scrollpane together in a movie and send the variable in to it:
loadVariables(news.txt, _root.mc);
but still nothing!!
I put in my 1st timeline cell the command but it doesn't seems to work anymore, the filetext is there and the variable checked..any help?
thanks
LoadVariables
Hi. I have some problem about loadVariables. Could you please help me? I want to loadVariables to _root from a text file called "data.txt". And "data.txt" contain the following text:
&ok=true
Then, in the first frame of the fla movie I write something like:
ok="false";
_root.loadVariables("data.txt");
trace(ok);
However when I test the movie, it output "false". It should output "true"! Could you please tell me if I have made something wrong? And how to solve this problem?
(I am using Flash MX)
LoadVariables
Hey everybody! I hope I'm not asking the same qerstion a million other people have asked before. (btw, is there some kind of "search board" funtion on this site?)
My problem is as follows:
I am reading (via php) from a database the titles of data sets in a given table. Those titles are given back to flash no problem.
Now i want the titles to be clickable (i.e. to be links), and after the user clicked the title the full entry will appear.
My thought originally was to define a function that will load the appropriate text (via <a href="asfunction:show_details,id"> ) .
Afte many hours I almost got it to work, but now I'm really stuck...
Frame 1 has the following actions:
function show_detail(number)
{
var transfer=0;
loadVariables("details.php?id="+number, "_root.text_field");
while (_root.text_field.ende<>1){}
transfer=_root.text_field.textfield;
_root.text_field.textfield=transfer;
stop();
}
loadVariables("overview.php", "_root.text_field");
where text_field is a MC containing a textfiel namen "textfield".
It shows the overview fine, which basically consists of the titles between <a href="asfunction:show_details, some_number_generaed_by_php"> Tags.
Clicking on the Links doesn't do ****, doubleclicking works fine though.
My questions:
- if I leave away this wild "transfer"-thing, nothing will work at all. why?
- Why do I have to doubleclick?
I just don't know anymore.... pleeeeeease help! Thank you in advance, I'll try not to write that much anymore....
Help Please, LoadVariables
hey, i need to load a textfile into a dynamic textbox for my site, my code doesn't work here it is
loadVariables("C:\limesite/textfiles/news.txt", news);
it is in the actions of a frame, and the dynamic text field has its instance and var name correct.
i get this in the text box:
_level0.menu1.news
please help,
Thank You in Advance,
Mr Eckted
[EDIT]
i also tried all the combinations of this:
loadVariablesNum("C:\limesite/textfiles/news.txt", ""\"_level0.menu1.news\""");
but again, no go.
also, in some configurations, it opens the text file in a new browser window
[/EDIT]
[Edited by mreckted on 08-30-2002 at 12:27 AM]
LoadVariables
Simply trying to use a variable loaded from an external txt file in a conditional statement, and it doesnt seem to be able to use the value as a comparison.
ie.
load the variable from txt file via loadVariables("txtfile.txt","");
trace("variableLoaded") <- can read the variable value
then I want to use it in an if statement like this;
if(variableLoaded == 1){
do this;
}else{
dont;
}
Even though the trace will show me the value of variableLoaded == 1, I cant seem to use that value in this statement.
HELP!
LoadVariables
Alright... I'm loading variables from a txt file, data.txt. it simply consists of:
numBars=7
Now, I can load it into a text input box when i use loadVariablesNum (not with just loadVariables, but that aint the problem), but i cant use the number afterwards in my loop like this:
for(i=0;i<numBars;i++) {
}
the loop dont even start. please help!
love,
chuckmo
LoadVariables In IE
Hi I have some problem with LoadVariables.
Please look at www.wykladzina.net then place your mouse on flash window in left site. Yellow window shows up and you should see details about product. It is not working.
But if you click on it new page load and then everything is working fine.
My code in button is
on (rollOver) {
_root.up.field._visible = 1;
loadVariables ("http://217.153.56.210/pl/get.php?kod=tali_classic", "_root.up.field");
tellTarget ("_root.up.field") {
gotoAndPlay (2);
}
}
on (rollOut) {
_root.up.field._visible = 0;
}
on (release) {
getURL (_root.cfgroot+"/?op=oferta&kod=tali_classic");
}
Instead of 217.153 ... should be _root.cfgroot (generally no diffrences)
Important yhing is: when I open swf from disk it works great! No problems.
Can you help me?
LoadVariables
Am having a problem loading Variables from a text file.
have a test file list1.txt containing:
text =
&rm101=test
&rm103=this
code to fill dynamic text box says,
loadVariables("list1.txt","&rm101", "_root.rooms.101.101txt");
this does not seem to work, am i doing the text file, the code or both wrong?
Thanks in advance!
Loadvariables And Php
I am somewhat new to actionscripting so I'll try to explain as plainly as possible.
I have a login system (works fine) and I have a part in my movie that displays the "Newest Member." I am trying to do this by using php to pull it from the db and have it displayed in a dynamic text box (users name, user #, and date joined -- 3 different boxes). So, here's what I am trying to use:
In the first frame:
Code:
_root.mem.loadVariables("test1.php");
_root.total.loadVariables("test.php");
_root.joined.loadVariables("test3.php");
stop();
Here's the php:
Code:
<?php
$host = "*****";
$user = "*****";
$pass = "*****";
$database = "*****";
$table = "*****";
// Connecting to the Database
$connect = @mysql_connect($host, $user, $pass) or die("could not connect to server");
// Selecting the Database for use
$db_select = @mysql_select_db($database) or die("could not select the database");
// Compose SQL command
$SQL = "SELECT * FROM $table";
// Query the Database
$result = @mysql_query($SQL) or die("could not complete your query");
// Note, results are returned as an
// Array - we cannot just print it out.
if($row = @mysql_fetch_array($result)) {
$id = $row["user_id"];
$name = $row["username"];
$date = $row["date"];
print "_root.mem=".$name;
}
?>
'mem' is the dynamic text box and test1.php is obviously the php file I am using. I have had this working once before but I lost the files. Can some one please point out what I am doing wrong?
Peace,
James
An Example Of LoadVariables And Php/asp?
i saw a while before an example of calling a php/asp file,
and reciving back an info from this pages!
does any 1 has example for it?
what i want to do is to recive answer for something that i send to the server!
thanks in advance
Peleg
|