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




Problems With External Variables



I have a main movie that loads a sub-movie. The sub-movie has the loadvariables command. In that movie I have 10 variables, each loading at their specific frame. These variables are loaded as var1.txt, var2.txt, var3.txt and so on. I have them loading to level 1, but for some reason they will not appear when I run the movie.

BTW: These variables should load into textboxes.


Thanks for any help!

Rninja


http://www.rninja.com



Tek-Tips > Adobe(Macromedia): Flash Forum
Posted on: 1 Jun 02 21:47


View Complete Forum Thread with Replies

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

External Clip, External Variables Don't Load
hi all,

I'm having some trouble with external variables and external movie clips. I have a main movie, and one part of it is an external movie, the main movie has a bunch of variables stored in a text file. This works fine. The external movie also has a bunch of variables in a different text file. When I play the external movie on it's own it works fine too. When I load the external movie from my main movie, the movie loads but the variables don't. Is there a special way to do this with more movies, do I have to load variables on different levels or something?

I generally use this to load variables

loadVariables ("roznet.txt", "");

I have tried using absolute paths as well (http://) but the same thing. It works by itself but when it is within my main movie the variables don't load. Any ideas? Thanks.

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.

Help With External Variables
Hi,

I have an empty variable in frame one of the main timeline of my movie, the value of which is passed by sending an 'fs command' from a button to an external javascript function which in turn returns the value.
My problem is that I can only seem to target the variable from the main timeline it sits in, if I add a movie clip to the timeline and it has a text box by the same name I can't get the value to pass into it. However, if I declare the value in the first frame of the timeline and not call it externally I can pass it through as many levels as I like.
Please can someone help, a .fla to look at would be great.

cheers,
A

External Variables
I'm loading variables from an external textfile, however the value of these variables do not appear in my dynamic textboxes with the same variable names as in the text file.
These textboxes are at various levels in my movie .. some inside MCs .. others on the main timeline itself.

Plz help !!!!!!!!!

External Variables
I need to load a lot variables from one .txt file into my .swf file. The .txt file sorts a list of variables like this:

var1 = value1
var2 = value2
var3 = value3
...

but I just can load the first variable, the .swf don't assume the others variables in the list.

How can I load every variables from the list.txt into my .swf file?
Is the problem with the aspect syntax in the .txt file?
Or the problem is something else?

Please some one help me, it is a bit urgent to me.

thanks

External Variables
Is it possible for a .swf to write to external text files?

Variables In An External SWF
hi,

i was wondering if it is possible to set a variable value in an SWF that is being played inside of one "main" SWF.

Example:

main.swf has the variable isSolved and it is set to 0.
i load puzzle.swf into main.swf as a movie, and want to set isSolved to 1 at the end of puzzle.swf.

is there some kind of global variable command i can use?

Dave

External ASP Variables
Is there any way I can prevent my Flash Movies from saving information from external sources like ASP pages so I can have the user refresh the page for random results instead of having it load the variable into the flash page

Such as
ASP Page ... Response.Write ("Fn1=" & RANDOM)

If you defined Random to do random sentences I find that I can't get it to load different ones without closing the window the flash is in and opening it again....

External SWF/Variables..
Oke

On one server (http://www.orgmovie.com) I've got movie1. This file has the following actionscript:

System.security.allowDomain("http://www.movie2.com/");
unique = new Date().getTime();
productid = "1001";

//Load welcome.php on http://www.orgmovie.com
myVars = new LoadVars();
myVars.loadok = "1";
myVars.sendAndLoad("welcome.php?" + unique, myVars);
myVars.onLoad = function(success){
if(success){
sitename = _root.myVars.sitename;
nukeurl = _root.myVars.nukeurl;

loadMovieNum("http://www.movie2.com/shim.swf",1);

productidd = _level1.productidc;
sitenamed = _level1.sitenamec;
nukeurld = _level1.nukeurlc;
admincontrold = _level1.admincontrolc;

trace (_level1.admincontrolc);

if (admincontrold == 1) {
if (sitenamed == sitename){
if (nukeurld == nukeurl){
gotoAndStop (2);
} else {
gotoAndStop (9);
} // einde nukeurl
} else {
gotoAndStop (9);
} // einde sitename
} else {
gotoAndStop (10);
} // einde admincontrol
}
}
stop();


This movie is saved in flash 7.0 with actionscript 2.0.

On the second domain (http://www.movie2.com/) I've got another movie which is saved in flash 5.0 to avoid problems with cross browser loading and such... This movie has the following actionscript:

//connect to Xenon Designs
myCheck = new LoadVars();
myCheck.loadok = "1";
myCheck.sentnukeurl = nukeurl;
myCheck.sentsitename = sitename;
myCheck.sentproductid = productid;
myCheck.sendAndLoad("http://www.movie2.com/check.php?" + unique, myCheck);
myCheck.onLoad = function(ok){
if(ok){
productidc = myCheck.productid;
sitenamec = myCheck.sitename;
nukeurlc = myCheck.nukeurl;
admincontrolc = myCheck.admincontrol;
}
}
stop();

Now the movie1 loads correctly when it is located on http://www.movie2.com/, but when I change it to the server http://www.orgmovie.com it stops working. It has to do something with the cross browser thing and I read some technotes from macromedia but can't seem to figure it out...


Someone???

External Variables - Please Help
I am loading a good number of variables from an external .txt file. However, I want them to appear organized in the file.

Example:
&var1=foo
&var2=bar
&var3=hello
&var4=world

Not:
&var1=foo&var2=bar&var3=hello&var4=world

Is there a way Flash can ignore those invisible carraige return and new line characters from the .txt file?
Thanks in advance!

External Variables
Hey,
now im sitting alone a lot of hours with this problem.

I want to import the following Variables into my Flashmovie.
It´s a PHP generated list outcoming of a mysql Database.

// VARIABLES

transfer.list_array = new Array()
transfer.list_array[0] = 2
transfer.list_array[0] = new Array();
transfer.list_array[0][0] = "Halfmoon";
transfer.list_array[0][1] = "HalfmoonBernsteil2005";
transfer.list_array[0][2] = "1";
transfer.list_array[1] = new Array();
transfer.list_array[1][0] = "whereismy";
transfer.list_array[1][1] = "Where is my mindBernsteil2006";
transfer.list_array[1][2] = "0";
end = 1;

// END VARIABLES

How can I do it to put this vars into my movie?

I´ve tested to use the "loadVariablesNum()" command but I don´t understand how to use the parameters behind the path.



Hope Someone can help my


cu


bad23

[F8] Using External Variables
Hi
I've been trying for days now to use variables held in an external text file using the LoadVars class. I am able to access the variables from within the function. but not from outside the function. I declare the variables outside the function.

I've tried loops, declaring the variables in a variety of manners, assigning multiple variables. using arrays, using onLoad, onData.

I simply don't understand why I can't use a external file!

Original I want to do this to add some custom parameters to some flv playbacks but I've given up, now all I want to do is reuse the variables outside the function! I've been at this for days now and deleted everything a few times over in desperation, but to give an example.
Code:
var my_lv:LoadVars = new LoadVars();
my_lv.onLoad = function(success:Boolean):Void {
if (success) {
trace("1) "+ my_lv.dayNames);// Sunday,Monday,Tuesday,...
trace("2) "+ my_lv.monthNames);// January,February,...
} else {
trace("1&2) Error");
}
}
my_lv.load("http://www.helpexamples.com/flash/params.txt");

trace("3) "+ my_lv.dayNames);
which outputs:

Quote:




3) undefined
1) Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Sa turday
2) January,February,March,April,May,June,July,August, September,October,November,December




