ActionScript 2.0 :: CS3 Variables Between Two Swf Files On Same Page?
Mar 14, 2009
Lemme explain, I got 2 SWFs loading of the same page.On SWF2 I'm trying to receive a var from SWF1, and I'm trying to make it only by flash/as without any javascript help nor LocalConnection(will explain later on why it doesn't fit).A sample of what I've made so far can be found here:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
[code].....
View 10 Replies
Similar Posts:
Dec 8, 2010
How to pass variables from one page to another page in ActionScript? I got some solution that this can be done using CustomEvents in ActionScript, but i couldn't found understandable and easy solution. explain how to pass variables with a small example?
View 3 Replies
Aug 15, 2011
Is there a way to get the names of variables from a flash game? I have been playing with my players health with the code;
javascript:document.embeds[0].SetVariable("_root.player.intHP", 0)
I am looking for a way to find out the rest of the variables, like damage and such.
View 1 Replies
Jun 29, 2006
I'm making a flash form and I just want to send some variables to a php page but not show a new window or anything. And the variable is huge so I want to use the post method. It's also posted from a component therefore movieclip.loadVariables doesn't work?
View 3 Replies
Dec 3, 2007
I want to load variables from asp.net page
View 1 Replies
Jan 28, 2009
I'm working on my first flash ASP project and have a question about passing variables from flash to an asp page. Can I write a call to an asp page with variables in the url?
Code:
saveEntry_lv.sendAndLoad("save_student.asp?student_id="+userID+"&login_name="+loginName+"&password=&user_name="+friendlyName, saveEntry_lv, "POST");
It's not working and I don't know if it's because I've got something big wrong here or if the syntax is bad.
View 2 Replies
Aug 19, 2009
I am making a site that is in Hebrew and English. It contains two .swf files. The 1st .swf file allows the user to choose whether he wants the site in Hebrew or English. When he goes to the 2nd .swf file via a link I would like the 2nd .swf file to already know what language the user chose. How would I do this? using getURL and variables?
View 2 Replies
Sep 9, 2009
I am loading images into a movie clip dynamically from an XML file. Based on what image the user clicks, I would like to be able to open a separate window, displaying a different image. Ideally, I'd pass the variable of which image was selected to the new open window.I've done some research online, and am thinking I'm making this harder than it needs to be.
Actionscript from main movie
Code:
chosenImage.onPress = function() {[code]......
I've also seen where I could possibly pass a variable through ASP.NET, but am experiencing the same errors when trying to pass the variable. I suppose I could embed the popup.swf file in a new .aspx page, that would probably be acceptable.
View 1 Replies
May 21, 2009
I have a flash file that I made that displays a scrolling newsfeed (I'll call it newsfeed.swf)... I published it to an SWF. Now, I created a new flash file that I would like to use to show many instances of newsfeed.swf. In my new flash file, I have the following code:
this.onLoad=function(){
mcNewsfeed.loadMovie(http://www.whatever.com/newsfeed.swf?s=MSFT);
}
In theory, when newsfeed.swf starts up, the ?s=MSFT variable should be passed in at the _root level such that I should be able to reference it and build the newsfeed to be displayed dynamically. I've tried several different things, but no matter what I do, the following code (the _root.s part) in newsfeed.swf returns "undefined":
newsfeedURL = "http://finance.yahoo.com/rss/headline?s=" + _root.s
I would prefer to not have to pass XML files between the swf files or use system objects as that would add a level of complexity I'm not ready to deal with (I'm a total noob at this stuff)...
View 2 Replies
Jan 4, 2012
i am trying to access the aspx variable.But i can't to do this.am using flash professional cs5.
import flash.net.URLRequest;
import flash.net.URLVariables;
import flash.net.URLRequestMethod;[code]....
View 2 Replies
Jan 5, 2009
I am having trouble with what would seem to be a simple thing...I need to pass a variable generated by the user from a swf/html page to another swf/html page. I am encoding the variable in the URL....?bagVar=How do I get whatever the content of this variable is imported to the other swf/html page? None of the documentation I've found seems to answer this (maybe I am looking in the wrong places).
View 1 Replies
Jan 19, 2010
I need to open a new page from Flash, using navigateToURL(...)
I need to send a variable to this newly opened html page that does not appear within the url as a query string, so i'm using POST.
However each time I try it the variables appear within the query string... what am I doing wrong?
ActionScript Code:
var link:String = "test.html";
var urlVars:URLVariables = new URLVariables();
urlVars.username = "username";
var urlRequest:URLRequest = new URLRequest(link);
urlRequest.data = urlVars;
urlRequest.method = URLRequestMethod.POST;
urlRequest.contentType = "application/x-www-form-urlencoded";
navigateToURL(urlRequest, "_blank");
Cheers,
Matt / MSFX
View 2 Replies
Oct 12, 2005
How to load variables from html page in swf? I need load some variables in swf from html page.
View 5 Replies
Jun 19, 2009
I am trying to re-use a page layout multiple times in one site, but importing different parts of an external text file for each use. The site has various different page layout designs, which can easily be swapped around and still display the correct content. I'm using this code to import the text:
loadVarsText = new LoadVars();
loadVarsText.load("mainText.txt");
loadVarsText.onLoad = function(success) {
if (success) {
[Code] .....
The text field displays the name of the variable ("page1Title") rather than the content of the page1Title in the text file.
View 4 Replies
Jun 3, 2010
I've been writing movies in AS2 that have variables passed to them via the src parameter of the page code, e.g.
src="/Flash/theMovie.swf?value=1"
Then in the AS I don't need to define 'val', I can use it straight away. However, in AS3 - at least, as I understand it - it seems that I can't drop 'val' into the code without defining it, as it throws ""1120: Access of undefined property val".
So, if I add a line of code
public var val:Number;
or somesuch, will this be enough to ensure 'val' is useable once it comes through from the page?
View 6 Replies
Dec 2, 2004
hey, im just wondering for the best way to read variables of a .php page into flash
the page output looks like this array[0,0]=1&array[0,1]=3&....
i tried load(http://urlhere); but that dident work =p
then i tried
Code:
myVars = new LoadVars();
myVars.load("http://xev.mine.nu/nyheter/news.php?search=des","0");
myVars.onLoad = function() {
[code]....
the real problem is, i guess that i need it to read in the variable array[0,0]=1
just like that and not use sumthingrather=(myVars.varname)
because there will be a hell of alot of variables , and the variable ammounts will switch and i cant do a sumthingrather=(myVars.varname)for all of em
View 1 Replies
Jun 5, 2009
Was just wondering if its possible to have a two swf files on the same html page that can communicate to each other.
I have one movie that asks a series of question and what I'd like to happen is for those results to be shown in the 2nd swf. Sounds simple, which means it probably isnt
View 8 Replies
Mar 13, 2009
I am having trouble preloading my .swf files. Can anyone tell me how to create a "index" Page that says page loading while all of my .swf & .png files upload?
View 2 Replies
Dec 18, 2010
I made a drawing in Illustrator and exported it as FXG file to be used in my Flex App which is working fine. But now I want to change some settings inside FXG programatically, namely changing color inside the FXG file. How do I do that?
View 1 Replies
Apr 14, 2008
I'm trying to create an object/variable in my .fla file which will be accessible to functions located in my .as files. How do I do this?
Example:
Code:
// code in timeline of sample.fla
var player = new myObject();
[code]...
Normally, I would get an error from the second code block, saying that it doesn't know what "player" is. So how is this done correctly?
View 9 Replies
May 1, 2003
The external TxT file is loaded into _root!In the text file I have these variables:
-&ro1=122
-&ro2=112
They work fine but when I want to divide ro1 by ro2 it returns NaN!It was workin' a minute ago! I've been messin' if it for days now!
View 12 Replies
Mar 22, 2009
how do I passing variables between two swf (html) files For instance how can I request the variable "var_1" in the file blikvanger.swf (or blikvanger.html).Here is my code of one as file (contact.as):
Code:
...
homelink.addEventListener(TextEvent.LINK, linkHandler);
homelink.htmlText = "<a href="event:../blikvanger.html">THUIS</a><br>";
homelink.styleSheet = myCSS;
[code]....
View 5 Replies
Jan 26, 2009
i'm trying to build a flash site and ran into a problem... i have a gallery page with a bunch of page numbers at the top. when you click on one, a movieclip loads of some images coming in.so the problem i'm having is that i made a little animation for when you roll the mouse over the page number (they scale up when the mouse is over, scale back when the cursor moves away)... what it's doing is when you roll over, it goes to a certain frame in the timeline and plays that animation.that's all working cool, but i need it to not do that once it's clicked on. so basically when you actually click on a page number, the over script should stop until you go to another page... here's the code i've written,
function over(event:MouseEvent):void {
this.gotoAndPlay(30);}
function out(event:MouseEvent):void {[code].....
View 0 Replies
Sep 22, 2009
I have a Flash Form, which sends Variables to a PHP page through getURL - Post method.
My requirement is that : i need to redisplay the Form variables (name, email and so on) back in Flash as a confirmation after the data has been entered into the database in the PHP page.
View 1 Replies
Mar 31, 2011
So I am successfully able to send variabls from Flash to PHP, but I am still unable to figure out how to send the USER to the php page along with their variables. The reason I want to do this is because the PHP script in question spits out a bunch of text to the user based off the variables sent to it from flash.
Right now, when the user clicks the submit button in flash it sends the variables to flash ok, but to the user, they just continue to sit idly on the flash page, even though it no longer serves a purpose.
how can I get flash to send the user AND their data to the php script when they click the submit button?
Here's what I'm using now (inside flash):
//variables used to send data to server for processing
var scriptRequest2:URLRequest = new URLRequest("qm-results.php");
var scriptLoader2:URLLoader = new URLLoader();
var scriptVars2:URLVariables = new URLVariables();
[Code].....
View 1 Replies
Jul 20, 2004
I know there were many messages posted regarding sending variables from flash to php. I wrote a small code where in I used send() method of LoadVar object, it sends the message but it reloads the php page which I do not want it to do. I tried using sendAndLoad() and here it does not send any variable at all. Below is my sample code.
PHP code: (recieve.php)
<?php
$s = "12";
$r = $_POST['name'];
[Code].....
View 1 Replies
Dec 2, 2004
im just wondering for the best way to read variables of a .php page into flash
[Code]...
but that dident work either the real problem is, i guess that i need it to read in the variable array[0,0]=1 just like that and not use sumthingrather=(myVars.varname) because there will be a hell of alot of variables, and the variable ammounts will switch and i cant do a sumthingrather=(myVars.varname)
View 1 Replies
Mar 31, 2005
the button is set to: getURL("javascript:openNewWindow(movie,'thewin','h eight=400,width=400,toolbar=no,scrollbars=yes') ");Movie being the name of the variable set up earlier in the project to randomly choose my swf movie that I want to play. Then of course I have the function set up in the HTML page to listen for the variables for the URL, name and windowsettings. I can get the whole thing to work with an HTML page in the URL,
View 3 Replies
Jun 22, 2003
Im trying to send variables from my HTML page to flash, in order to control the location of movie clips. This is what I have.
HTML PAGE
PHP Code:
<param name="movie" value="navi.swf?sectionheader=charts">
*I have also added the "?sectionheader=charts" to the EMBED line.
SWF/FLA
sectionheader._x = 10;
sectionheader._y = 290;
*This is set on the first frame.
The theory is that flash will read the variable and come up with something like:
charts._x = 10;
charts._y = 290;
..................but, ofcourse it doesnt!!!
I have been able to set text of textfields and event traget frame Labels in similar ways, but this will not work..
View 2 Replies
Jul 20, 2004
I know there were many messages posted regarding sending variables from flash to php. But I am facing a problem. I wrote a small code where in I used send() method of LoadVar object, it sends the message but it reloads the php page which I do not want it to do. I tried using sendAndLoad() and here it does not send any variable at all.[code]
View 1 Replies