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




Passing File Variable



hello, good morning!

with javascript i passed
a <input type=file>
to my flash movie

on submitting my flash movie
to it's perl cgi script

i only get the first line
or path to the file.

the CGI commences a binary
trasfer, but all the files
are 0k long !

please help, i'd like
to keep the submit button
in the flash movie if i can.

thank you ! I know you can
help me!



FlashKit > Flash Help > Flash ActionScript
Posted on: 11-19-2001, 12:01 PM


View Complete Forum Thread with Replies

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

Passing Variable Between Two Swf File
i wanted to pass the variable from a button to another swf file that will be loaded at level1.How do i do that as of now here is my coding at the button
----------------------------------------------------------
on (release) {
var classID ="1"; >>>this is the variabel i want to pass
loadMovieNum ("1.swf", 1);
gotoAndStop ("Main_menu");
}
----------------------------------------------------------
this is the coding at 1st frame of my second.swf file

----------------------------------------------------------

// Create random number to append to URL
randNum = Math.random()*1000000000;
// Call PHP script to fetch class information
loadVariables ("viewforum.php?cla_id="add classID add "&" add randNum, this,"GET");
// Halt the movie clip until data loaded
stop ();
----------------------------------------------------------
i need the varibale classId to be pass form the button to 1.swf file....am i missing something here...Please help

Passing Variable Between 2 Swf File
hi,
can i know if i got 2 swf file, is it possible to pass the variable from one to another beside using loadMovie which is the only way i know. is there other way of scripting?

thanks in advanced

Passing A '.png File Location' As A Variable From IE Into Swf?
I wanted to pass the location of a .png file as an external variable from a html page into the swf file by using the loadMovie method, but instead of embeding the location right into the swf, i'll retrieve it from an external variable. The theory should work but i just can't get it to work.

Here's the flash code:


ActionScript Code:
_root.attachMovie("background", "bg", 1);
bg.loadMovie(bgfile);
bg._x = (xOffset);
bg._y = (yOffset);

Here's the html code:


HTML Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>v0.6.8</title>
</head>
<body bgcolor="#cccccc">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="800" height="600" id="v0.6.8" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="v0.6.8.swf?bgfile=backgrounds/Background-Road.png" /><param name="quality" value="high" /><param name="bgcolor" value="#cccccc" /><embed src="v0.6.8.swf?bgfile=backgrounds/Background-Road.png" quality="high" bgcolor="#cccccc" width="800" height="600" name="v0.6.8" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</body>
</html>

Passing Text Through A Variable Into A Swf File
Can anyone help?
I am loading a swf into level 0 of my main timeline

here is the code>>>>>>>>>

_root.createEmptyMovieClip("mcImageHolder",0);
mcImageHolder._x=300;
mcImageHolder._y=20;
mcImageHolder._xscale=100;
mcImageHolder._yscale=100;
mcImageHolder.loadMovie("text.swf",0);


line1.onRelease = function() {
mcImageHolder.unloadMovie(0);
mcImageHolder.loadMovie("image01.swf",0);
_global.myStatement = "This sucks";
_global.myPictureTitle = "A26 Editorial:Letters, Mar. 10 2007";


}

THEN IN MY LOADED SWF - I HAVE A TEXT FIELD THAT REFERS TO THE global variables : myStatement and myPictureTitle

myTitle.text = (_global.myPictureTitle);


it worked at first and the loaded swf would display the text set by the global variable in the main timeline

and now after changing the design a little
it doesn't work anymore

i tried it first with local variables and that didn't work either

any suggestions?

Passing Variable Through .INI File To Flash
Hello ,

I stucked into one problem Actually I want to load the "Image " Dynamically inside flash without hard Coding it.
I want that it should read the variable from any other file like .XML,.HTML,.INI etc so that user can change the name ...resulting the desire image to load inside Flash.

I have used two code.

loadVariables("VIPLOGO.png", "THEIMAGE");
import flash.display.BitmapData
/var container:MovieClip = createEmptyMovieClip("container", getNextHighestDepth());
/var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(this);
mcLoader.loadClip("VIPLOGO.jpg",container);

