ActionScript 2.0 :: [mx] Passing Variables Between Movies
Feb 19, 2004I want to know how I can pass parameters between 2 swf files..
View 7 RepliesI want to know how I can pass parameters between 2 swf files..
View 7 RepliesI want to know how I can pass parameters between 2 swf files..
View 7 RepliesI have been receiving great help for the past few days on many different things, and now I have another issue. I am creating a form in an SWF that pops up in a window over my main site. Is there a way to pass the information that the user submits in that form to my main movie? Or will I have to embed the form movie into my main movie? Is there a tutorial dealing with this? Also, since I'm asking, is there a way to save information to a text file using ActionScript or Flash, or whatever? I was thinking the other thing I could do would be to save the information in a text file, then dynamically load it in a text box on the main site.
View 1 RepliesBasically I have a button which can be clicked to load an external movie, the external movie loads an ASP script.Dependent upon the button clicked I want to be able to execute different SQL statements.
View 4 RepliesI have two movies: m1 and m2. In m1 I set a variable to variable="yes". Now, I want m2 to read the variable and do an action depended on the variable (see the example below).
This is the AS in m1:
on (release) {
docufield = "background.txt";
}
And this is the AS in m2:
this.loadVariables(docufield);
Does anyone know of a good way to pass variables between flash movies on different html pages? Should I use a flash cookie? pass the variables in the URL of the html file and then try to get them back out on the next page?
View 3 Repliesm using the following code for my main four buttons -
Code:
button_array = ["home","plans","terms","contact"];
for (var i in button_array){
[code].....
A map of the US comes up and users will select where they work, before getting to the next page, which is a form where they fill out the rest of their contact information. The Submit button sends the form variables to a php file on a different server which then stores their info in a database and will take the "location" variable from the map (in the previous .swf) to send the user the correct demo map.
My vars from the form post to the PHP and a confirmation e-mail is sent to the user etc. etc. this works fine...i'm just confused as to how to send the location variable that was pre-selected to send along with the form.
I have a SWF movie ("bits.swf") with an array ("things") variable in it. I use loadMovie to load bits.swf into my main movie. Q: how can I read/use/transfer the values in array "things" from my main movie?
View 4 RepliesI have a flash movie for drop down menus that is called by all flash/movie banner sections of my site. The banner movies use FlashVars to set the heading and an image. The trouble is that the flash menus also were set to use a flashvar to dictate the context of the menus and leave one top level menu highlighted to show the content to the user. I have not been able to get both of them to use the Flashvars functionality. The html page calls the banner movie directly and it can therefore access the Flashvars. The menu swf however - which is not called from the html page but instead is called from within the banner movie - cannot access the flashvars variables. That leaves me with two choices:
1. Either use a different method for passing the context variable to the menu movie.
2. HTML code calls the banner movie. I can continue using flashvars and get the context variable by reading it from within the banner movie - and then somehow pass the value down to the menu movie if that is possible.
I want to pass information to a Movie Clip (swf) loaded into a UILoader component on the stage. I need to be able to do this so I can synchronize the actions of multiple Movie Clips in the main movie clip. What's the proper way of accomplishing this?
An example of how I'd use it is when I'd load a video to the stage and I'd want to tell my audio player to mute the volume on the background audio.
I have a flex compiled swf module inside my flex program I just need to pass it some values like I do it when I use chat.swf?username=john : that works !
I tried it with flex swfLoader and Image
SWFLoader source="../bin-debug/chat.swf?username=john"
Image source="../bin-debug/chat.swf?username=john"
This does not work: these values are not passed !
I'm trying to do a demo with a fastforward button and a rewind button that will go to the next scene and previous scene...however, due to the format that my predecessor created used...I'm stuck with alot of scenes. The navbar (ff and rewind buttons) is in a .swf file called main. The actual demo is in demo3.swf. I created a loader scene to redirect to the correct scene (when ff and rewind are hit), how to pass the variables needed from the main movie. What would be the correct syntax or steps?
View 11 RepliesI subscribe for this forum becausethis r the actions i have in my level 1
on (rollOver) {
startDrag (this, false, 250, 270, 750, 520);
Mouse.hide();
[code].....
I am loading various movies into a "shell"movie as and when they are needed using loadMovie... However I have one movie which I am loading in to the shell "holder" movie which is supposed to load in variables from a php file. Now when this swf file is run in the browser outside of the shell, it loads in all the variables just fine. The loadVariablesNum command loads into "0" the root timeline, but when I run the shell and navigate to the swf file, none of the variables appear.I am guessing I need to load the variables into 'this' movie, but I have tried that by using the complete path...
_root.holder_mc.loadVariablesNum("scorevars.php"," post");
But this doens't pick up the vars. My problem is I am not fully understanding the relationship between swf's loaded into each other and how the timelines interact...
I am loading various movies into a "shell"movie as and when they are needed using loadMovie.However I have one movie which I am loading in to the shell "holder" movie which is supposed to load in variables from a php file. Now when this swf file is run in the browser outside of the shell, it loads in all the variables just fine. The loadVariablesNum command loads into "0" the root timeline, but when I run the shell and navigate to the swf file, none of the variables appear.I am guessing I need to load the variables into 'this' movie, but I have tried that by using the complete path _root.holder_mc.loadVariablesNum("scorevars.php"," post");My problem is I am not fully understanding the relationship between swf's loaded into each other and how the timelines interact.
View 5 RepliesI'm having a bit of a problem with this. I have a class- MiniMap which extends the MovieClip class.This class has a variable which is itself a movieClip, this movieClip is a small window which can be moved around on the map to select which portion of the miniMap will be shown in the bigger map.
How do I refer back a events on the class variables to effect the host class?
[Code]...
Scenario:I am loading various movies into a "shell"movie as and when they are needed using loadMovie... No problems there.However I have one movie which I am loading in to the shell "holder" movie which is supposed to load in variables from a php file. Now when this swf file is run in the browser outside of the shell, it loads in all the variables just fine. The loadVariablesNum command loads into "0" the root timeline, but when I run the shell and navigate to the swf file, none of the variables appear.I am guessing I need to load the variables into 'this' movie, but I have tried that by using the completepath..._root.holder_mc.loadVariablesNum("scorevars.php"," post");But this doens't pick up the vars. My problem is I am not fully understanding the relationship between swf's loaded into each other and how the timelines interact.
View 5 Repliesis it possible to pass variables between flash movies...
i.e. if you had 2 (or more) seperate flash movies in an HTML page, can you control one with the other?
I want to send variables between flash movies on different machines. How can I go about doing something like this?
View 4 RepliesI have a movie which is made up:
Level0= my interface layout with buttons
Level1= the different sections of the site, are loaded into this level (eg. home.swf, aboutus.swf etc.)
Because each of these sections has both an 'in' and 'out' transition, i want to use variables (on the buttons) to control these external movies that are loaded into the main movie (im even starting to confuse myself
basically in a nutshell... can you use buttons which control a movie ,which has been loaded at another layer, using variables....
I'm new on AS3, I'll try to explain what my project consists: Well, There is a main.fla and It loads external movies triggered by button items. The content animation sequence introduction starts with tweenLite and fills the stage with elements from Library (movieClips, buttons) and some sprites. I've built the intro animation through actionscript. Perhaps I'll need to explain how I did it the TweenLite structure, but the code lines are too long
The transitions / navigation:
Each button before load the external movie has a respective animation that removes the other buttons from the stage. It triggers an "outro" animation and then loads the External Swf.
First:
Each external Swfs contains a removeChild action in a MovieClip that CLOSES and removes the movie.. Like a "pop up" with a close action. After closed It should replay the intro animation and replace the buttons in the stage but it's not happening because I don't know how to communicate between different timelines / external movies.
I have a swf with an input text box and a button. When the button is clicked, I need it to open another swf in a new window on a different domain and pass the variables to a dynamic text box in the new window. I looked at local connect but I wasn't sure it would work because the two windows wouldn't necessarily be loaded at the same time and they are on different domains.
View 4 RepliesI 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.
I'm using IE 8 and trying to open an HTML file. All files are either local or ran on a server. Problem is I use the URLVariables object, and they still won't get passed. for example:
Code:
var req:URLRequest = new URLRequest("Y:/htmlFile.html");
var urlVars:URLVariables = new URLVariables();
[code].....
I just want to show the contents of the input data in Movie Clip Movie Clip A into B which is still in one layer.
View 2 RepliesI'm trying to develop a site map, which draws a tick over the sections of my app that have been completed. I've figured out how to draw the tick and how to pass variables from root to the MovieClip that the function is in.
To make the tick appear only after an mc has been watched, I tried setting a variable equal to 1 ino the last frame of the MovieClip, and telling the function to run if that variable was 1.
I'm not getting compiler errors, but I'm also not getting the tick. And I'm definitely completing the Movie
Here's what I've got so far: In root
Code:
var xcoord = 125;
var ycoord = 300;
var WaterComplete = 0;
In WaterMovie
[Code].....
I am trying to pass value and string from AS3 main.swf to AS3 child.swf loaded in it. But, Nothing is working and i can't get the value from one to another. As Beginner in AS3, i was working for a long time and
still i face these problems and no output yet.
[Code]...
I am having some trouble in passing variables from AS3 to PHP. I am using flash and php both in the same file [try.php]. I've stuck with this for two days.. Here's what I have done. header.fla [Actionscript in the timeline]
[Code]...
Creating a flash project where users can visit the site, and turn off/on objects in a house (ie. lights, tv, computer, etc.) The next user who will visit the house in the website, will see what lights or house appliances were left on. Flash variables are passed to PHP, and those variables are saved in an XML file. (For testing to see what is being saved to the XML file, on each click --vars.xml opens.) In the vars.xml file, I see that the house objects that were last turned on--are saved in the XML file- But in the SWF file, only one of the objects that are listed in the XML are turned ON. Only the last object that was clicked on would show ON--not all the objects in the XML file.)
package {
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.events.Event;
import flash.text.*;
import flash.net.*;
public class House extends MovieClip {
[Code] .....