I don't understand why I can't assign a value to trace (3).
I roughly understand that flash reads outside the function before it reads inside.. but if I want to use the value of trace 1) (in this example) in a number of different places do I have to reload the data file each time? (which seems ridiculous).
I have made an exhaustive search... If you think the answer is out there then I'd settle for the google keywords.. I feel I'm the only person in the whole flash community that is unable to reuse external variable.

[F8] External Variables
I know this has been posted numerous times but i am, unfortunately still having problems.

All i want to do is replace a hardcoded variable, with a variable which is external, and can be changed.

The variable looks like this; (this variable is defined at the top of a long actions frame along with other variables)

PHP Code:



maxImages = 5;




I would like to change it so maxImages, looks in an external txt file to find the number.

External XML Variables
my code so far:


Code:
var T = function () {
var languageXML:XML = new XML();
languageXML.ignoreWhite = true;
languageXML.load("http://xml.weather.yahoo.com/forecastrss?p=UKXX0093&u=c");
var Q =(languageXML.firstChild.firstChild.appendChild.attributes.code);
};
trace(Q);
Obviously doesn't work!?

http://xml.weather.yahoo.com/forecastrss?p=UKXX0093&u=c
theres the XML link... I need the "Code" from RSS> Channel> Item>yweather condition:
but I don't know how to refer to it!?
Someone please help before I go bald from stress!