This loading the hard coded image file name. Which i dont want.

and the other is

var myStyle:TextField.StyleSheet = new TextField.StyleSheet();
//myStyle.load("master.css");
content_txt.styleSheet = myStyle;
content_txt.multiline = true;
content_txt.wordWrap = true;
content_txt.html = true;
var story:XML = new XML();
story.ignoreWhite = true;
story.load("images.html");
story.onLoad = function() {
content_txt.htmlText = story;
};

its reading the HTML file but in this I have made the CSS file as comment and the problem coming with this is the image is not coming at desire place.

I want any a simple method , So that a layman can also change the file name and that should effect the Flash Movie.

Please help me out!

Thanks!

Passing An Img File Location As A Variable From IE Into Swf
I wanted to pass the location of a .png file as an external variable from a html page into the swf file by using the loadMovie method, but instead of embeding the location right into the swf, i'll retrieve it from an external variable. The theory should work but i just can't get it to work.

Here's the flash code:


ActionScript Code:
_root.attachMovie("background", "bg", 1);bg.loadMovie(bgfile);bg._x = (xOffset);bg._y = (yOffset);


Here's the html code:


HTML Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>v0.6.8</title>
</head>
<body bgcolor="#cccccc">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="800" height="600" id="v0.6.8" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="v0.6.8.swf?bgfile=backgrounds/Background-Road.png" /><param name="quality" value="high" /><param name="bgcolor" value="#cccccc" /><embed src="v0.6.8.swf?bgfile=backgrounds/Background-Road.png" quality="high" bgcolor="#cccccc" width="800" height="600" name="v0.6.8" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</body>
</html>

Passing Variable From Class File To Fla
i have tried all manner of things. you must be able to do this but i don't seem to work it out.
i thought setting the var as public might do it but no.
i don't understand get and set but think they may do it also.
i want the fla file to execute code based on the value of a variable in the class file (.as).
any thoughts?

[F8] Passing A Variable From A Text File To Flash
Hi all,
I have a Q here, I am making a photo album for a friend and he has no experiance using flash, I would like to make it very simple for him to add photos to his album by using an external text file that holds the number of pictures.
right now I have a var set up in actionscript that looks like this
var NumberOfImages = 29;
how can I set this so that AS will read NumberOfImages = 29 from an external text file that will be in the same directory as the SWF so that it can set up the array properly thanks D-Wiz

Passing A Variable From A Text File To Flash
Hi all,
I have a Q here, I am making a photo album for a friend and he has no experiance using flash, I would like to make it very simple for him to add photos to his album by using an external text file that holds the number of pictures.
right now I have a var set up in actionscript that looks like this
var NumberOfImages = 29;
how can I set this so that AS will read NumberOfImages = 29 from an external text file that will be in the same directory as the SWF so that it can set up the array properly thanks D-Wiz

Passing One Variable From An AS2.0 Swf Embedded In An AS3.0 Flash File
Hello my main flash file is CS3 AS 3.0, but i have one small section that is made in AS2.0. So i load swf of the AS2.0 bit no problem into my main flash file.

I would like to make it so that when the user clicks a button in the AS 2.0 swf, it passes a variable ("12345" for example) into the main timeline of my main flash file (AS3.0).

Is it possible to do this?

if so, what code/solution would i need to do that? Does anyone have a simple example? I just need to pass one variable value when the button is clicked

Thanks a lot in advance for any help

Passing Variable From External .txt File To Field Name
Hi - probably a hugely embarrassing beginner question, but I can't seem to find an answer anywhere. I think it's probably (hopefully?) just a syntax problem, so if anyone could point me in the right direction I'd be really grateful.

I'm loading the content of a dynamic text box from an external .txt file and I'm trying to find a way to change the content from a link in the .txt file (if that makes sense).

The code I'm using to change the dynamic text box at the moment is:

