Sending Query String To ASP
I've tried to send a query string to an ASP page using loadVariablesNum as belows:
loadVariablesNum ("http://www.domain.com/test.asp?type=1", 0, "GET");
But, I can only see that Request("type") from ASP return null value. What's is the problem?
Thank you for your help.
FlashKit > Flash Help > Flash ActionScript
Posted on: 05-03-2002, 01:37 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Sending Query String
Hi all!!
I am using Flash 5.. doing a CD presentation in flash projector or exe..
on click of a link I want to send a query string:
pagename.html?Firstname=Joe
but when it opens the page I am not getting "?Firstname=Joe" in the addressbar of the browser..
pls help..
Sending Query String Flash To Html
hi all,
I am new to here this forum im using movie clips here long time ago, anyway could you pls tell me how to send query string flash to html. I found one site they are doing html to flash they didn't mention about how to send flash to html. I just doing one flash one that i need to using this option pleas tell me
cheer
code finder
Error 2101: The String Passed To UrlVariables.decode() Must Be Url-encoded Query String
I am trying to make a flash contact form which will submit the firstname, lastname, email and comments to an asp.net page.
I am have having the following error:
Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs
I am using the following action script code as pasted below. This action script is communicating with an asp.net file to send the email out. In the end it responds back with response=passed or failed.
I have already spent around 3 hours figuring it out.. and looking through the internet for resolution but no luck. Any help will be appreciated.
stop();
submit_btn.addEventListener(MouseEvent.CLICK, submit);
function submit(e:MouseEvent):void
{
var variables:URLVariables = new URLVariables();
variables.firstname = firstname_txt.text;
variables.lastname = lastname_txt.text;
variables.email = email_txt.text;
variables.comments2 = comments_txt.text;
var req:URLRequest = new URLRequest(”emailacount.aspx”);
req.method = URLRequestMethod.POST;
req.data = variables;
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.addEventListener(Event.COMPLETE, sent);
loader.addEventListener(IOErrorEvent.IO_ERROR, error);
loader.load(req);
status_txt.text = “Sending…”;
}
function sent(e:Event):void
{
status_txt.text = “Your email has been sent.”;
firstname_txt.text = “”;
lastname_txt.text = “”;
email_txt.text = “”;
comments_txt.text = “”;
}
function error(e:IOErrorEvent):void
{
status_txt.text = “There was an error. Please try again later.”;
}
and the following asp.net code:
<%@ Page Language="VB" %>
<%@ Import Namespace="System.Net.Mail" %>
<script language="VB" runat="server">
Sub Page_Load(Sender As Object, E As EventArgs)
Try
Dim fromEmailAddress = "paul@lancierinc.com"
Dim toEmailAddress = "rizwandar@gmail.com"
Dim firstName = Request.QueryString("firstname_txt")
Dim lastName = Request.QueryString("lastname_txt")
Dim comments = Request.QueryString("comments_txt")
Dim userEmail = Request.QueryString("email_txt")
'create the mail message
Dim mail As New MailMessage()
'set the addresses
mail.From = New MailAddress(fromEmailAddress)
mail.To.Add(toEmailAddress)
'set the content
mail.Subject = "Email from" & firstName & " " & lastName
mail.IsBodyHtml = True
Dim strBody As String = "<b>Email from</b>" & " " & firstName & " " & lastName & "<br><b>Email Address:</b> " & userEmail & "<br><b>Comments:</b> " & comments
mail.Body = strBody
'send the message
Dim smtp As New SmtpClient("mail.lancierinc.com")
smtp.Send(mail)
Dim urltoencodestring2 = "response=passed&err=0"
'Response.Write(urltoencodestring2)
Catch smtpEx As SmtpException
'A problem occurred when sending the email message
'ClientScript.RegisterStartupScript(Me.GetType(), "OhCrap", String.Format("alert('There was a problem in sending the email: {0}');", smtpEx.Message.Replace("'", "'")), True)
Response.Write(smtpEx.Message)
Dim urltoencodestring = "response=failed&err=1"
'Response.Write(urltoencodestring)
Catch generalEx As Exception
'Some other problem occurred
'ClientScript.RegisterStartupScript(Me.GetType(), "OhCrap", String.Format("alert('There was a general problem: {0}');", generalEx.Message.Replace("'", "'")), True)
Dim urltoencodestring3 = "response=failed&err=1"
'Response.Write(urltoencodestring3)
End Try
End Sub
</script>
String Passed To URLVariables.decode() Must Be A URL-encoded Query String...
I really don't understand why this won't work? I've made a test which sends some POST data to a script on my page which works fine. But why does not this work?
Code:
var mapsize = _cmap.fieldx.toString(16) + _cmap.fieldy.toString(16);
var names = "Zomis_AI6";
var description = "descr";
var result = "gameresult";
var upldata: String = "mapsize="+mapsize+"&names="+names+"&description="+description+"&result="+result;
trace(upldata);
var variables:URLVariables = new URLVariables(upldata);
var request2:URLRequest = new URLRequest();
request2.url = "http://www.zomis.net/record.php";
request2.method = URLRequestMethod.POST;
request2.data = variables;
var loader2:URLLoader = new URLLoader();
loader2.dataFormat = URLLoaderDataFormat.VARIABLES;
loader2.addEventListener(Event.COMPLETE, uploadcomplete);
try {
loader2.load(request2);
trace("Loaded");
}
catch (error:Error) {
trace("Unable to load URL");
}
Tracing gets:
Code:
mapsize=1010&names=Zomis_AI6&description=descr&result=gameresult
Loaded
Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.
at Error$/throwError()
at flash.net::URLVariables/decode()
at flash.net::URLVariables$iinit()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()
Sending Data For Search Query
Hi,
I'm trying to create a search box inside a flash file for one of my sites. Currently the search works as html. I was told that it will work if in Flash.
I created an input text box and a button. Grouped them together as a clip. Then placed the following code on the button. Nothing happens when I hit the button. I tried using "GET" as well.
on (release) {
loadVariables("http://www.julesseltzer.com/sessearch.php?q=searchquery", "POST");
}
The address with the q=searchquery is what the company who makes the search engine said to you. Any help would be apprecieated.
Adam
Query String
in the src parameter in my html file I've got
http://www.myDomain.com/myMovie.swf?var=val
What is the best way to extract the values in this query string...I do have a method, but it is longer than i think it needs to be...any ideas?
Query String
How to read Query String for example:
test.swf?test=1&id=23&line=23,
how to read the values of test, id and line inside the flash move in script?
Query String
I want to pass variables into a flash movie using a query string... How can I do it?
i.e myPage.htm?id=4
I want to be able to get the id variable from the query string into flash
String Query
how can i change the font color using string query?
so other people can use the file with their own text and font color.
sample:
myflash.swf?text=Hello World!&fontcolor=0xFF0000
i also want to load a pic using string query,
sample
myflash.swf?text=Hello World!&fontcolor=0xFF0000&image=mypic
thanks, hope you can help me.
How To Get The Query String?
Can somebody tell me how to get the query string? this._url always returns the value at compile time, which of course is my local file:///....myMovie.swf. I'd love to get everything after the question mark, e.g.
mydomain.com?test=test
Any ideas?
<edit>I know that you have to try this from a webserver, in which case it does the same thing, except http://... rather than file:///...</edit>
<edit>Is the only way to do this via javascript?</edit>
URL Query String
How can I get the document URL and query into a variable in actionscript?
I tired using the method below, but this does not work in IE.
http://actionscript.org/forums/showthread.php3?p=561688
Here is an example you can try in both Firefox and IE.
http://hombrefeo.com/fla/?foo1=bar1&foo2=bar2
AS2:: String Query
I have a string that looks something like this:
TestString - "1,0,0,0,0,0,1,0"
I need to create some sort of loop (I think) to search though the string and look to see if it contains any 1's.
How was I go about this?
Any help would be great thanks.
Query String ?
a client is asking me for this:
is this possible?
We would like to present our visitor with a different scene within the
movie depending on the location. For example:
http://www.xxx.com/links.asp?cat=52&Dest=Malta
Would load a scene with a backround picture of Malta
http://www.xxx.com/links.asp?cat=44&Dest=Greece
Would load a scene with a backround picture of Greece
The image file is located in the root and is called greece.jpg
If no picture is found then a default picture is displayed.
In/Out Query String
I am working on parsing a query string from an html doc to flash. It comes into flash but won't come back out to the link I have. I don't know if what I'm trying to do is possible or if I need to use another method. I can't server side .
Thank you
here are the files : http://www.joshspoon.com/js_queryString.rar
Query String With %D8
Dear everybody
I have changed from Flash 5 to Flash MX. In Flash 5 it was possible to call a flash movie with a query string containing the danish letters , and , which all have numbers beyond 127.
The same query strings write nonsense in my flash movie text fields.
I have also tried to use FlashVars as documented on
http://www.macromedia.com/flash/ts/...s/flashvars.htm
but it gives the same error.
Have I forgotten something? How can I transfer letters like %D8 to the flash 6 player?
Torben
Pulling From A Query String
alright I've fidgured some things out and this is what I am currently doing.
I am attempting to load variables placed into the query sting (url) into a dynamic text field with the same variable name. Currently it is effecting the variable but it is not putting the values into the text field
Here is my code:
loadVariablesNum ("void", 0, "POST");
to = "0";
from = "0";
I have attempted sending the variables using "GET" as well as "Don't send" with the same results
the page is
http://www.familyties.com/dogDaystes...=josh&from=bob
If you remove the "to" and "from" on the query string the default value of "0" appears in each variable
What am I doing wrong?
Load Swf Into Swf (specifying In Query String)
Hi I have the following problem (I am not too experiences with flash AS, but trying to learn).
Basically I have the following model:
player.swf (interface that looks like winamp for instance)
song01.swf (swf with imported mp3)
What ends up happening is song01.swf is loaded into player swf. The way it works right now is I have to hardcode the name of the song to load into each player.swf. But what I'd like to do is to specity which song I want to add in a query string and player.swf will pick it up. For instance:
www.mysite.dom/player.php?song=song01.swf
then player.swf in player.php will pick up the variable song01.swf and laod it into itself.
Can anyone give a quick hint? Thanks much guys.
And lastly, I am doing it all in Flash 5.
Vladislav Kulchitski
GetURL With Query String And Asp
kay. i've got a variable in my asp page keeping track of user preferences. i'm making a link graphic in flash 5 that needs to grab this variable, and redirect to another page within the site... so, in plain jane asp, the link goes:
response.write "<a href=""description.asp?" & strQSMin & "&pid=90210"">"
easy enough, but when i try the matching string in actionscript:
on (release) {
getURL ("description.asp" & strQSMin & "&pid=90210", "", "GET");
}
it's a no go...
i've tried a dozen variations here, none of which have resolved anything.
any hints as to what's up here?
cheers
staceass
Query String In Flash
I have a dynamic text field and the variable name for it is "name". I want to change this text field using query string.
I have two pages.
1) Where there is a link to the flash page called "Click here"
2) The second page is flash html page and the name of the page is "hello.html".
Both the files are in the same folder and I am using the following code as a hyperlink with "Click here".
<a href="hello.html?name=John">Click here</a>
I want the name field to print "John" but it does not work.
Please help
Read The Query String
Is there any way to read the querystring? or if not is there a way to pass it in to the movie using asp?
Query String Into Flash?
Friends ..
I m really having difficulty in retrieving a querysting into flash ... i've searched through the forum n found links at the bottom, related to my problem .. well i need to load one querystring from a few into Flash e.g:
http ~~~com?flashvar=value?othervar=value
i want this (flashvar=1) value to goto different scene if the value is 1 then
gotoAndPlay("scene1",1); if (flashvar=2) so on .... !! I need the flash code from which i can get this value ... kinldy compile my request ... n gimme no error zero warning .. ... i m requesting this thread again, i haven't got any reply from the last one ..... thanks a lot .. the links r these !!
http://www.permadi.com/tutorial/fla...ring/index.html
http://www.actionscript.org/forums/...ed=1#post285398
http://www.actionscript.org/forums/...03&page=2&pp=15
http://www.actionscript.org/forums/...ead.php3?t=2219
http://www.actionscript.org/forums/...ead.php3?t=2946
http://www.macromedia.com/support/f...local_query.htm
have a nice time ...
My Query String Function
In case anyone was interested, here's a query-string routine I wrote that may be of some use to people. It works just like __GET(tolken) in PHP or Request.QueryString(tolken) in ASP. Just call queryString(tolken) where you want the value of a string you passed to the .swf file in URL. For example: ...src="mymovie.swf?valA=hi&valB=there"
queryString("valA") will return 'hi' and queryString("valB") will return 'there'
Below is the function definition. Just slap it wherever, the function is defined on the global scope.
Code:
_global.queryString = function(tolken) {
// Written by Gus Crawford. No usage restrictions,
// don't have to credit me, be happy and solve problems.
// The entire queryString:
var theQueryString:String = new String();
var theStart:Number = new Number(0);
var theLength:Number = new Number(0);
theQueryString = unescape(_root._url);
theStart = theQueryString.indexOf("?", 0);
theLength = theQueryString.length - theStart;
theQueryString = theQueryString.substr(theStart, theLength);
//_root.out.text = tolken;
// Good, we have the ENTIRE qstring isolated.
// now find our specific tolken
// look for our tolken name preceded by a ? or & symbol.
// look for ?tolken= or &tolken=
var valStart:Number = new Number(0);
var valEnd:Number = new Number(0);
var valLen:Number = new Number(0);
valStart = theQueryString.indexOf("?" + tolken + "=", 0);
if (valStart == -1) {
valStart = theQueryString.indexOf("&" + tolken + "=", 0);
if (valStart == -1) {
return "undef";
}
}
valStart ++;
valEnd = theQueryString.indexOf("&", valStart);
if (valEnd == -1) {
valEnd = theQueryString.length;
}
else {
valEnd --;
}
valLen = (valEnd - valStart) + 1;
var FinalValue:String = new String();
FinalValue = theQueryString.substr(valStart, valLen);
var ChopHere:Number = new Number(0);
var ChopThisLong:Number = new Number(0);
ChopHere = FinalValue.indexOf("=", 0) + 1;
ChopThisLong = (FinalValue.length - ChopHere) + 1;
FinalValue = FinalValue.substr(ChopHere, ChopThisLong);
return FinalValue;
}
Variable From Url Query String
simple ish
i understand the whole moviename.swf?variablename=content format to pull a variable into flash
but i cant seem to apply that formatting to the new method that dreamweaver uses flash
any ideas?
Code:
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','700','height','273','src','script4_pressures','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','script4_pressures' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="700" height="273">
<param name="movie" value="script4_pressures.swf?page=climate">
<param name="quality" value="high">
<embed src="script4_pressures.swf?page=climate" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="273"></embed>
</object></noscript>
i should be able to take the "page" var and use it, but its not working, could this be something to do with the dreamweaver fix for embeds?
cos my browser is using javascript it's not getting to the <noscript> tag
how can i parse the url using the above format?
any help would be appreciated
thanks
ds
Getting A Variable From Query String In The URL
Hello all, heres what Im trying to do:
Im linking to a HTML page using a link like this <a href="www.myhtmlpage.html?MyVar">To view your profile click here</a> What I want is for the flash file on this html page to read in the url and get the passed variable MyVar. How is this done, or is there a better way of doing this?
Any help would be greatly appreciated
Thanks, -L
Query String Problem
I have a query string that I'm able to display in flash from the Htlm page.
The problem I'm running into is I want to capture that varibale and send it with a form I have in flash and send it off. I need to know how to hold that variable and then send it back off. In my Flash form
If some one could lead me in the right direction or just some give some insight it would be great.
Thanks
How To Extract Query String
How to I extract the 'user' and 'video' from
/flash/example.swf?user=george&video=189352
I couldn't do it right with AS3, any suggestions?
Thanks!
How Do I Get A URL Into Flash From A Query String?
I've looked around in books and docs and forums and I've realised that I've got no idea of what to look for.
What I want to do is quite simple: somehow append a URL string to the Flash <object/> and <embed/> tags to tell Flash where to look for an MP3 file.
Something like:
HTML Code:
<object height="40" id="fl_cube"
width="50"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> <param value="http://mysite.com/assets/mp3player.swf?url=audio_file.mp3" name="movie" /> <param value="high" name="quality" /> <param value="#FFFFFF" name="bgcolor" /> <embed width="50" height="40"
pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"
name="mp3player" bgcolor="#FFFFFF" quality="high" src="http://mysite.com/assets/mp3player.swf?url=audio_file.mp3" />
</object>
I don't even know if the query string is right:
"http://mysite.com/assets/mp3player.swf?url=audio_file.mp3"
Any help or tutorials would be greatly appreciated. Thanks in advance.
URL Query String In .as File
Is it possible to get the values from the query string from the URL..in an .as file not in fla.
eg..www.yahoo.com?name=mike
i need the value called mike inside my action script (.as) page...
Is it possible?? If so please help me...
Query String Variables
I know I've done this before, but I can't find the file that had it.
I'm trying to simply load a variable from the URL into flash as a variable.
eg.
"http://www.mywebsite.com/index.html?page=home"
Would send Flash a variable "page" with value "home"
I remember only having to change the embed code to get this to work.
I've seen countless examples of this, but where the variable is in the source code of the page, which is not what I need. The variable must be dynamic, and therefore in the URL.
Query String Glitch?
This should be an easy one. For some reason, the query string I am passing into Flash is not working completely.
I use the Flash Satay method to load my movie. Then, I am sending simple variables using a query string. Here is the code that I'm using:
c.swf?path=navigation.swf?skipIntro=1&curSection=1
The first variable, "skipIntro", is passed with no problems. The second variable, "curSection" has no effect. I've tried reversting the order like this:
c.swf?path=navigation.swf?curSection=1&skipIntro=1
But, then "curSection" works and "skipIntro" has no effect. Another thing to note is that the problem produces the same effect in both IE and Mozilla.
I think this is why this is happening: A query string starts with the ? symbol. The & symbol indicates the next variable. So, the second ? (the start of the "second" query string) is treated as text. The & symbol is taken by the holder movie rather than as a the second movie.
Does anyone know of a simple workaround? I'm going to try and get the navigation.swf to retrive the variable from the holder swf.
Load Query String
Similar to PHP and GD Library
I want the SWF to load the query string and display it in a custom font.
for example
header.swf?word=NEWS
And it would display NEWS in my certain font that is embedded in the clip
How do i load a query string? Thanks
Load Var. XML To Query String
I am trying to load a flv file on a server into a flv player. Right now it is pulling the flv via xml from a file i found on the interwebs.
I'm new and confused as to how I might be able to do this via a query string.
I am guessing LoadVar or loadMovie.....then a swf. then the query; my.swf?="query"
I know what it has to do, I just don't know exactly how to "say" it.
Help Retrieving Query String Value From AS
Ok guys i have 7 buttons which according to the value retrieved from the query string the button should be enabled or go to a specified frame this is the code im using for the movieclips
ActionScript Code:
onClipEvent (load) { if (menu >=4) { this.gotoAndStop(2); } else { this.gotoAndStop(1); }}
the variable is called menu the buttons are supposed to retrive the value of menu variable that i'm passing through parameter via HTTP in order to go to the frame specified.
Is this possible??
any help would be appreciated thanks
Url Of Loadmovie Must Be A Query String
hello all,
i'm trying to load a .jpg pic into a movie. The access path of the picture is in a Access Database. I've created an ASP page wich query the 'picture path' field and added a load variable function in flash. I get the good string in a simple text box, but when i put the variable (containing the path)in the 'url' field of LoadMovie, nothing happens, my picture doesn't appear...and when i write the path manually (http://xxx/picture.jpg), the image appears.
How can i put a variable in a LoadMovie 'url' field ?
What is the syntax ?
Thanxx !
Alvarez - mbelvo@c-comnet.com
Load Query String
Hello.
I need to load some variables into my flash movie from the asp page that loaded it.
I was going to use a query string on the end of the url but Im not sure how to capture these in my movie.
I know how to load variables by using the loadvariables() but not sure how this applies to Query strings
Can anyone point me in the right direction.
Cheers
Query String And AS3 In Flash Cs3
I have been searching for how to read querystrings from html into flash.
I mean that I would like to get the variables like this:
Code:
<embed src="header_v2.swf?beta=1" quality="high" ...></embed>
I would like to get the variable: beta into flash.
In AS2 it was pretty easy, but when I try it in AS3 I get the error: Access of undefined property beta.
This is what I tried:Code:
var betaString:String = beta;
trace(betaString);
I have searched everywhere but cannot figure out how to get this in, is there someone that can help me out by pointing me in the right direction. If I find it out I will post an example/solution here.
I have looked at URLVariables and URLLoader, but those seem to be for outbound calls to a specific location, not when actually embedding the swf file. The reason that I am trying to figure this out is that I need the HTML/PHP embeded calls to remain the same.
Pulling Variables From The Query String
Does any one know how I would go about pulling variables from the query string (URL) and post them in a dynamic text box? My overall goal is to have an animated Flash 5 card that will display the name of the person who sent the card and the name of the person recieving the card.
Thanks
Pulling Variables From A Query String?
alright I've fidgured some things out and this is what I am currently doing.
I am attempting to load variables placed into the query sting (url) into a dynamic text field with the same variable name. Currently it is effecting the variable but it is not putting the values into the text field
Here is my code:
loadVariablesNum ("void", 0, "POST");
to = "0";
from = "0";
I have attempted sending the variables using "GET" as well as "Don't send" with the same results
the page is
http://www.familyties.com/dogDaystes...=josh&from=bob
If you remove the "to" and "from" on the query string the default value of "0" appears in each variable
What am I doing wrong?
Passing Data With Query String
I'm trying to 'pass-through' a variable in a flash movie.
Basically I'm using flash to create a form that needs to be posted back to a server side database, using get url this is no problem.
However I want to populate the flash movie with a value that when the get url command is exectued, this value is passed back to the database.
e.g.
I have a variable called "AdvertID" it's value is "100". I know this before I play the movie, so I call the movie thus:
embed src "movie.swf?AdvertID=100" etc.
However when flash posts this data back using get url, it doesn't appear as one of the variables.
I do not want the user to see this value (however if they must I can live with it).
Do I have to declare "AdvertID" as a variable for this to work?
If I do where?
Thanks.
GetURL + Query String, Server Only ?
hi,
i use some kind of queries within getURL like :
getURL("toto.html?v1=tt&v2=uu","_blank");
When i'm not running a server, these kind of requests only open "toto.html", not passing any variable to the file.
so here's the quick question:
do i need to run a server to pass variables to a file via getURL + query string ?
Thanks
Quentin
Using Actionscript To Interact With The Query String
I was wondering if there there any commands Flash 5 has to work with the query string? After clicking on a banner ad made in Flash I noticed the page I went to had a couple of paremeters set. If this is possible, what are the commands I can use? Any help is appreciated. Thanks.
Getting Query String Data In Flash
How would I go about getting a queryString variable into a flash movie that is loaded on the page.
EX:
index.aspx?FlashTitle=Kids+Run
I would then have a flash movie on that very page that would need to use the FlashTitle Variable. I can write the variable anywhere on the page useing .NET if it needs to go anywhere else to make this happen.
1. Is there a way to load quey string data
2. Is there a way to load flash vars written to a html page
I know you can load XML variables and that being the case there has to be a way to do this. Thanks.
-Alex Banks
Import Image From Query String
I have a file with the name get-image.swf and place it in a HTML-dokument. I use the file path http://www.mysite.com/get-image.swf?45 (or ?id=45). So I want get-image.swf to load the image http://www.myside.com/images/45.gif with the loadMovie-function. Else if the path is http://www.mysite.com/get-image.swf?76, I want get-image.swf to load the image http://www.myside.com/images/76.gif. Someone understanding me?
PS: All the images are GIF-files.
Passin Params Via Query String
hello all,
dose anyone know a way to pass data to flash via url query string when the movie is called.
that sounds confusing so, for example, if I have a swf embeded in an html doc, I want to pass data to flash via the src property of the embed, or object tag
ie
src="myMovie.swf?var1='dat1'&var2='dat2'"
how do I set up flash to recieve this data?
in php I would just access the GET superglobal, but how do I do it in flash?
if my question makes no sence, I"m sory.
Query String In GetURL Not Working
Can anybody let me know why does query string not work in getURL
I want the target link to be
"cart.php?type=cart&prod=Ambien10mg30tablets&quant ity=1&refill=&action=add"
But when I click the button I see the next page without any query string. i.e only "cart.php"
Please help me with this
Query String Variable In A Loaded SWF
Hi there, this is what i would like to happen.
- A Variable is set in the query string of the HTML
e.g. flash.swf?number=1
- In flash.swf, a movie is loaded into a container using the if function
Code:
if(number == 1){
loadMovie("my_mc.swf", loadhere);
}
- However, I would like the loaded movie (my_mc.swf) to also read this variable and play an action. For example
Code:
if(number == 1){
loadMovie("my_mc.swf", loadhere);
_root.loadhere.gotoAndStop(2);
}
In theory this should work, but it just doesn't. Anyone got a solution?
I've tried levels to no success as well.
Query String Mp3 Player (one At A Time)
[re-post, posted in the wrong forum]
Quote:
Originally Posted by Airstep
Hi guys,
I've been asked to put together a Flash replacement for an mp3 player we developed that uses WMP with Active-X and doesn't work on Firefox etc.
The mp3s are loaded via ASP 'cases' defined either manually or through the backend (users can upload their own mp3s). There are only two fields to worry about, the url of the mp3 and the track name. I've spoken to our backend developers and they are able to output those fields in any format I require (JavaScript, ASP, PHP, XML, Query string etc.).
I first started toying with an XML-playlist mp3 player, but that seemed to be an odd way of doing things when I was only needing to play one file at a time. I didn't want lots of XML files being generated just to include fields that could really be added in as query strings.
So, I looked into pulling variables from query strings in Flash - dead simple. But then I tried to port that method into the mp3 player I created and got stuck at the first hurdle - how do I define the sound to be loaded as a variable?
My AS is pretty weak to be honest and I'm wondering if you guys have seen this done anywhere/know the best way to do things. Have searched all over FK and the net and can't find anything that doesn't use XML or something similar.
Any ideas?
Quote:
Originally Posted by hp3
It is not clear whether your question is how to use name value pairs in a query string or how to apply it to your specific situation (which implies there is some other complication you did not mention).
Quote:
Originally Posted by Airstep
Hi hp3,
Thanks for the reply.
I do know the theory and the logical process, just not the exact code. I'm a lot quicker at learning code if I've something similar to compare it to, and in this case I just don't know what to compare it to as I can't find any mention of loadSound() with variables and I don't have the understanding to translate similar tutorials into what I'm trying to achieve.
Basically I need to know how to call variables in Actionscript and whether or not I need to create empty movie clips for them or not.
I was also intersted to see if anybody else has ever done this before (I thought it would be pretty common) or if anybody knows of a better method to use.
Really I just need to know how to tell loadSound() to play the 'sound' variable I think.
|