Getting External Variables
Hi, hope someone can help
I have a file (por_butt.txt) with the following:
&pack_butt=5and in actionscript:loadVariables("text/por_butt.txt", "");
gotoAndStop(pack_butt);I want to have this external file to say at what frame gotoAndStop. I used this loadVariables with dynamic text with no problems, but I want to use this external variables for further control.
Can anyone help?

[FMX] External Variables
Hi, I'm working with Flash MX 2004. I have a funtional monthly calendar that does not use external variables - all variables are contained within the timeline. I am now trying to control it with external variables using:

loadVariablesNum("visualControl.txt",0);

The contents of the text file are:

&InitialMonthVisable=dec&
&janYear=2005&
&febYear=2005&
&marYear=2005&......

The InitialMonthVisable variable is used to define which month is visable first using dec=december, jan=january, etc. This is needed because the first month visable will not always be the current month.

There is a movieclip on the main timeline with 12 labelled frames (dec, jan, feb, etc) and uses the IntialMonthVisable variable in the first frame:

this.gotoAndStop(_root.InitialMonthVisable);

The movieclip then goes and plays the specified month. This works fine when the variable is defined within the movie, but the movieclip does not play the specified month using the external variable.

Is there something I am doing wrong or something I'm not doing?
Any help would be greatly appreciated.

External Variables
Hello,

I need some help to solve a problem with external variables.
I have a flash movie - index.swf.

_On the first frame of this movie I have a frame where I define my varibles:

presentation="yes";
clip1="no";
clip2="yes";
conclusion="yes";

_On the second frame I have this actionscript:

if (presentation == "sim") {
loadMovieNum("presentation.swf", 1);
}
else {
gotoAndPlay(3);
}

_On frame 3 I have:

if (clip1 == "yes") {
loadMovieNum("clip1.swf", 1);
}
else {
gotoAndPlay(4);
}

_On frame 4 I have:

if (clip2 == "yes") {
loadMovieNum("clip2.swf", 1);
}
else {
gotoAndPlay(5);
}

_On frame 5:

if (conclusion == "yes") {
loadMovieNum("conclusion.swf", 1);
}
else {
gotoAndPlay(2);
}

And this script is working. When I make a movie preview my movie loads the presentation.swf, clip2.swf and concluison.swf.

When I define my variables from a external TXT file the movie doesn´t work.

I creat a TXT called navigation.txt with the definition of my variables:

&presentation=yes&clip1=no&clip2=yes&conclusion=ye s& and

On the first frame of flash I define the name of the external TXT file with the variables:

loadVariablesNum("navigation.txt", 0);

And the flash doesn´t work. Why?
Can you help me?

Thank you.
And I ask you sorry because my poor English

External Variables
Can you change a variable of the main Fla with code that is is an externaly loaded swf?

Is this what a _global variable does?

How would this work?

Thanks!

External Variables And PHP
****IS THERE NOONE THAT HAS AN ANSWER?****

I went online and looked for some tutorials about this subject and found one but it does not seem to work for some reason.

Here is the CODE:

PHP:


PHP Code:



<?php$fName = "nuno";$lastName = "mira";$age = '24';// echo or print the variablesecho ("&fName=$fName&lastName=$lastName&age=$age&");?>




ACTIONSCRIPT:


Code:
// here is a reference to this timeline
var here = this

// create an object to store the variables
varReceiver = new LoadVars();
// load a file
// now the target path is to the server, because it's a php file
varReceiver.load("external.php");
// when the variables finish loading
//trigger something
varReceiver.onLoad = function() {
// show some text in a text field
// using the loaded variables
here.createTextField("t_txt", 1, 100, 100, 1, 1);
here.t_txt.autoSize = true;

here.t_txt.text = "My first name is " + this.fName + ".
";
here.t_txt.text += "My last name is " + this.lastName + ".
";
here.t_txt.text += "I'm " + this.age + " years old.";
};
RESULT OF ACTIONSCRIPT:

My first name is $fName.
My last name is $lastName.
I'm $age years old.

So instead of entering the values for the variables it just puts in the variable name. Can anyone tell me why?

Thanks

Variables In An External Swf
Hey there,

I'm trying to teach myself AS3 by porting my AS2 game to AS3. My game involves what I call the 'core' (it just sounded cool, I guess) and a couple of external levels, each in a seperate SWF. I want to be able to access some variables within the externally loaded SWF and vice versa - access variables from the 'core' from within the externally loaded SWF. However, I've been reading that in AS3, you can't just jump outside your own scope so easy, is that right?
Say I have a number of walls of a certain type in the level, and I want to communicate that to a method within my 'core' upon loading the level....how do I get this done? At the moment I've been using _global a lot for this.

thanks in advance,
Adriaan

Variables From External Swf
How do I call change the value of variables from an external swf. For example, in index.swf, i load the movie external.swf. External.swf has a variable 'holder'. How do i change the value of holder from actionscript of my index.swf?

Help anybody? Thanks

[FMX] External Variables
Hi, I'm working with Flash MX 2004. I have a funtional monthly calendar that does not use external variables - all variables are contained within the timeline. I am now trying to control it with external variables using:

loadVariablesNum("visualControl.txt",0);

The contents of the text file are:

&InitialMonthVisable=dec&
&janYear=2005&
&febYear=2005&
&marYear=2005&......

The InitialMonthVisable variable is used to define which month is visable first using dec=december, jan=january, etc. This is needed because the first month visable will not always be the current month.

There is a movieclip on the main timeline with 12 labelled frames (dec, jan, feb, etc) and uses the IntialMonthVisable variable in the first frame:

this.gotoAndStop(_root.InitialMonthVisable);

The movieclip then goes and plays the specified month. This works fine when the variable is defined within the movie, but the movieclip does not play the specified month using the external variable.

Is there something I am doing wrong or something I'm not doing?
Any help would be greatly appreciated.

'&' In External Variables
im working on dropdown menu for a travel listings site with it's own database of links. one of the dropdowns im using has geturl links ( to a target frame )

the flash file imports from link data extrenal text file ( so the client casn change) the problem is the links stop at my first '&' symbol ( it's ASP technology ) and dont continue reading my data. it just stop there. only first entry has a link

besides that, this menu is apprently really screwing up the clients statistic page which is important to him..

any one what going to? any ideas?

Re-using External Variables
Hi
I've been trying for days now to use variables held in an external text file using the LoadVars class. I am able to access the variables from within the function. but not from outside the function. I declare the variables outside the function.

I've tried loops, declaring the variables in a variety of manners, assigning multiple variables. using arrays, using onLoad, onData.

I simply don't understand why I can't use a external file!

I've been at this for days now and deleted everything a few times over in desperation, but to give an example.
Code:

var my_lv:LoadVars = new LoadVars();
my_lv.onLoad = function(success:Boolean):Void {
if (success) {
trace("1) "+ my_lv.dayNames);// Sunday,Monday,Tuesday,...
trace("2) "+ my_lv.monthNames);// January,February,...
} else {
trace("1&2) Error");
}
}

my_lv.load("sample.txt");

trace("3) "+ my_lv.dayNames);
/*
some other code
*/
trace("4) "+ my_lv.dayNames);


sample.txt:

Code:

&monthNames=January,February,March,April,May,June,July,August,September,October,November,December&dayNames=Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday


which outputs:
Quote: 3) undefined
4) undefined
1) Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday
2) January,February,March,April,May,June,July,August,September,October,November,December