Code:
myData = new LoadVars();
myData.onLoad = function() {
hometextbox.html = true;
hometextbox.htmlText = this.newstext;
hometextbox.scroll = 0;

if (hometextbox.maxscroll<=hometextbox.scroll) {
_level0.application.form1.upbutton._visible = false;
_level0.application.form1.downbutton._visible = false;
} else if (hometextbox.maxscroll>hometextbox.scroll) {
_level0.application.form1.upbutton._visible = true;
_level0.application.form1.downbutton._visible = true;
}
};
myData.load("Textfile.txt");
and it's working fine, but I'd like to have a link like


HTML Code:
<A HREF="asfunction:MyFunc,contacttext ">Contact</A>
inside my .txt file which changes what is loaded into the dynamic text box.

I thought it might be something like:


Code:
function MyFunc(arg){
myData = new LoadVars();
myData.onLoad = function() {
hometextbox.html = true;
hometextbox.htmlText = this[arg];
hometextbox.scroll = 0;

if (hometextbox.maxscroll<=hometextbox.scroll) {
_level0.application.form1.upbutton._visible = false;
_level0.application.form1.downbutton._visible = false;
} else if (hometextbox.maxscroll>hometextbox.scroll) {
_level0.application.form1.upbutton._visible = true;
_level0.application.form1.downbutton._visible = true;
}
};
myData.load("Textfile.txt");
}
but I've had no joy. Can anyone tell me what I'm doing wrong?

Cheers!

- f

Loading And Passing A Variable In Flash From A Text File
HI!

I'm trying to figure out how I can load a number value from a text file and then use that number as an expression in flash.

//lets say thats the content in the text file called 'value.txt' is 'myValue=1200'

In flash I want to set a variable to equal the number in what 'myValue' is in the text file, which would be 1200.

Does this make sense?

Passing Variable Php To Flash, Can't Access File.php On Localhost
Hi,
i'm trying to put a variable in a flash movie using a PHP file.
I Did everything in the .php (print(filename=$file))...
I also coded the part for AS in the movie timeline:

loadVariables("http://localhost/test.php", this, "GET");

But on that line, flash 8 pop a message saying that my movie.swf try to communication with localhost, and this access is denied. So I'm redirected to the web setup where I must ADD the address wich I want to be allowed, but that change nothing, after reloading the application, it keeps doing the same thing, even if my new address(http://localhost/test.php) is indeed in the allowed list.

Please I really need help for this I can't find where to fix this anywhere!

Trouble Loading A Text File When Passing The Variable In The URL String
I am trying to load variables into Flash from a text file. I pass the name of the text file as a variable in the URL string and then use that variable in the loadVariables command to pull in the text file. It works fine locally but is unreliable up on the server.

I seem to have got past this problem by moving the action to frame 2 from frame 1.

Has anyone else experienced problems with this and has found a better resolution?

Passing Variable From Php To Flash, Error: Can't Access File.php On Localhost
Hi,

i'm trying to put a variable in a flash movie using a PHP file.
I Did everything in the .php (print(filename=$file))...

I also coded the part for AS in the movie timeline:
loadVariables("http://localhost/test.php", this, "GET");

But on that line, flash 8 pop a message saying that my movie.swf try to communication with localhost, and this access is denied. So I'm redirected to the web setup where I must ADD the address wich I want to be allowed, but that change nothing, after reloading the application, it keeps doing the same thing, even if my new address(http://localhost/test.php) is indeed in the allowed list.

Please I really need help for this I can't find where to fix this anywhere!

Passing A Variable In Flash To Another Flash File
Hello,
I am very new to flash and would like to know how to pass a variable in one flash file to another flash file. The variable cannot have a hardcoded name. It must be a variable that will call for any file within the flash file it needs to be directed to.

Please help. Thank you in advance.

Problem Passing Variable Values (from XML) To Variable In Child Movie
I'm reading something from XML, and store it in a variable. I can trace the variable and it shows two items. I can display those two seperately with variable[0] and [1], meaning that it works as intended.

