Pull Variable From ASP Page...
I have an ASP page that pulls info from a database. On this page I have created a Flash video player. When the page loads, I want to pass an ID variable from the ASP page to the Flash video player so it loads a specific .flv movie.
Example:
ASP page has a variable called classID. classID is equal to a number. When page loads this number gets passed into the Flash video player. The Flash video player then loads the video that has the same name as the classID number.
Make sense? I'm using CS3 with AS2.
Any help would be appreciated.
FlashKit > Flash Help > Flash ActionScript
Posted on: 12-14-2007, 04:00 PM
View Complete Forum Thread with Replies
Sponsored Links:
Pull Variable In Flash SWF From HTML Page
Here's what I want to do... HTML pages home.htm, about.htm, contact.htm all have the same Flash SWF in the page for nav buttons. Each page loads with target _self, and I want to have the flash movie load on each page at a different frame number BUT I want to use the same SWF.
For Example:
home.htm starts on frame 1 and stops at frame3, when you click the About link, it loads about.htm and sets the goandplay on frame 4. Then with the contact.htm page, it loads and starts on frame 7.
I'm guessing I need a some variable in the HTML code of each .htm file to tell it were the target is to start at whatever frame I decided.
Can this be done.. and if so, where would I start?!?!
thanks,
Basher
View Replies !
View Related
Pull Variable In Flash SWF From HTML Page
Here's what I want to do... HTML pages home.htm, about.htm, contact.htm all have the same Flash SWF in the page for nav buttons. Each page loads with target _self, and I want to have the flash movie load on each page at a different frame number BUT I want to use the same SWF.
For Example:
home.htm starts on frame 1 and stops at frame3, when you click the About link, it loads about.htm and sets the goandplay on frame 4. Then with the contact.htm page, it loads and starts on frame 7.
I'm guessing I need a some variable in the HTML code of each .htm file to tell it were the target is to start at whatever frame I decided.
Can this be done.. and if so, where would I start?!?!
thanks,
Bash3r
View Replies !
View Related
Pull Variable In Flash SWF From HTML Page
Here's what I want to do... HTML pages home.htm, about.htm, contact.htm all have the same Flash SWF in the page for nav buttons. Each page loads with target _self, and I want to have the flash movie load on each page at a different frame number BUT I want to use the same SWF.
For Example:
home.htm starts on frame 1 and stops at frame3, when you click the About link, it loads about.htm and sets the goandplay on frame 4. Then with the contact.htm page, it loads and starts on frame 7.
I'm guessing I need a some variable in the HTML code of each .htm file to tell it were the target is to start at whatever frame I decided.
Can this be done.. and if so, where would I start?!?!
thanks,
Basher
View Replies !
View Related
Pull PHP Variable Into Flash?
Hello everyone.
I have a page, locations.php, that pulls info from a MySQL DB. On that page I set $country equal to the 2 digit country abbreviation we have setup. What I want is for flash to be able to pull that $country variable and decide that when $country = "CA" gotoAndStop(2)
Essentially if the $country equals CA it is to play frame 2, otherwise it is to stay at frame 1. How can I do this?
View Replies !
View Related
How Can I Pull A Variable Value From A Movie Symbol?
I am using some checkboxes in my movie. The checkboxes are a seprate movie I imported as a symbol. When the user selects a checkbox, it sets a variable to reflect the selection. I want to use that variable in the same frame the checkbox symbol resides but I can't pass it.
It is not set as a local variable either. I am a total newbie when it comes to using variables in flash.
View Replies !
View Related
Can I Pull The Current URL And Pass As Variable To Swf?
I am making a navigation menu for the basic top menu of a php driven website....
I can hard link all the buttons to certain pages, but then the animated menu resets while its included in a header.php file...
What is the best way to accomplish a seemingly seamless transition from one php page to the next without having to have the animation start over?
right now, I am using URL variables, but it makes the url so ugly....
something like, current.php?whereToStart=current
and the highlighter swf nave menu file has a variable named whereToStart so the current in the above example tells it to load with 'current' the selected state....
does that make sense?
I guess I could have 7 frames in my movie with code on each frame to bring the selector to that position, but I am still passing a url variable for the frame number then...
is there a way to pass variables from one swf, into another pages swf, without using url variables>??
also, could I load my page, have the swf actually read the current URL in the go line, the parse through it and pull from it the string necessary to communicate where to go?
I was thinking something like...
http://myurl.com/current.php
i could somehow tell it...
currentURL - minus the first X characters = current.php
then take that current.php and parse it down to a variable that is usable in my swf???
does any of this make sense????
View Replies !
View Related
Pull URL/variable Into Flash From HTML Params
Hello,
I havent used Flash in a long time, and am sort of getting back into it...I need a bit of help on a situation. Hopefully this makes sense...
I've got a Flash movie that has variables setup for diff sections/pieces. Those variables are being populated/pulled from the Flash params in the HTML page..example below:
<param name="movie" value="Intro.swf?companyname=My Company...">
It works great with all of the variables I have setup, but now I have a button/link in the Flash movie that I want to do the same thing too...ie asign a variable where the URL would normally go in a static Flash movie....example below:
on (release) {
getURL("http://www.google.com/", "_self");
}
So, what I want to do, is instead of having the GOOGLE URL there, I want to be able to put maybe a variable there, and pull that from the params, like all the other ones I have setup in the HTML...
Is this possible, and what would the sytax be? Any help or examples would be hugely appreciated...
Thanks...
Note..I'm using Flash 8
View Replies !
View Related
[MX04] Merging Strings Into A Variable To Pull Out An Array Value
Ok, so here's the deal.....
I have two dropdown lists who's values when merged them represent an array name.
For example... I make a selection from a dropdown list 1 who's value is "SomeArray", and from the dropdown list 2 i select an item with value "No1"
So now i want to merge those two and add a number from which place in array to take a number to display it in a text field...
Something like a variable called SomeArrayNo1[0] so afterthat I can put it into a text filed....
I know my English sucks, but please help me....
The code below puts a word "SomeArrayNo1[0]" into teh text field instead of pulling the number from array.
Code:
SomeArrayNo1 = new Array("10", "20", "30", "40");
var Droplist1 = new String ("SomeArray")
var Droplist2 = new String ("No1")
var ArrayPosition = new String ("[0]")
TraceNumberFromArray = Droplist1+Droplist2+ArrayPosition
trace(TraceNumberFromArray);
_root.textfield.text = [TraceNumberFromArray]
View Replies !
View Related
Sending Variable To Php Page - Login Page
I'm trying to login to a password protected php page through a form in flash.
When the user provides correct information the flashmovie opens a php-page, but how do I protect the php page from unautorized accesses?
Can I send a variable containing the user/pass given?
I know I could tell flash to "getURL www.address.com/admin.php?user=user&pass=12345", but then everyone who checks history can access the page without even having to access the flash page...
Anyone getting what I mean?
Thanks!!
Regards,
Michael
View Replies !
View Related
How To Get The Page Name As A Variable
I've got a bit o php script in one of my template files that theoretically will give me the first 2 paths and filename of the current page in a string that flash can read as variables. This is to tell flash what movie clip to load.
Here's the script:
<?
$pagename=$PHP_SELF;
$pagearray=explode("/","$pagename");
print "path1=$pagearray[1]";
print "&path2=$pagearray[2]";
print "&pagename=$pagearray[3]";
?>
My question is in flash, where I call the loadVariables command, how do I reference the current page? Since the script is in a template file, it's included in all pages of the site and I need to reference the current page it's place in.
OR can flash detect what file/path it's currently placed in without relying on external scripting?
Thanks!
View Replies !
View Related
Variable To Next Page
I want to send the content of "searWords" an input text box (in this case "example")to the next html page
on (release, keyPress "<Enter>") {
getURL("result.html", "_self", "GET");
}
From "test movie" it gives the following result to explorer:
result.htm?searWords=example
Integrated in a html file it gives no variables though...
What am i doing wrong?!
View Replies !
View Related
Getting A Variable From A Php Page?
I'm completely new to php and loadVars and all these things, so I don't know what information about these things is relevant...
Here's what I need help with:
I have created a video player interface which loads external flv's. Now I'd like to integrate this into a live site, a site that I have not built myself.
There will be a list of clips on the page, the list is taken from a mySql database and displayed with info, a thumbnail and a link. When you click the link, a popup window is supposed to be launched and in it the video clip will be played inside my player.
I will need to get the filename into flash somehow... This is my problem.
I hope someone knows what I'm trying to explain...
View Replies !
View Related
Passing Variable To Asp Page
can someone recommend a script and .asp page that will pass a variable from flash into an html popup. I am assuming the popup would have to be an asp page, I just need to pass one simple variable to the page and display it.
hopefully this is veyr easy.
Thanks
View Replies !
View Related
Flash Variable To ASP Page.
Hi, submitting a variable to an ASP page. 3 variables in total, one is the result of a couple of Date() variables, the other is a numeric variable from an array. These work fine. The last one is giving me problems. I switched hardcoded values in order to narrow it down to this variable. It's the result of an array loop. I read through the array values and stick in a delimeter "|" so I can seperate the variable later. I am using LoadVariables and POST, and I am using the FORM collection to retrieve and place the values in the database. when I use a test HTML form and input the same values for this variable then submit.. it works great. Should I be doing something to this variable before it get's sent... maybe a URLencode server side ot some other Actionscript string function. My ASP page does process but when I list the database values I see that no value has made it.. though the other two do. Here is an example of what the final variable in flash looks like prior to sending:
3|2|1|4|3|2|5|4|1|2|4|3|This is the question variable q1 and this is a default value for testing purposes|This is the question variable q2 and this is a default value for testing purposes|This is the question variable q3 and this is a default value for testing purposes|This is the question variable q4 and this is a default value for testing purposes|This is the question variable q5 and this is a default value for testing purposes|This is the question variable q6 and this is a default value for testing purposes|
And this is the code that makes the string:
Code:
var newAnswerString = "";
for (k = 1; k<= totalQuestions; k = k + 1) {
newAnswerString = newAnswerString add answerArray[k];
if (k<= totalQuestions) {
newAnswerString = newAnswerString add "|";
}
}
Thanks in advance.
View Replies !
View Related
Variable Page Load
ok, i'm making a flash website. On the site, i have about 5 pages, and one of them is the main page with 5 buttons.
what i am trying to do is when someone clicks on a button on the main page to go to another page, i want the movie to go to a part of the timeline where the main page rolls off screen, then when the "roll off" animation has finished, using actionscript and variables, i want it to go to the scene that the person selected.
anyone know how to do this??
View Replies !
View Related
Is This Possible? Variable Between Two .swf Movies On Same Page
Is this possible?
Hi there, I’m currently designing a base website that is formatted in html and has two flash movies on the main page. My question is, is there any way to live, pass a variable between the two flash movies.
I am trying to develop a page that has an image that crosses over 2 different flash .swf files. In order to do this I need a way to let the second movie know where the _x + _y. position of a movie clip in the first .swf, this information must be attained in real time. I just wanted to know from you experts, if this is possible, and the best method for getting started in the development.
Thanks and have a nice day,
-jason
www.eyechor.com
View Replies !
View Related
Send Variable To Xml (which Is Actually A Php Page) Possible?
I have an xml file that is dynamic. Depending on the variable sent to it, it will have different content. So how do I do this? When I used the following it doesn't work:
gamedata.load("gamedata.php?id=1");
I take off the 'id' variable and it works. Ugh. Please advise.
The header of my php file is like so:
Code:
<?
header('Content-type: text/xml');
echo "<?xml version="1.0" encoding="ISO-8859-1" ?>"; ?>
<gameshow>
<data dtype="PROJECT_SETTINGS">
<project_type>1</project_type>
<title>Whatever...
View Replies !
View Related
How Do You Get A Variable Into An Aspx Page?
Hi there, I’m trying to send a variable via Flash 8 (published as version 7) to an aspx page. I have no knowledge or control of the database side of things I’m just trying to send the content of a variable out of Flash. All I know is when I use the following code (see below) the database isn’t receiving anything. Is this the correct code? I did a ‘trace’ and you can see what the variable ‘com’ is holding.
Because I don’t have access to the database I was hoping I could experiment by writing to a local txt file (I’m using a txt to experiment with bringing ‘in’ variables using: var1=a& var2=b& var3=c…etc) but it doesn’t look like you can write to a local txt file (and I’m not sure the code would be the same anyway).
If anyone can help me with this you’d be returning part of my life back to me, and I could stop drinking all this coffee.
Cheers.
The code
loadVariables("mypage.aspx", com, "POST");
//trace (com);
//result from the trace: Slept in From Thu Oct 7 00:00:00 GMT+0100 2006 To Fri Oct 10 00:00:00 GMT+0100 2006
View Replies !
View Related
Post Variable To Php Page
hi guys,
all i want to do is post this variable ..
ActionScript Code:
songId = tracks_array[list_comp.selectedIndex].id;
to this php page
PHP Code:
<?php// connect to database$dbcnx = @mysql_connect("mysql.cs.cse.dmu.ac.uk:3306","p03293858","Swung=59");$dbselect = @mysql_select_db("p03293858db");if ((!$dbcnx) || (!$dbselect)) { echo "Can't connect to database"; }// get variables$id = $_POST["songId"];// query$query = "SELECT * FROM songs WHERE id=$id";$result = mysql_query($query) or die(mysql_error());// increment countwhile($song = mysql_fetch_assoc($result)) { $count = $song['count'];}$count = $count + 1;// update count$update = "UPDATE songs SET count=$count WHERE id=$id";mysql_query($update) or die(mysql_error());// close connection to databasemysql_close($dbcnx);?>
.. each times the user clicks a song in the list
is this possible???
here is my list component...
ActionScript Code:
//create a listener for the list component
var compListener:Object = new Object();
list_comp.addEventListener("change", compListener);
compListener.change = function(info:Object):Void
{
if(playPause._currentframe = 20)
{
playTrack(info.target.value,tracks_array
[list_comp.selectedIndex].artist,tracks_array
[list_comp.selectedIndex].album,tracks_array
[list_comp.selectedIndex].track,tracks_array
[list_comp.selectedIndex].id,tracks_array
[list_comp.selectedIndex].count,tracks_array
[list_comp.selectedIndex].image, true);
var songId = new LoadVars(); // main variables go in this object
var errorVars = new LoadVars(); // error variables go in this object
// populate object
songId = tracks_array[list_comp.selectedIndex].id;
// send songId to count.php
songId.sendAndLoad("http://php.cs.cse.dmu.ac.uk:6789/p03293858/cw/mp3v2/count.php", errorVars, "POST");
// play the song
s.start(pos=0);
playPause.gotoAndStop("pause");
}
else
{
playTrack(info.target.value,tracks_array
[list_comp.selectedIndex].artist,tracks_array
[list_comp.selectedIndex].album,tracks_array
[list_comp.selectedIndex].track,tracks_array
[list_comp.selectedIndex].id,tracks_array
[list_comp.selectedIndex].count,tracks_array
[list_comp.selectedIndex].image, true);
playPause.gotoAndStop("pause");
}
}
can anyone see what im doing wrong??!
please help
thanx
View Replies !
View Related
Sending One Variable To An ASP Page
Hello
I've searched without my luck, everything seems far too complex for what I want to do.
Which is send a variable called "LapTime" to an ASP page called game_final.asp.
Do i use getURL or Loadvariables, should I use GET or POST, Is Send (or Send and Post) an option?
Also the file has to goto the URL as well after sending the data
Thanks in advance.
View Replies !
View Related
Loading Page In A FRAME Using A Variable... - Pls Help
Hey ppl - Happy new year!
Got a question in regards to loading a page within a variable -
It has to do with buttons, and "sub buttons"
If all of the buttons are variables, how do I direct the button to open a new frame within the html page.
Heres the page Im workin on - I could just not make all the buttons variables..but then what would I be learning???
If you can help pls do - thanks-
Oh yeah - and this page is just the menu system, I am going to switch it all up and create the page as I explained previously.
Thanks a lot
http://www.webinduced.com/spirale.htm
View Replies !
View Related
Passing A Variable To A ColdFusion Page
I am working on a Flash test. Upon completing each section of the test, I want to pass a variable called Session.Training.OpenDoor, Session.Training.Grooming, etc. each with a value of 1 to a ColdFusion program page that is collecting that value and returning the information showing that that section of the test has been successfully completed. The ColdFusion programming is set in the .cfm pages but I am unable to figure out how to pass the variable and its value TO the ColdFusion page.
Any help would be GREATLY appreciated.
View Replies !
View Related
Retrieving A Variable From An Html Page
Here's my scenario:
Two flash movies load into a page, a mouse event in the first movie uses getURL("javascript: funciton()") to set a variable in the parent html page. The second flash is using an onClipEvent(enterFrame) to constantly check for a change in this variables value before it runs certain timelines. The trick is, how do I get that variable back into the flash?
I've tried using the loadVariables to bring in the parent html page, but, of course, all I get is a big jumbled mess of javascript and html. Is there a smart way to grab a unique variable from this page? My only idea is bringing in all of this jumbled info and then parsing out the exact string using indexOf, but this seems quite messy. Any other ideas? Thanks in advance.
Quasi
View Replies !
View Related
Read A Variable From An HTML Page
I am wondering if it is possible to set a variable using Javascript in an HTML page and then reading that variable with my flash movie.
ex. I set a variable called page="about" using Javascript. This is done in the HTML page. In my flash movie I want to read that variable (if page=="about" then do something).
Any help is appreciated
View Replies !
View Related
Passing A Variable To A New Html Page
I'm trying to pass a variable to a new html page opened by clicking on a button
I COULD use getURL to open the new page, but I want to be able to define the new window's properties (dimensions, which toolbars show up, etc), so I prolly need to use javascript for that.
I found this code from another post in here, for doing just that:
function platformCheck(){
if (navigator.platform == "Win32"){
window.open('mypage. htm','pagename','toolbar=yes,scrollbars=no,status=
yes,width=800,height=600')
} else {
window.open('mypage. htm','pagename','toolbar=yes,scrollbars=no,status=
yes,width=785,height=587')
}
but I'd still like to pass a variable. Does anyone know how to do that? I'm thinking this is prolly just a syntax question, cause it seems like it wouldn't be that hard to do
thanks
View Replies !
View Related
Pass A Page Variable To Flash?
Hi guys
Does anyone have a simply explanation on how I can pass a page variable from my asp page to a flash mx movie within the same page.
Basically I have a swf audio player code below
My Play Button
on (release) {
stopAllSounds();
}
on (release) {
loadMovie("/members-audio-file.swf", "tg");
}
and I want to pass my asp page variable “audio-file-name e.g. jhon-smith.swf” to
loadMovie("/jhon-smith.swf", "tg");
Hope this all makes some sense.
View Replies !
View Related
Sending Variable Back To ASP Page - Plz Help
I'm not really an ASP guy, which makes this one difficult for me. I am trying to get flash to Send variables back to the same ASP page in wich it's embedded into. After they are sent into the ASP page flash calls a javascript which is in the page. This javascript will refresh/reload the page so the variables will need to remain in the page.
This is the main code in the ASP page:
----------------------------------------------------------------------------
<script language="javascript">
function MoviePlayed(){
//document.location.href = next_url; // go to the next page
document.forms[0].Continue.disabled=false;
}
</script>
<BODY bgcolor="#FFFFFF" marginwidth="0" marginheight="0" border="0" topmargin="0" leftmargin="0">
<FORM method="post" NAME="MAIN" id="MAIN" ACTION="Survey1735.ASP">
<%
response.write "a" & request.form("q2a_1") & "a"
strtmp="?p2a1=1&p2a2=0&p2a3=0&p2a4=1&p2a5=1&p2a6=0 &p2a7=0&p2a8=0&p2a9=0&p2a10=1&p2a11=0&p2a12=0"
%>
<CENTER>
<OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=700 HEIGHT=425> <PARAM NAME=movie VALUE="2a.swf<%=strtmp%>">
<PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#FFFFFF>
<EMBED src="2a.swf<%=strtmp%>" quality=high bgcolor=#669966 WIDTH=100% HEIGHT=100% TYPE="application/x-shockwave-flash"></EMBED>
</OBJECT>
</CENTER>
<input type="submit" name="Continue" id="Continue" value="Continue" disabled="true">
</Form>
</BODY>
----------------------------------------------------------------------------
THEN
IN FLASH I have this action on the root timeline, which updates some values then should send it to the page.
----------------------------------------------------------------------------
_root.q2a_1=Math.ceil(_root.p1Pos);
_root.q2a_2=Math.ceil(_root.p2Pos);
_root.q2a_3=Math.ceil(_root.p3Pos);
_root.q2a_4=Math.ceil(_root.p4Pos);
_root.q2a_5=Math.ceil(_root.p5Pos);
_root.q2a_6=Math.ceil(_root.p6Pos);
_root.q2a_7=Math.ceil(_root.p7Pos);
_root.q2a_8=Math.ceil(_root.p8Pos);
_root.q2a_9=Math.ceil(_root.p9Pos);
_root.q2a_10=Math.ceil(_root.p10Pos);
_root.q2a_11=Math.ceil(_root.p11Pos);
loadVariables("Survey1735.asp","_self","POST");
_root.gotoAndStop("complete");
----------------------------------------------------------------------------
When flash goes to the frame "complete" it calls a javascript that refreshes the page. When the page refreshes I am trying to write the variable values out to see they came through.
getURL("javascript:MoviePlayed()");
End the end the variables need to be in the ASP page and the javascript function needs to have ran to enable the continue button.
LIVE LINK: http://www.dfwaudiovideo.com/Survey1735.asp
ANY HELP IS GREATLY APPRECIATED!!!!!! PLEASE!
Thank You!
-Kirk II
View Replies !
View Related
Tring To Get A Variable From .aspx Page
I am trying to call an aspx page, have it hit the database, and return a string of text to my actionscript. here is my actionscript code:
//Make calls to database to get a text example
var urlRequest:URLRequest = new URLRequest("ASP/getGameText.aspx");
var urlLoader:URLLoader = new URLLoader();
urlLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
urlLoader.addEventListener(Event.COMPLETE, urlLoader_complete);
urlLoader.load(urlRequest);
function urlLoader_complete(evt:Event):void
{
gameText = urlLoader.data.theText;
}
It crashed on the line 'gameText = urlLoader.data.theText;' with the error of 'Error #1010: A term is undefined and has no properties.' so i guess urlLoader.data.theText is coming back null. Here is my .aspx page code:
<%
String ConnStr = "Driver={MySQL ODBC 5.1 Driver};Server=localhost;Port=3306;Database=typing game;User=root; Password=******;Option=3;";
OdbcConnection con = new OdbcConnection(ConnStr);
OdbcCommand cmd = new OdbcCommand("SELECT * FROM gameText", con);
DataTable dt = new DataTable();
OdbcDataAdapter da = new OdbcDataAdapter();
da.SelectCommand = cmd;
con.Open();
da.Fill(dt);
con.Close();
string str;
str = dt.Rows[1][1].ToString();
Response.Write("&theText="+str);
%>
When I run the .aspx page separately, it returns what I want it to: '&theText=This is my test text'. I think I may be missing the big picture here somewhere. Thanks for your help in this!
View Replies !
View Related
Send Variable To New Html Page -- Then Using It WITHOUT PHP
hi again,
I've been reading tutorials on ways to pass variables to a new window. On the kirupa site, there's a trick to send it without php... sort of.
Basically it's using the GET method in getURL, so the code looks like this:
------code---------
PHP Code:
someVar=1111;
getURL("newpage.swf","_blank", "GET");
--------------------
and so the address bar of newpage looks like:
.../blah/newpage.swf?someVar=1111
my question is, how can i get that variable and use it in newpage.swf ? all i need is the number; is there even some way for newpage to get its own address and use a substring to get the number?
Thanks,
chi
View Replies !
View Related
Capturing A Page's URL As A Variable In Flash
I have a dynamically launched jsp page that has an swf. Now depending on what the session id is for that page, I want my swf to display different info.
For instance, if my url is this:
"http://mydomain.com/content/my-portfolio/secure/showcase.jsp?id=5"
Note the "id=5" at the end? I want to be able to capture that as a variable.
Now I've tried this._url, that will only give me the path of the swf itself, which isn't what I want.
I also tried:
var host:LocalConnection = new LocalConnection();
trace(host.domain());
Which only gives me the superdomain, not the full url.
Is there a way to do this within Flash? Or would I be better off reading the session id from the jsp page, using the loadVar method or something?
Any help is always appreciated.
Thanks
Chris
View Replies !
View Related
Variable From Html Page Or Javascript?
Okay, I have a sliding, drop down menu sidebar thingy. The user clicks a button and my slick little eye candy flash movie has a secondary navigation list slide down while any buttons underneath slide down as well. Then when you click on another button it slides back up and the new button's secondary nav slides down. nuff said.
what I would like to have happen is that when a user clicks on a secondary nav button and a new html page loads, I would like it to appear that the secondary nav slider has stayed down on the newly loaded html page.
this means passing some kind of variable to my flash movie so that it can tell which page the user is on and react (go to a particular frame)
what's the easiest/best way to accomplish this? thanks in advance
View Replies !
View Related
Passing Variable To ASP Page Using LoadVariables
Okay guys, here's another one about passing data to an asp page. I'm trying to pass a variable through a string to an asp page. I cannot understand why this is not working. Here is my code:
this.btn1.onRelease = function (){loadVariables("http://www.mywebsite.com/paragonstats/flashprogress.asp?pagename=introduction","POST");
}
If I paste my url in a browser, it triggers the asp page as it should. But this code is not working from flash. If I use getURL, it works, but it opens another browser window or redirects my movie. I'm just trying to track click through statistics. I've even set up a movie with just one button on the root with this code and it won't work. Can anyone please help, I'm baffled. Thanks!
Justin
View Replies !
View Related
How Do You Load A PHP Variable From The Page Your Movie Is On?
I have a question about PHP variable... say I am loading my flash movie on a php page that has a variable called "myId" in the url of the page (http://www.mysite.com/mypage.php?myId=123).
How can I load that variable (myId) into my flash movie, send it to a php page (http://www.mysite.com/dynamicpage.php?myId=123), and then take the response and populate my movie?
Actually, I just need to know how to send it to a php page. I got the rest I think. Thanks!
View Replies !
View Related
Post Variable To Php Page From Flash
I am trying to set up a form in a flash movie that will post the users entry to a php page. I then need the php page to re-direct the user to a page to show a result.
I have the following AS in the flash form. It seems to post to the php page but from within the flash movie. Rather than taking them to the php page, as a non-flash form post would.
on (release) {
loadVariablesNum("search.php", 0, "POST");
}
Is there a way I can get the flash form to post to the php page in the same way a non-flash form would post.
Hope this makes sense! Basically, when the user clicks the submit button, I need the browser to load another php page that gets the user's input via post.
View Replies !
View Related
Variable From Html Page Or Javascript?
Okay, I have a sliding, drop down menu sidebar thingy. The user clicks a button and my slick little eye candy flash movie has a secondary navigation list slide down while any buttons underneath slide down as well. Then when you click on another button it slides back up and the new button's secondary nav slides down. nuff said.
what I would like to have happen is that when a user clicks on a secondary nav button and a new html page loads, I would like it to appear that the secondary nav slider has stayed down on the newly loaded html page.
this means passing some kind of variable to my flash movie so that it can tell which page the user is on and react (go to a particular frame)
what's the easiest/best way to accomplish this? thanks in advance
View Replies !
View Related
Flash Load Asp Page With Variable
Hey, i have a ASP website and a flash on it.
on a page, i have a button that links me to this page "pacientes.asp?id=<%=session("adm")%>", so, it returns me the page "pacientes.asp?id=#"...
however, i want to control this link through flash!!
how can i make flash get the "adm" variable and attach to the end of the url?
i've searched the forum and found something that may be similar to what i want... i dunno. =P
http://forums.devshed.com/t155316/s.html
View Replies !
View Related
Passing A Variable To Other Movie In A New Page.
Hi!
I have a flash intro with a menu at my home page. At the internal pages a new flash menu needs to load at diferent frames to play a small animation and mark the current page (clicked at home menu)
How can i send a variable from my home page movie to the menu at the inside pages. This menu is placed at a frame.
Best Regards!
View Replies !
View Related
Can I Get A JavaScript Variable In A Flash Movie On The Same Page?
Hi All,
I created a simple flash movie that loads a .TXT file and shows the text from the file.
loadVarDoc = "assets/swf/past.txt";
loadVarsText = new loadVars();
loadVarsText.load(loadVarDoc);
loadVarsText.onLoad = function(success) {
if (success) {
scroller.text = this.var1;
} else {
scroller.text = "Data Not Found...";
}
};
I want this to be a generic movie for all the pages on my site so all I need to do (I think) is change the value of LoadVarDoc. So for each page, this value points to the right .TXT file for each page.
I was thinking of including a JavaScript variable on each HTML page that has the value for the right TXT file. The FlashMovie would somehow readout this value (or gets it pushed??) and shows the right text.
Is this possible?
I allready tried the 'SetVariable' option but I guess this only works for variables set for objects, NOT actionscript variables. Is this correct.
Help is much appriciated
View Replies !
View Related
Display Variable From Flash In ASP Page Not Working
I've search high and low for a simple answer and am now at my wits end.
I just want to take a single variable from a flash file, and using getURL, send it to an asp file to display the results.
I have tried attaching the string in the URL:
getURL("webpage.asp?var=anything", "_blank)
This resulting URL seems to ignore everything from the "?" and on.
I have tried just using the web page link w/ both GET and POST methods and using request("var") and request.querystring("var"):
getURL("webpage.asp","_blank", "POST")
The result w/ POST is the web page comes up but launches the web page as if it were a text file, and GET doesn't even launch the web page at all.
Using loadVars or any of its counterparts does not seem to do anything at all...does not launch a web page w/ the results.
It's soooo simple to send a single variable from asp to Flash using the querystring ... why is it not the same going from Flash to asp??????
Please help!
View Replies !
View Related
Seems Like It Is Not Recognizing The Variable Passed From The Html Page
I have a movie that is a background to this website. Here is the html:
HTML Code:
<div id="flashcontent">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="100%">
<param name="movie" value="Images/SWFs/WholeBG.swf?grass=true">
<param name=quality value=high>
<param name="wMode" value="transparent">
<embed src="Images/SWFs/WholeBG.swf?grass=true" width="100%" height="100%" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="transparent"></embed>
</object>
</div>
You can see the variable is appended to the param and embed tags: "?grass=true"
Below is the actionscript to the background movie that will call the loadGrass function if grass is equal to true (near end of script). But for somereason grass is never true because it never loads. I know the loadGrass function works without the if statement. Do you think it is not recieving the grass variable? What else could be happening?
ActionScript Code:
Stage.align = "bl";
Stage.scaleMode = "noScale";
Stage.showMenu = false;
// This function gets a random number and is called by various functions
function getNum()
{
var i:Number = Math.random();
return i;
}
// Water Background Loader
function loadWater()
{
_root.attachMovie("waterBG_mc", "waterBG_mc1", this.getNextHighestDepth());
var water_x:Number = 1 + (Math.ceil(System.capabilities.screenResolutionX / waterBG_mc1._width));
for (var i = 2; i <= water_x; i++)
{
var id:String = "waterBG_mc" + i;
_root.attachMovie("waterBG_mc", id, this.getNextHighestDepth());
_root[id]._x = _root.waterBG_mc1._width * (i - 1);
}
}
// Grass Loader
function loadGrass()
{
_root.attachMovie("grassBG_mc", "grassBG_mc1", this.getNextHighestDepth());
var grass_y:Number = _root._height - _root.grassBG_mc1._height;
_root.grassBG_mc1._y = grass_y;
var grass_x:Number = 1 + (Math.ceil(System.capabilities.screenResolutionX / _root.grassBG_mc1._width));
for (var i = 2; i <= grass_x; i++)
{
var id:String = "grassBG_mc" + i;
_root.attachMovie("grassBG_mc", id, this.getNextHighestDepth());
_root[id]._x = _root.grassBG_mc1._width * (i - 1);
_root[id]._y = grass_y;
}
}
//bubbles
function bubbleAttack()
{
var rand_x:Number = Math.ceil(_root._width * Math.random());
var rand_y:Number = Math.ceil(_root._height * Math.random());
var rand_num1:Number = Math.round(getNum());
var rand_num2:Number = Math.round(getNum());
var rand_num3:Number = Math.round(getNum());
var rand_id:Number = rand_num1 + rand_num2 + rand_num3;
var id:String = "bubbleMC_" + rand_id;
_root.attachMovie(id, id + rand_x, this.getNextHighestDepth());
_root[id + rand_x]._x = rand_x;
_root[id + rand_x]._y = rand_y;
var rand_scale:Number = Math.round(200 * getNum());
_root[id + rand_x]._xscale = rand_scale;
_root[id + rand_x]._yscale = rand_scale;
updateAfterEvent();
}
// For some reason calling function bubble attack with setInterval causes errors,
// so Instead I call function go with setInterval to call bubbleAttack
function go()
{
bubbleAttack();
}
// Manatee Loader
function loadManatee()
{
_root.attachMovie("manateeMC", "manateeMC1", this.getNextHighestDepth());
//var manatee_x:Number = System.capabilities.screenResolutionX - (1.5 * manateeMC1._width);
//var manatee_y:Number = System.capabilities.screenResolutionY - (1.25 * manateeMC1._height);
var manatee_x:Number = 500;
var manatee_y:Number = _root._height - _root.manateeMC1._height;
_root.manateeMC1._x = manatee_x;
_root.manateeMC1._y = manatee_y;
}
//call of functions
loadWater();
if(grass == true){
loadManatee();
loadGrass();
}
setInterval(go, 50);
View Replies !
View Related
|