Link to home
Start Free TrialLog in
Avatar of RICHARDH
RICHARDH

asked on

passing a variable

I need to be able to open a shockwave on a page, and pass a variable called episode to it at the same time.

I need this to work in IE and Netscape on bot the PC and on a MAC, can anyone help.

Thanks.
Avatar of bziemann
bziemann

Richard,

On the first frame of your movie create a variable called episode and set it equal to "". Example:

episode = "";

Then add a load variable action script to load the variable value from whatever source, text, asp, php, doesn't matter.  Make sure you load the variable into level0 or this won't work.
Example:

loadVariable("data.txt", 0);

Then inside the text file or asp file or whatever make sure you echo out the episode value as follows:

episode=Hello World&var2=Hello World 2

That's how you do it it's that simple.  You can also visit www.flashkit.com and do a search for loadvariable and find the fla of someone who has done one for you to learn from.

For His Renown,
Brent.
Avatar of RICHARDH

ASKER

Sorry, but you have missed the point. I cannot store it as a Text file as the decision of what the variable is depends on which button the user clicks in an HTML page. I need to send the variable as I open the page with the shockwave movie.

Thanks though.
Richard - I'm not that hot with this off the top of my head, but if you use JavaScript with TellTarget then I believe you can achieve what you're after.

Have a look at the link that Brent gave you (Flashkit).  It really is a damn fine page for tutorials, FAQ, downloads etc.

Either go there or go to http://www.virtual-fx.net

They're both good sites that have your answer available.

Ta,

John.
yeah john's comment sounds about right although I would not have the first clue about which javascript commands to use.  good luck  --someones gotta know.
Hi Richard.

As I already said in my reply to your earlier question, your SWF will work fine on IE and NN on the PC platform with the javascript that you'd put up.

However, b'cos of the bugs in IE for the Mac, it is not possible to use javascript to communicate with movies on the Mac platform. I also gave you the link from Macromedia which said as much :)!

So , I doubt if you'll be able to get javascript to work on the Mac.

Anyway, best of luck then!
Shekar
Hi Richard,
I agree with Shekar. Passing variables by using Javascript won't work on the Mac (Macromedia even mentions that on their site).
You could send the user input via a cgi-script that creates a text file and read the text in as Brent said..
You can use TellTarget to tell other movies things.  Use a small SWF for the link, and get that to load the movie and send it the relevant variable information.

John.
Use ASP server-side and send via GET because macs won't read from POST.

-Dan
ASKER CERTIFIED SOLUTION
Avatar of Nickovsky
Nickovsky

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
everything you need to know about integrating flash and ASP:

http://www.catapultic.com/resources

-D
RICHARDH:

You have many open questions:

https://www.experts-exchange.com/jsp/qShow.jsp?qid=11342298
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11355858
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11382838
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11415199
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11670638
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20001107
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20004454
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20065368
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20073152
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20084825
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20084821
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20086663
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20086784
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20107892
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20109405
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20109357
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20109887
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20110886
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20117400
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20118020
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20118934
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20118648
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11342618
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20130049
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20132692
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20142937
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20146293
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20147289
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20148615
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20149087
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20148609
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20150501
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20150630
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20154720
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20154865
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20154980
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20155947
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20180018
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20189434
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20193459
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20222409
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20235436
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20244279
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20244276
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20193051
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20256056
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20257136
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20257135
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20127746
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20259971
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20259964

To assist you in your cleanup, I'm providing the following guidelines:

1.  Stay active in your questions and provide feedback whenever possible. Likewise, when feedback has not been provided by the experts, commenting again makes them receive an email notification, and they may provide you with further information. Experts have no other method of searching for questions in which they have commented, except manually.

2.  Award points by hitting the Accept Comment As Answer button located above and to the left of that expert's comment.

3.  When grading, be sure to read:
https://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp#3
to ensure that you understand the grading system here at EE. If you grade less than an A, you must explain why.

4.  Questions that were not helpful to you should be PAQ'd (stored in the database for their valuable content?even if not valuable to you) or deleted. To PAQ or delete a question, you must first post your intent in that question to make the experts aware. Then, if no experts object after three full days, you can post a zero-point question at community support to request deletion or PAQ. Please include the link(s) to the question(s).
CS:  https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
At that point, a moderator can refund your points and PAQ or delete the question for you. The delete button does not work.

5.  If you fail to respond to this cleanup request, I must report you to the Community Support Administrator for further action.

Our intent is to get the questions cleaned up, and not to embarrass or shame anyone. If you have any questions or need further assistance at all, feel free to ask me in this question or post a zero-point question at CS. We are very happy to help you in this task!


thanks!
amp
community support moderator

1/27
Am clearing up my account and just found this question still open.

Thanks for the help.

Richard.H