After that, I'm calling a movieclip, which is supposed to read that variable.. sadly, it can't do it. So I resorted to passing the content of the first variable to a variable inside the called movieclip. This works, and tracing the second variable shows both items from the first. However, I cannot access the items seperately with variable2[0] for example.

What's the problem? The second variable is currently a string. I tried to declare is as other things (like xml or array) as well, but that didn't help. Is there also a way to make this procedure unnecessary, i.e. can I somehow access the first variable?

I've attached the fla/xml/swf in case my description doesn't make sense!

Passing Array Variable Name In To Component Variable & Getting It's Value
Hi, All
Anyone can solve my problem????
My Problem is that I want to store a array' s name in to a component variable. like this:-

working in this case

Scene action on timeline
_global.arr = "This is aray Test"

component parameters
VarName : _global.arr



Not working in this case

Scene action on timeline
_global.arr1 = new Array()
_global.arr 1[0]= "This is aray Test"




component parameters
VarName : _global.arr1[0]




in component I'm doing this on timeline action
abc.text = eval(VarName)


plz help me out of this

Regards
Ankur Arora

Passing Variable
Hi,


I want to have a movie in level1 write variables to level0. I have tried several ways and none of them have worked. I'm not sure I know the proper syntax and have had trouble finding a complete reference on it. Here is what I'm trying right now:

In a frame script in level1 which is loaded into level0:

_level0.module = "netbas";

Then I have a button script in level0 use it this way:

on (release) {
loadMovieNum (+module+"_c.swf", 1);}

I want the button to load the following file into level1: netbas_c.swf. When I test and click the button I get an error that says it can't find "_c.swf" indicating to me that it isn't getting the variable value. It works fine when I set it within level0, but not from level1.

Can you please tell me why this won't work and what I need to do. Is there a better way to have links in level0 use variables that will be set in the current movie in level1?
Where can I get complete help on this?

Additional info: I have several movies that will be put into level1. A button in level0 will load a movie in level1. Once that movie is loaded, then I want all the navigation
buttons in level0 to have "netbas" in front of them so that they only load the swfs associated with the current movie in level1. Then when the user clicks on Advanced
Networking from the main menu and loads that movie into level1, I want all those buttons in level0 to have "netadv" in front of them. (i.e. netadv_c.swf). I hope this is
clear. I've made parts work, but I cannot get the variable to level0.

Thanks,

Brian

Passing Variable?
i have a MC-b within a MC-a,i set a variable in MC a now i want to use it in MC b also how do i pass it on from MC-a MC-b or to main time line?
Thanx!

Passing Variable
I have a base movie. In this base movie I have loaded two other movie using the basic action:

loadMovieNum ("movie1.swf", 1);
loadMovieNum ("movie2.swf", 2);

I have identified and set variables in movie1.
[eg. _root.variable1 = "white";]

I would like to be able to change these variable from movie2.
[eg. _root.variable1 = "blue";]

I have not been able to do this.

Advice please.

Passing Variable
I have a base movie. In this base movie I have loaded two other movie using the basic action:

loadMovieNum ("movie1.swf", 1);
loadMovieNum ("movie2.swf", 2);

I have identified and set variables in movie1.
[eg. _root.variable1 = "white";]

I would like to be able to change the value of the variable from within movie2.
[eg. _root.variable1 = "blue";]

I have not been able to do this.

Advice please.

Variable Value Passing
I am trying to make an RPG in flash... I have a dynamic text box in the top left hand corner of each scene, to show how many credits the player currently has. The variable of that textbox is "showcredits". So I put in 2 actions:

credits = 500
showcredits = credits

In this game, people will be able to purchase things using the credits. But here is my problem. I have a seperate scene for a store in which they can buy things. In this scene, I have one action:

showcredits = credits

But in this scene, the number of credits doesn't show up... I'm guessing that the value I set for the "credits" variable in the first scene didn't pass over to the next scene... what can I do?

Passing A Variable To .SWF
I wonder if anyone can help me. This is probably a simple question for most of you but can I pass a variable into a .swf movie by simply doing this:

mymovie.swf?mapid=1

I would then like to collect the variables value within the flash movie. Is this possible or is there another way of doing it.