I don't understand why I can't assign a value to trace (3) and (4).
I roughly understand that flash reads outside the function before it reads inside.. but if I want to use the value of trace 1) (in this example) in a number of different places do I have to reload the data file each time? (which seems ridiculous).
I have made an exhaustive search... If you think the answer is out there then I'd settle for the google keywords.. I feel I'm the only person in the whole flash community that is unable to reuse external variable.

Variables From External Swf Into The Main.swf
hello everybody

can someone help me. i made a preloader which i made in the main movie. when i release a button the preloader starts and is loading an external movie. this movie plays with the >>if frame loaded<< thing, and after complete loading it writes a root variable /reloader=0. in the main movie, the preloader waits until the variable is 0.

the strange thing is: it works on netscape windows, ie and netscape macintosh, but not on internet explorer windows.

does someone knows a solution????


please answer

Passing Variables Into External Swf
Ok, Ive kind of been round the houses with this one and I am not sure of the best solution.

I have a "main.swf" that I am loading external swf's into blank movie clips. One of these "news.swf" and (movie clip nane news) is a scrolling text box that has content dynamically updated via asp.

I can get "news.swf" to load in all the variables via asp etc and when I view it alone, all works well. As soon as I look at it via the "main.swf", the content, i.e. the variables do not seem to be being passed ??

Ive tried to put a delay on the laod variables in case this was the problem and I have tried an OnClipEvent on the news mc, but it is still not working.

Any help is much appreciated ......

Thanks in advance,

Motorpilot

Help Loading Variables From External Swf
Hi Guys!

I am using the smart clip from learning interactions library.

In one of the Clips I have:

onClipEvent (load) {
// Load User Parameters locally into this movie clip.
Interaction_ID = ../:Interaction_ID;
question = ../:question;
answer_a_value = ../:answer_a_value;
answer_b_value = ../:answer_b_value;
correctFeedback = ../:correctFeedback;
incorrectFeedback = ../:incorrectFeedback;
feedback = ../:feedback;
tracking = ../:tracking;
navigation = ../:navigation;
Type_Interaction = "T";
Weighting = ../:Weighting;
Objective_ID = ../:Objective_ID;
------------------------------------------------------
Now I have built a User interface in an external swf movie.
I want allow my usrs to change this main movie thr the UI movie without the need to open the main movies fla.
My question is:

I need to build a button for each Text field in the UI.swf or one button would do the job as well?

What is the code I can attach to this button, so it loads and updates the value of those variables?

Thanks a BUNCH!

External Variables Vs. Set Property
My flash is pulling in several variables from an external ASP (could be txt file - no difference) I have the text fields reading in the variables from the ASP fine, so I assume all the variables are getting in. I am trying to do a SetProperty to a symbol based on one of those variables. Specifically, I am trying to get the symbol's X scale to readjust based on info it's pulling from the ASP. No luck! I can key in a percentage manually, or set a variable within flash, but when I put in the variable name that it gets from the ASP, it keeps it at 100%. It's like Flash is refusing to look at it as a number. Any thoughts?

How To Load External Variables To A Swf
is there anyway i can load a external variables like a .txt file to a movie, the method i used are:

on the first frame of the movie:
loadVariablesNum ("info.txt", 0);

on the frame in a movie:
_root.countera++;
if (_root.countera>maxhit) {
h = Math.round(Math.random()*1)+35;
gotoAndStop (h);
}

in the info.txt file:
maxhit = 2;

i wanted to make the maxhit = 2 times, but after i try the information did loads into the movie, but it didn't specific the maxhit = 2, instead the movie skip the counter portion and stop at (h).

Loading External Variables
Hi can anyone tell me how to do this?

I have an external text.txt file containing something like
A1=yadda yadda &A2=etc etc &A3=blah blah

How can I set a text box up called for example; external

Then when a user click a button the text box displays A1 then next click A2 then next click A3 and so on?

Is there a way of incrementing the variable A with a counter? So that it becomes the variable A1 A2 A3 etc?

I am sure this is an easy one but I can't get it to work.

Help!!!

Loading External Variables
Hi, I have a movie that builds a menu of artists from an external txt file. It all works fine locally, but remotely it often loads the movie and doesn't build the menu until you make it refresh. I've added a check on the preloader to make sure all the text file has loaded, I've also now tried just putting the 'loadVariablesNum' code on a couple of other keyframes, in a kindof tell it three times and it might notice gesture. The url is 'galleriacontinua.com/continua.html' if you want to check it. any ideas please??!!!! I'm going mad.

External Variables In Flash
Please help!
I have an ASP-Script, that provides me with some variables from an external database. I load those variables with
loadVariablesNum ( "http://www.xxxxxxxxx.com/variables.asp", 0);

Now my questtion:
How can I use this variables to pass their value to in internal variable. For example: One of the external variables is name. My corresponding internal variable is flashname. Is there any statement that does something like:

flashname = name;

to pass the value from the external (ASP) variable to th internal veriable? I know how to use external variables in field with dynamich text, but I want to pass the value directly to a flash variable.

Thanks for any hints.

Name For External File With Variables
Hello,

a Flash-File (for several banners) has to read out a textfile with variables. The external file has to have the same filename as the flash-file.

For example:
Name of Flash : "test.swf"
name of external file : "test.txt"

(Because of the fact, that several banners will be stored in one unique directory!!)

The scrpit has to readout its own filename and to generate the filename of the external-file.
Is it possible? How to do this?


Sorry, my english is not the best!!!

----------------------
Hallo,

ein Flash-File soll Variablen aus einer externen Datei auslesen. Besonderheit dabei: Die externe Datei muss den selben Dateinamen haben wie das eigentliche Flash.

Zum Beispiel:
Das Flash heisst : test.swf
Das dazu passende File mit Variablen heisst test.txt


Und jetzt kommts: Das Script muss so clever sein, dass es den Dateinamen des SWF ausliest und daraus den Dateinamen der externen Datei generiert. Das muss doch möglich sein, oder?

++++++++++++++++++++++++++++++++++++++++++

External Variables To Array
Please help me!
I have a txt file which contains some variables:
&x1=1&x2=2&xn=n
and i should create a code in AS which takes these variables and put them into an array.
Now i charge these variables into my movie with loadVariablesNum but i'm not able to create a loop which transfer automatically the variables to my array!
:-(
Thank you a lot!!

Loading External Variables
Hi, I know this is another lame question, but I need to know how to load an external text file into a dynamic text field. I've done this before, but it's been a long time.

I have a text field named newsText that I would like to load the text into. What I need to know is not only the action that I should put on the frame, but also I need to know what the text file should look like. Any help is greatly appreciated!!!

Loading External Swf With Variables
This is really frustrating me.

In my movie, I am loading external swfs and sending variables to the external swf that I am loading.

I have a frame action like so:

movie = "home.swf";
setProperty(_root.loader,_visible,0);
loadMovie("loader.swf","_root.loader2","POST");

My root stage has two empty target movieclips: loader and loader2. I have two because I want one to cover the other because the top one will disappear revealing the bottom one.

Anyways, with the code above, I load loader.swf onto loader2 which is the top target and send loader.swf the variable movie which contains the string "home.swf".

The reason I send loader.swf a variable is because each of my menu bottons will change the variable movie to the appropriate swf file when it is pressed.

The code for the buttons is as follows:

on(release){
movie = "home.swf";
loadMovie("loader.swf","_root.loader2","POST");
}

The problem is, when i play it in the player on my machine, it works fine, but when i view it in a browser it doesn't load loader.swf at all. I have NO clue what's wrong so any help would be great!!! thanks in advance!

Ampersand In External Variables..? Is It Possible..?
Hi,

When I load variables from an external file all variables
are devided by a ampersand ( & ). But what should I do if
I want to use an ampersand in a text-string like
"Barry & Flash" in a variable...? Is that possible?

Loadcheck For External Variables ?
Hi,

i have to load variables from a php file and then compare them to the variables in my swf.
since the loading takes a while, how can the swf determine if the external variables are already loaded ?

thanks

Loading External Variables.
I'm experiencing some trouble with loading external variables into my movie.

I have a button on the stage, which places a MC into an empty MCholder, from the library, using attachMovie:

on(release) {
_root.contentmc.attachMovie("enthomeMC", "enthomeMC1", 9);
}

enthomeMC/enthomeMC1 consists of a dynamic text field (enthome) and two buttons for scrolling. Using the MX tutorial, I've made the dynamic text box scrollable, and attached the necessary code to the scroll buttons.

then I go back to my button, and try to place the variable 'enthome' (from an external text file) into the dynamic text field.

so now my code looks like:

on(release) {
_root.contentmc.attachMovie("enthomeMC", "enthomeMC1", 9);
loadVariables("enthome.txt", _root.contentmc.enthomeMC1.enthome)
}

this however is not working - what am I doing wrong? my .txt file looks like this:

enthome=blah blah blah (text)

I've used text files like this before, but I was using loadMovieClip rather than attachMovie, and I was using Flash 5 before - what has changed in MX? please help!!

I do NOT want the text to be selectable, and I've tried embedding the font. But this is not working.

S.

Loading External Variables
Hi, there.
I need to create a TXT with certain commands (variables) that will change the color of a MC, inside a movie. How should I proceed with the external file editing?
In other words, I want to be able to change information on the EXAMPLE.TXT and the MC will load the color specified there, in the external file.
Thanks a lot.

Variables From External Script
Hi!

Could somebody tell me how it is possible to load variable from a cgi and use them in flash scripts!

To load variables and display them is no problem! But if I like to use them properties does not work!

thx in advance

Variables And External Text
Hi:

I am loading the following using external text in frame 1

stop();
myText= MyVars.Tx1;
mySlide= MyVars.Lx1;
LessonNameTx=MyVars.Mx3;

Now in frame 2 I want to load

stop();
myText= MyVars.Tx2;
mySlide= MyVars.Lx2;
LessonNameTx=MyVars.Mx3;

and in frame 3 the same...can someone please help me here automate this code.. using a variable

Thanks

How To Add Variables For External Loading
Hello,

I figured some stuff out pretty much... but this last part is hard.
I hope some body can help me with this. I want to add variables so the swf
starts loading another .TXT file after a button press. Where should i put what
code?

frame1
loadVariables("reports/paris.txt", _root.mcnews.mcreports.textHolder) ;

frame2
stop();
_root.mcnews.mcreports.Once = true;
_root.mcnews.mcreports.index = 0;
//
function haalVariables() {
if (_root.mcnews.mcreports.index>=0 && _root.mcnews.mcreports.index<_root.mcnews.mcreport s.aantalimages && _root.mcnews.mcreports.Once) {
loadMovie(_root.mcnews.mcreports["image"+(_root.mcnews.mcreports.index)], _root.mcnews.mcreports.textHolder.imageHolder0);
_root.mcnews.mcreports.mc_info.play();
_root.mcnews.mcreports.Once = false;
}
}

on the mc ''textHolder'
onClipEvent (enterFrame) {
_root.mcnews.mcreports.haalVariables();
}


on a preloader mc'
onClipEvent (enterFrame) {
percentage = "LOADING "+Math.floor((_root.mcnews.mcreports.getBytesLoade d()/_root.mcnews.mcreports.getBytesTotal())*100)+"%";

if ((_root.mcnews.mcreports.getBytesLoaded() == _root.mcnews.mcreports.getBytesTotal()) && geladen == "ja") {
_root.mcnews.mcreports.gotoAndStop(2);
} else {
loadVariables("reports/paris.txt", _root.mcnews.mcreports.textHolder);
}
}

Everything works smooth by the book like this. But i need to add buttons to
load other txt files. So i thougt variables are the best solution. But i do not
know how...

Heeeeellp...!

Problem With External Variables
Hi there



I am having some problems with variables. I have a text file with a load of variables, some of these variables are dates, which I need to run through new Date() ... that is causing me a haedache...

I got a flash movie, where it is possible to add links to html files from the external text file, in the text file you specify when the last edit took place, and I want my Flash movie to go in, look at last edit date for that section, and display a *new items* icon on the sections with links newer than 30 days in them.

But I can not get new Date() to eat my variables..

example :

var last_edit_section1 = new Date(imp_year, imp_month, imp_date);

I hope someone here has a solution or idea.

Thanks
NetGuard

Loading External SWF With Variables
My variables from an external SWF are not communicating with the loading SWF.

//VARIABLES in loaded.swf
folder = 3
image = 9

//the SWF loading in the variables
loadMovie("loaded.swf", _root.holder_mc);
folder = _root.holder_mc.folder;
image = _root.holder_mc.image;
trace(_root.holder_mc.folder);
trace(_root.holder_mc.image);

The trace gives me an "undefined" parameter. I'm sure I missed something very simple, but it's evading me. Could someone help me out?

External Variables & IF Statements
I am loading external variables from a text file. When I do a trace action the variables are recognized correctly. However when I have an if statement it doesn't work.

My Variables are T4401 & T4402

I load the variables on the main site. Then I load a movie into a target MC. Inside the loaded movie I have this script

if(T4401==0){BO.gotoAndStop(2);}
if(T4402==0){BM.gotoAndStop(2):}

The variables come from a database file of products. Whent he products are sold out(==0) I want a small movie clip (BO & BM) to goto frame 2 which changes the markers color.

Now, the if statements are not working and they are not telling the MC's to go to frame 2. Can anyone help. Please!

Actionscript In External Variables
i am using a dynamic menu that loads a variable into a text box, and i need it to also load a movie along with the variable. Is there any way i can put the actionscript into the external variable, so that it will load along with the variables? Thanks a ton; i'm working on a volunteer project, and the deadline is getting closer. great thanks to any1 that know's the anwser.

Variables And External Sources
I have an mp3player that loads an external mp3 file and plays. It works just fine if the url/location is hardcoded in the swf file.
however, i need to be able to have the url passed to the flash externally so that a number of users may utilize this single swf build.

example:
current location need to be filename.mp3 or http://www.domain.com/123/filename.mp3
however, i need this location to be edited per use of the swf.
in php i know i could call it such as:
$myLocation = "123";
http://www.domain.com/$myLocation/filename.mp3
or

$myLocation = "http://www.domain.com/123/filename.mp3";

(the "123" is what changes for each page use)


how do i do this within actionscripting?

Here is the code i have that is working just fine...
until i need to use a full url that changes for each page the swf is use on.

onClipEvent (load) {
if (playing!=true) {
playing=true;
soundIsLoaded=1
myMusic=new Sound();
myMusic.loadSound("myMusic.mp3",true)
}

}


Limitations:
1. because of the server set up, i am always required to call items using full absolute urls/paths.
2. php, cfm, xml etc are not available for use with this.
-- the goal is to be able to give an webmaster a copy of the swf and the code to embed it on their html page... and that's it.

Thank you! And I apologize in advance if this has been answered or its so simple one would feel the need to roll ones eyes. I'm stuck.

Using _global Variables In An External .swf
I need to use some _global variables I declared in a Movie that loads another .swf into an empty Movieclip.

Here's the deal: the "bootloader" movie has the declaration for all global variables I need throughout the system.

This bootloader loads other movies (.swf) into empty movieclips. But I have not been able to use this variables in the loaded .swf's. The only way I can get their values is using "_root." preceeding the variable.

They are declared using "_global.", so, what's happening here?

Can anyone help me?

How To Store Variables In An External .txt ?
I would like to send some variables from within the .swf out into storage in a .txt located on the same domain.
Can some one please indicate the code line to that ?
Thanks in advance !

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