ActionScript 2.0 :: Use Variables From Loaded File In The File
Feb 19, 2009I've got a loadVars function, but I want to use the variables from the loaded file elsewhere in the file.[code]
View 1 RepliesI've got a loadVars function, but I want to use the variables from the loaded file elsewhere in the file.[code]
View 1 RepliesI use following flash actionscript code, got from online, to load the "Loading.txt" file:
var myTextLoader:URLLoader = new URLLoader();
myTextLoader.addEventListener(Event.COMPLETE, onLoaded);
function onLoaded(e:Event):void {
[code].....
How do I call variables of my external swf file from my index.swf timeline?
this is what I did:
createEmptyMovieClip("container",5);
loadMovie("external.swf");
variable._visible = xxx;
What do I put in the blank?
How can I import some variables from a txt file and treat them like normal variables in fla file? something like in txt file
Code:
&variable1=2&
&variable2=8&
[code]...
I have small issue in as3. I am load "mainmenu.swf" file into "main.swf". through loader class. so now "main.swf" is parent "mainmenu.swf" file children how can call "main.swf " variable & function from "mainmenu.swf" .
View 2 Replieshow to pass variables from one Movie clip's AS file to my Main AS file. Let say my Movieclip's AS file is calling damage = 1; so how the Main AS file retrieve the damage value from the Movieclip's AS?
Code:
public class robotMC extends MovieClip
{
public function robotMC()
{
[code]....
Im pretty new with the flash -> php -> mysql thing .. And I have made a script that sends some variables (that a user inserts in some input forms) with some var names, and then php handles it and insert it into my MySQL database its kinda ugly that a page pops up and opens the php page.So I was wonderin' if there is some way to send the variables to the php file and process them inside the flash file. without openin' some fancy browser window ?
View 3 RepliesI have basic knowledge of Flash and AS3.0. Suppose i have a flash swf file(main.swf). In this main.swf file, i loaded another swf file(sub.swf) by writing the following code snippet in main.swf file as shown below:
var textLdr:Loader=new Loader();
var noteUrl:String = "AddNote.swf";
var noteUrlReq:URLRequest=new URLRequest(noteUrl); textLdr.load(noteUrlReq);
addChild(textLdr);
Now, how to acess the data present in main.swf into sub.swf.Note: Here data represents values/data stored in variables/objects of main.swf file.
Is it possible to control one loaded SWF File eg.(MOVIE-1.swf) from another loaded SWF file eg.(MOVIE-0.swf) on a different level? eg. with a syntax like:
onRelease
_MOVIE-1.SWF.gotoAndStop (4)
or:
onRelease
gotoAndStop (MOVIE-1.swf, frame4)
I'm building a flash movie for something at work and im loading in some images using an XML file but when i use a preloader it only preloads the XML file (as in just the text inside) and not the images.
This causes the movie to start playing without having the images loaded.Does anyone have any ideas about how i could get it to preload the contents/images being called in the XML file so it doesn't run as soon as the XML file is loaded.
I will try to be as clear as I can. I have an existing swf file that I want to add Play,Pause, FF and Rewind via an externally loaded swf file that has the controls contained in it.I am loading an external swf file that has all of the controls on it via this code:
// Set up the Mouse to use a listener
var mouseListener = new Object();
Mouse.addListener(mouseListener);
[code].....
I have an existing swf file that I want to add Play,Pause, FF and Rewind via an externally loaded swf file that has the controls contained in it.
I am loading an external swf file that has all of the controls on it via this code:
// Set up the Mouse to use a listener
var mouseListener = new Object();
Mouse.addListener(mouseListener);
[Code]....
I am doing this so I can rollover the viewing window and have it appear. I cannot get any code to work to control the timeline (which is broken down into sections with individual MC's in each section.
What I am looking for is the code to apply to the buttons on the external swf file that has the controls to control the playing of the movie.
I have a flash file that is 1.5mb in size. As it takes about 6 minutes for someone on dialup to load this file, I have created a smaller swf file and loaded the larger one from it but I don't want the larger one to begin to play until it's fully downloaded. How do I set this up? I have set up the action script 2 as follows: loadMovieNum("top2.swf", 0);
View 7 RepliesI load a "cal" swf file in another swf files mdi_window. So the window is moveable inside the application. The issue is with the x y axis for the popups that open up in cal swf. The code for the function that opens popup is:
[CODE]...
The x & y axis of the popup act wired based on the location of the mdi_window in which the Cal.swf is being loaded. The x & y axis work fine if I move the mdi_window all the way on the top left corner of the application. The first image shows how the popup opens when I double-click on the 10:00 AM purple color event on my calendar.
and now when I move my window the popup moves to the side as well. I clicked on the same 10:00Am purple event again here: How can I solve this issue.
I can't seem to remove / unload the external swf files e.g when the carousel.swf (portfolio) is displayed and I press the about button the about content is overlapping the carousel (portfolio) . How can I remove / unload an external swf file from the main flash file and load a new swf file, while at the same time removing garbage collection from memory?
View 15 RepliesI am trying to write a class file using a .as file instead of writing code into the script tab of a .fla file.When I write stage.addChild(img); I get an error that stage is null. When I take out stage, and just write addChild(img); the code runs fine, but nothing appears on stage. Do I need to do something to set a stage active?
Is this because I don't have a Main class? My class is named after the file and I don't have a file named Main.Here is the code. As it is, it runs and I get the two trace outputs, but no graphic on my screen.
package { import flash.display.DisplayObject; import flash.display.Sprite; import flash.display.Loader; import flash.events.*; import flash.net.*; public class HelloWorldImage extends Sprite { private var background:DisplayObject, foreground:DisplayObject; private var url:String = "hw_jpg.jpg"; private var loader:Loader = new Loader( ); public function
[code].....
I have successfully created a php file that reads and echoes the contents of a directory in the string [code]...
View 4 RepliesWe have a FLASH website that uses PHP to authenticate users.
We have recently been asked to implement TWO variables as we used to only have one.[code]...
i have a file uploader in AS3, and can successfully save a file using php. I'd like to also send variables along with the file, have php process the variables, and display them back in Flash.
In a separate project, I was able to get variables from flash-php-flash, but I can't work out how to do this while also uploading a file. I get a null reference error in the completeHandler function when flash tries to display the vars coming back from php.
[Code]...
I have created an external actionscript file, which is called from Flash with the command#include "my_script.as"
The question is: how can I pass variables from Flash to the external actionscript file?
I am currently helping make a project which needs to load variables from a PHP file into Flash. What I want is the flash movie to go to a frame if the PHP variable in the PHP file equals some text, say "hello".For my PHP file I have this:
Code:
<?php
$dataForTxtbox_1 = "hello";
print("&name1=$dataForTxtbox_1");
?>
I have tried several bits of actionscript, but with no luck. Basically, I want the movie to go to a frame if the variable in PHP equals "hello". Which it currently does, I have tried using the if statement in several ways but with no luck.
I am attempting to retrieve data from a PHP file within my Actionscript file.I have a large amount of incoming dynamic variables so it is necessary for me to retrieve them all, however, I don't want to get every variable individually as that would take a very long time to code and does not work well. Is there any way to get all variables at once?[code]...
View 3 RepliesGot a movie that loads some variables from an XML file. The content of each XML.node fills the corresponding dynamic (on the fly) recipients (mcs).
I know how to do this once, not using a for (loop) basic parser, so, I got stuck with this simple code while I was trying to "make it" with a "loop" parser.[code]The idea is to have 2 buttons that change the number of the array sothat I can access the next XML.node without having to write all the code again, neither the dynamic recipients -movie clips- nor the parser. Can't I make a function from all of these sothat I can call it later?
You know how & is used to separate variables in a .txt file if your loading variables, like &height=22&width=3353&....well what if you want to pass a string into flash like "We all went & drunk lots of beer"?
View 6 RepliesI've searched everywhere, but can't find one thread/result that suits my situation.I'm trying to post data into a database, through php. I don't want to reload the page, so I want this to happen through Flash. I thought about using the LoadVars() class, but it just simply isn't working.How would I about doing this? Say I have three variables, blah1, blah2, and blah3, all of which are strings. How do I send these variables to a php page with the POST method?
View 4 RepliesHow do i write variables in a .txt file?
View 1 RepliesHow do i write variables in a .txt file with ActionScript?
View 1 RepliesI am going to make a flash music player. I need it to be able to read variables from the PHP file that it's placed in. Example variables include: path to the MP3, length of the song, etc... These variables are stored in a MySQL database, not in XML files.
So how do I do this? Can you point me to a good tutorial?
I have developed a flv player which will take the video file name from a php code for in frame 3
[Code]...
I currently have a main swf file which contains a moviecliploader that loads another swf. However, I wish to have the option to control the main swf file variables using the secondary swf.
View 2 Replies