Thanks in advance

Steven

Variable Passing
I cant give up now im almost finish.But my problem is i cant pass a variable to php is some thing wrong with my coding
at flash
---------------------------------------------------------------
// Create random number to append to URL
randNum = Math.random()*1000000000;
var classID ="1"; >>>>this is the variable i want to pass to php
// Call PHP script to fetch class information
loadVariables ("viewforum.php?cla_id="add classID add "&" add randNum, this);
// Halt the movie clip until data loaded
stop ();
--------------------------------------------------------------

and here is my coding at php side
-------------------------------------------------------------
<?
// Include config file
include('common.php');

// Connect to database
$link = dbConnect();

// Build query to fetch forum
$query = "SELECT * FROM prod_subclass where cla_id= '$classID'";

// Execute query
$result = mysql_query($query);

// If query failed...
if (!$result) {
// Inform Flash of error and quit
fail("Couldn't list class from database");
}

// Find out how many class in this table
$threadCount = mysql_num_rows($result);

// Setup our variable to hold output
$output = "classCount=$classCount";

// For each classreturned...
for ($count = 0; $count < $classCount; $count++)
{
// Extract post details from database
$class= mysql_fetch_array($result);
$classID = $class['subcla_id'];
$topic = stripslashes($class['subclass']);

// Add thread details to output
$output .= "&class" . $count . "ID=" . $classID;
$output .= "&class" . $count . "Topic=" . urlencode($topic);}

// Output all threads in one go
echo $output;

// Inform Flash of success
print "&result=Okay";

// Close link to database server
mysql_close($link);

?>
-------------------------------------------------------------------


Please help ...thank you in advance

Variable Passing
I'm new to this. I need to pass a variable as defined in one script contained in a movie clip to another instance. The purpose of this is to have a drop down menu with button choices. Selecting a button will initiate a transition movie clip. When the last frame of the transition clip is viewed, a separate .swf file will begin loading. This same transition clip will be played before every linked .swf file is loaded. The name of the .swf is the variable I want passed from the menu to the tranisition clip.

I know it's wrong, but here's the code as it stands today. "movieOpen" is the intended variabe, of course used incorrectly here.



Drop Down Menu Clip Code:
on (release) {
_root.Transition.gotoAndPlay(2);
with (_root.Transition) {
_root.Transition.movieOpen = "Test.swf";
}
}



Transition Instance Code:
ifFrameLoaded (11) {
unloadMovieNum (3);
loadMovieNum ("movieOpen", 3);
}
stop ();



Thanks in advance for your tutelage,

Todd

Passing A Variable To A URL
Hi,
I am having difficutly figuring out how to pass a variable from an input text field to a URL. I have a form field for users to input their zip code, then I would like to append the a url to add that zip code. The URL ends with "zip= " and I would like to input the zip variable before executing the getURL command. Any thoughts?

Best

Passing Variable From One Swf To Another
How do you pass a variable from one swf to another?

Passing Variable Help
little syntax help please :

var fadeButton = 2;
_root.button(fadeButton)._alpha = 50;

trying to make button2 fade 50%....not working...whats the proper syntax.

THANKS!

Passing Variable From URL To SWF
I am creating a small SWF of a speedometer. The end result should take the value of a variable "speed" from the URL and have the needle of the speedometer stop on a corresponding frame. There is 160 MPH on the speedometer and the needle goes from 0-160 over the course of 160 frames. I have gotten the needle to work using a slider (please excuse the jumpy-ness).

http://www.blackdragonmotorsports.com/speed.htm

Now that I have gotten that to work, I need to replace the slider with a dynamic variable (from the URL) that will tell the MC "needle" to stop at the corresponding value. For example...if the URL was:
http://www.blackdragonmotorsports.c...ed.htm?speed=45
the needle should stop on frame 45.

The *.fla is at http://www.blackdragonmotorsports.com/speedometer.fla

Any help would be awesome.

Thanks,
Jay Almers

