This content has been marked as final. Show 8 replies
I would think you just need to send some POST or GET data with your getURL(use F1 reference for details) which get's processed by a serverside script and throws it into Flash, perhaps the safest way is by using FlashVars embed param. So maybe on the CD:
var link = "link2";
packet_mc.link = "link2";
(getURL using POST will send all variables in the MovieClip that getURL is called on as POST data, so in the above case I make a clean MovieClip with only one variable on it, the link variable)
BTW, are you using a projector on the CD? If not, be advised that the Flash Player will not allow the user to connect to the internet at all without taking some special measures.
*edited original post for forum users, newsgroup users will see edit here instead
abeall-thx so much for your help; to answer your question...yes it will be a projector file, will i need to make the urls absolute?
also, the login page is built in flash and just embedded in an html page, so would it work if i did something like this(on the SUBMIT button):
packet_mc.link = "link2";
again thank you so much for your help
> yes it will be a projector file, will i need to make the urls absolute?
Standard rules apply, so you don't have to make everything absolute, but sure, if you are accessing a different domain than the current location(which is the CD) you'll have to make it absolute.
>also, the login page is built in flash and just embedded in an html page, so
> would it work if i did something like this(on the SUBMIT button):
> packet_mc.link = "link2";
Well, that's only part of it. What you really need to do is take the variable that was sent via POST and embed it dynamically into the Flash. The easiest way to pass vairables into Flash is with FlashVars, like this:
<param name="FlashVars" value="link=link2" />
and in the <object> tag:
The problem is, you want that param to be dynamic. To do that, you can dynamically build the HTML with PHP or ASP. I can't really help you there, though, sorry.
ok that is a big help...just a few more pieces...well, i will see what i can dig up on the dynamic html...as far as the flashVARS are concerned...do i just append that line to the on(release) statement we came up with? thanks again
Not quite. There are actually several different things going on here. You really described them in your first post.
1) You need a local variable. That's easy, I assume you know all about using variables and objects in Flash.
2) You need to send the variable someplace. Flash is a "blackbox", it doesn't know where it's sending or why, it doesn't have to, it just needs to send it.
3) You need to receive the variables, and pass them into a new Flash.
To do 2), you use the getURL and POST data like we came up with. That's just the sending part. In fact, if you use the code I provided in your on(release) then your local Flash & code for the CD is actually done, it *will* send the variables wherever you want. But of course, sending doesn't do any good if there's no one to "catch it" and do something useful with it.
abeall...thank you so much for all your help...i posted a few different places and you were the only one who really took the time to help me wrap my head around this...thank you...i don't have all the pieces b/c i am not much for php and asp but you gave me a lot mroe to go on than i had...thanks again