Hi there!
I have a problem which makes me want to bite into my keyboard… I made a button in flash mx, which should load a php-page on(release).
So far, so god. Realising the link is quite easy using getURL. But the problem is, that I need to add a variable to the link as a GET-parameter. Adding this paramter is very easy. What makes me going nuts is, that the value of this paramter should be a flash variable.
Well, I hope you get what I am talking about…
Some background-information: The site I am working on at the moment is some kind of poem collection. The poem is loaded from a database according to the id given in a GET-parameter.
Now I have two little handy buttons which should let you navigate through these poems as you would read them within a book: one “previous poem”- and one “next poem”-button.
The calculation, which poem is the previous or the next one is done in php. Each button receives its variable by a paramter added to the URL of the swf-file.
This works fine. I can use the variable and show it in a dynamic textfield. This shows, that the variable makes its way into the flash-file, but how can I add it to the URL in getURL?
Let’s say this variable is called “var_1” and its value is “5”. If I try it like this:
on(release)
{
getURL("page.php?my_var=var_1", "", "GET");
}
the page is loaded, but the GET-paramter is “.php?my_var=var_1” instead of “.php?my_var=5” as I want it to be?
What am I doing wrong?
Many thanks for your help in advance!
LapisInfernalis