Variable Passing
Hi expert out there, need some help from you guys, so here is the situation, i have a html file which content 2 frames FRAME1 and FRAME2, how do i pass variable(onclick or onload) from HTML in FRAME1 to the flash(swf) in FRAME2 to do something? Is this posible?

Thanks in advance!!!!

Variable Passing
*is there anyway that you can pass variables from one movie clip to the another.
Say i have a in one movie clip/button
on(press){
if(t=true){
gotoandplay("blah");
}
else{
gotoandplay("blah2");
}

can i update that variable t in another movie clip and pass it to the one that has the code above?????
is it even possible?

thanks
Peter

Passing Variable
howdy

i have three swf's main, nav, and window now what im tring to do is when a button is clicked in nav set variable in root i have this action, not sure if its right

_root.section="home";

i declared this variable in the main.swf, i have the following code:

section="0"; in the first frame of main

now when i click the button in nav as well as sending the variable to _root i get it to start anination in window which is doors shutting, when they finally close there is the following actions

if (_root.section == "home") {
loadMovie("pages/home.swf", "_level2.contentwindow.msg");
} else if (_root.section == "work") {
loadMovie("pages/work.swf", "_level2.contentwindow.msg");
} else if (_root.section == "skills") {
loadMovie("pages/skills.swf", "__level2.contentwindow.msg");
} else if (_root.section == "gallery") {
loadMovie("pages/gallery.swf", "_level2.contentwindow.msg");
} else if (_root.section == "contact") {
loadMovie("pages/contact.swf", "_level2.contentwindow.msg");
} else if (_root.section == "msg") {
loadMovie("pages/msg.swf", "_level2.contentwindow.msg");
}

cant seem to get them working, been playing with the code for ages now, pulling my hair out.

thanks in advance

Re: Passing Variable
Hello,

I am having some trouble passing a variable from an input box to a dynamic text box. I want the user to input their name, click a submit button and then have their name passed to a dynamic text box. At the moment I have an action on the button as follows: -

on (release) {
inText = grad_Name;
gotoAndStop("output");
}

(grad_Name is the name of the variable attached to the input box, to be passed to a frame named "output".)

The action on "output" frame is as follows: -

outText = inText;
stop();

(outText is the name of the dynamic text box).

Now, it was working OK but then I adjusted a graphic and now it doesn't work!!!

Any ideas or a better solution much appreciated.

Passing Variable
I have an variable called "myVar" in my flash movie level 0. Now I want to pop up a new flash movie in a new window, and also need to pass this variable to this pop up new movie. How can i implement this? Any method that I can use to pass this variable in Flash thru different window? thx

Passing A Variable From A URL To SWF
Hello. I've recently learned how to get javascript to pass a variable into flash. What I'm trying to find out is, how do I take it one step further and get it to pass variables from the url itself? What I mean is something like:

flashpage.html?variablename=value

Where a javascript takes this information and turns it into a variable, somehow. So for example, one could make a dynamic flash birthday card, with the user's age and name passed through a url from a link so whenever Joe, age 23, clicks on it, he's greeted with an animation saying "Happy 23rd Birthday, Joe!" For example.

Anyway any help you can offer would be appreciated.

Passing In A Variable
Right now I am I have a moive that loads another movie in it. It loads different movies based on a variable that gets passed in on the html page like this MyMove.swf?whatmovie=TheTitleMoive.swf. The problem with passing the variable in with the URL is that the browser does not cache the movie.

I have been trying to use the loadvariables() function to do the same thing. I can load a variable and have it displayed into a text area but when I try to use that variable to load a movie the variable does not work for some reason.

Does anyone have an exaple of how to do this or a tutorial?

Thanks

Passing Variable From Src Into SWF
GOAL: To pass a variable from the param/embed html code into the .swf file so that by changing the external variable, it is possible to display different stock market indices in a spectrum format.

EXAMPLE SWF: http://www.finwin.com/template.cfm?n...ode=218&view=1

I created the above DTN Market Spectrum flash movie to display moment by moment trends in various stock market indices.

Now I want to create individual displays of the same data so that clients can select which index they wish to view instead of all six. In order to do this, I want to create a single, generic movie that can be used for any of these six and others we might create. The key is to pass the name of the chose index from the param/embed source into the actionscript for the movie.

Here's what I am doing currently:


<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="400" height="72" id="dow30spectrum" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="mSpectrum.swf?indX=dow30" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="Mspectrum.swf?indX=dow30" quality="high" bgcolor="#ffffff" width="400" height="72" name="mspectrum" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>


The variable is <b>indX</b> and the index I am wanting to display is the Dow 30 (dow30).

THE PROBLEM:
While the variable is being passed into the Mspectrum movie (I set up a temporary dynamic text field to display the value when I run the movie), my actionscript isn't recognizing it.

My movie is set up with two layers. Layer one is essentially the "stage" on which are some graphics and dynamic text fields for displaying price and volume data. Layer two is an attached movie that builds the spectrum through a loop process. It reads the values for each company displayed in the index and defines the width and color of each company's spectrum element.

If I hardcode indX in layer one to equal "dow30", the spectrum works as predicted. But if I try to use the external value passed in from the ?indX=dow30 in the param/embed code above, I get 'undefined' values and the spectrum won't build. Yet, I can see the "dow30" in the temporary text field I've created in layer one.

I know this sounds pretty complicated, but basically the code is not passing the externally-hardcoded value for indX from layer one to the attached movie, but it will when indX is hardcoded in layer one.


Anyone have any suggestions on passing the external indX value to various parts of this movie?

Thanks

Variable Passing
I am trying to pass variables using ASP to a swf file that is located within the same page.

Example:
I have a dynamically generated URL that is posted in the body of an email. When the person clicks on that URL it opens a web page that contains a link to another ASP page that contains a swf ( we'll call this asp page myvars.asp).The link to myvars.asp passes variables into the page from a query string. It is these variables that I want to pass to the swf. I can not simply call this page from Flash again as the variables being passed are dynamic based off of the query string.

I hope this makes since. I no how to pass variables to and from Flash from an ASP page, but since these variables are dynamically generated off of a link, I don't know if it is possible to do what I am trying.

Thanks,

FWagner

Passing A Variable
Hi:

I am creating a website. I need to pass a variable from one flash movie using getURL action. Is it possible to do that? Let me explain my problem in little detail.

I have home page. It has 5 Menu buttons. When you click one of them, it opens a seperate swf having a navigation bar. I need to use a same navigation bar(swf) for every click on home page but the swf for nav bar should jump on the different frames according to the button clicked on the home page.

Can anybody help on this matter?
Thanks

Passing Variable Value
Is it possible to pass a variable's value to the gotoAndPlay(); function. I'm having trouble with a condition statement and I just want to skip that step and set a variable to pass the lable name to the gotoAndPlay. i.e. gotoAndPlay(Variable);

Passing A Variable To An Swf
<*PARAM NAME=movie VALUE="text_anim.swf?sect=section3"*>

Will this work in all browsers and all platforms if I place it in the object and the embed tag.

Passing A Variable To A Swf Via A URL?
Let's say I have a swf with a variable name of "number" that I'd like to be able to set via the url, such as:

http://www.domain.com/page.html?number=4

How do I set up the swf/html to allow this?

Many thanks.

Help With Passing Variable
Hi guys I hope some one is up I don't get what I am not doing right here.

I am using flash MX by the way.

I have a main movie or a shell the loads another movie into which contains a
navigation bar, images etc.

The navigation bar is in a movie clip, each button is also its own movie
clip as well.

In the second movie that's loaded I have this action script:


Code:
_global.section;
//setProperty("_level0.Lall.adbt", _visible, "0");
//this = function() {
if (_level0.Lall.mainmenu.about.section == "about") {
trace("about was hit");
//setProperty("_level0.Lall.adbt", _visible, "100");
tellTarget ("_level0.Lall.adbt") {
gotoAndStop(2);
// getURL("vision.swf", "_level2");
}
} else if (_level0.Lall.mainmenu.port.section == "portfolio") {
trace("portfolio was hit");
tellTarget ("_level0.Lall.adbt") {
gotoAndStop(3);
// getURL("vision.swf", "_level2");
}
} else if (_level0.Lall.mainmenu.serv.section == "services") {
trace("services was hit");
tellTarget ("_level0.Lall.adbt") {
gotoAndStop(4);
// getURL("home.swf", "_level2");
}
} else if (_level0.Lall.mainmenu.con.section == "contact") {
trace("contact was hit");
tellTarget ("_level0.Lall.adbt") {
gotoAndStop(5);
// getURL("portfolio.swf", "_level2");
}
//} else if (section == "home") {
//getURL("audio.swf", "_level2");
}
//};
// end if
stop();


Now is my about button I have this action script.


Code:
on (rollOver) {
_level0.Lall.mainmenu.about.gotoAndPlay("begin_about");
}
on (press) {
_level0.Lall.mainmenu.about.section = "about";
buttonsound_open = new Sound(this);
with (buttonsound_open) {
attachSound("button_sound_S");
start();
}
}


The problem is the it wont trace and also when uploaded to my site it will
not work.

Can any one help me?

Thank you.

Passing A Variable..
Hello,
I have a problem with this part of my script. The maxRows variable is received from a .cfm page. The problem is that the maxRows variable is not set it's value. So I have a situation like IF (3 == maxRows) instead of IF(3==3).


if ( flashid==maxRows ) {
flashid = 1;
gotoAndPlay (2);
} else {
gotoAndPlay (2);
}

Thanks for any help.

Passing A Variable From One Swf To Another
I have made a 2-part presentation that will be shown on a company's internal website. All employees will see Part 1, and all managers will see Part 1 followed immediately by Part 2. They will access the presentations by clicking on a link on a page that's sent to them by email.

My idea was to make a swf for each of them (employees and managers) which would just contain a script to create a variable ("man" for managers and "emp" for employees) and then launch Part 1. Then, at the end of part 1, it would look to see what the variable was, if the variable was "man" it would go on to Part 2, and if the variable was "emp" it would close the player.

I tried this but it seems that a variable gets lost when a new movie is loaded. I tried loading it to level 1 but it still didn't work. Any suggestions or is there just no way? (other than having 2 separate copies of Part 1)

Variable Passing
I don't know if I am overlooking something simple, but I can't find the solution anywhere.

I have a main timeline, on which some variables are declared. I then have some movie clips on the timeline, which I want to manipulate based on the variables from the main timeline.

My problem is that I can't pass the variables from the timeline into the movie clips. How can this be done?

Thanks.

(using Flash 8 Professional)

PLEASE Help Passing Xml Value As URL Variable
I am using a combo box that is populated by an xml file that looks somewhat like this..

<hotellist>
<hotel>hilton</hotel>
<hotelid>1</hotelid>
</hotellist>


I have had success passing the <hotel> as a variable in the url by using mycombobox.text because its the actual text of the selected item.

But I am having problems sending the <hotelid> variable. anything I try is 'undefined' - any help with this would be much appreciated.

Thanks

Help With Passing A Variable From......
Hello,

I usually try to seek out my answers rather than ask for help, but I have decided to try and put away my pride and ask. I am working on a flash project in which I have seperated into different swf files in order to keep my loading times down. In one section of my project a user clicks on a button that loads a seperate swf file containing the requested information. When the user is done reading the information they can click on a button called "Home" which will direct the currently loaded swf file to advance to and play a frame label designated as "fadeout." At the end of this there resides a final frame(keyframe) which I want to call a variable that is created on the first frame of the main timeline of the flash movie that loaded the external swf movie that I am trying to call from.
The reason why I am wanting to do this is because I want to have my external flash movie unload itself after the fadeout frame has finished playing. The problem I am having is that I cannot figure out how to target the timeline of my original movie. I know that in as2 you could use _level0 correct? However, from my understanding this has been elimanated in as3. I hope that I have clearly made my point across.

Sincerely Grateful,
Stephen E.

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