ActionScript 2.0 :: Getting Variable To An External SWF File On Load?

Dec 22, 2004

I have an external SWF file that is a dynamic chart. It normally requires (in the object and embed tags on the HTML page) a variable passed to it that points to an XML file.What I want to do, is create a "container" program that simply has a few buttons, that when clicked load up that same chart.swf and point it to a different XML file.What I can't figure out is how to get that external file to recognize it's dataURL parameter that it normally receives off the html tags. (BTW, I can't edit that chart.swf, it's a purchased product.) I tried setting a root variable of the same name in my container to point to a new XML file, but that doesn't work. I tried setting that variable, and using loadMovie with a GET to pass it the name, but that just looks for a string that flash seems to be interpreting literally, so it can't locate the file at all (I.e. it's looking for the literal name "chart.swf

View 6 Replies


Similar Posts:


ActionScript 2.0 :: Getting Variable To An External SWF File On Load

Dec 22, 2004

I have an external SWF file that is a dynamic chart. It normally requires (in the object and embed tags on the HTML page) a variable passed to it that points to an XML file.

What I want to do, is create a "container" program that simply has a few buttons, that when clicked load up that same chart.swf and point it to a different XML file.

What I can't figure out is how to get that external file to recognize it's dataURL parameter that it normally receives off the html tags. (BTW, I can't edit that chart.swf, it's a purchased product.) I tried setting a root variable of the same name in my container to point to a new XML file, but that doesn't work. I tried setting that variable, and using loadMovie with a GET to pass it the name, but that just looks for a string that flash seems to be interpreting literally, so it can't locate the file at all (I.e. it's looking for the literal name "chart.swf?dataURL=datafile.xml")

View 6 Replies

ActionScript 2.0 :: Load Variable Data From An External XML File And Dynamically Displays The Item Names In A Menu - Arrays - Functions

May 18, 2005

I have been working on a Flash movie that loads variable data from an external XML file and dynamically displays the item names in a menu which may then be clicked to display other dynamically-loaded content that corresponds to the menu item that was clicked. I have now come to a standstill in the project as there is something I'd like to achieve but simply cannot work out how. This is my first attempt at working with XML in Flash and one of my early attempts at using variables. What I'm trying to achieve is; once the user has viewed the item's content, they can simply click "next" and "previous" buttons to display all of the content for the next or previous items in the XML document.

I know it probably sounds simple and I'm sure some of you could achieve this in 5 minutes (!) but I can't get my head around some of the coding. I assume previousSibling and nextSibling would come into play here as well as some sort of functions which access arrays of data for the previous and next items, but I'm just not sure how to correctly put these things to use. Rather than post my code and example images of the stage up here on the forums, I've created an html page here: [URL]

View 2 Replies

ActionScript 3.0 :: Remove / Unload External Swf File(s) From The Main Flash File And Load A New Swf File And Garbage Collection From Memory?

Sep 12, 2009

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 Replies

ActionScript 2.0 :: Pass URL String From External File To AS Variable (dynamic File Names)

Nov 17, 2004

I have a movie player that works fine when i hard-code the url value in the video function, but when i try to pass that url/file path from an external file, the video doesn't load. I suspect that there is something i'm doing wrong with the quotes. What am i doing wrong?

[Code]...

View 5 Replies

ActionScript 2.0 :: Load Variable From Text File To Main Movie (swf File)?

Jan 14, 2004

i want to load variable from text file to my main movie (swf file).what should i put in the second parameter of the function loadVariables ("target" parameter) - should i insert _this? _parent? _global? (nothing works.

View 3 Replies

ActionScript 2.0 :: External Text Files Wont Load Into External Swf File?

May 28, 2007

Structure: There is 1 main file that loads external SWF files depending on what is clicked on.One of the external SWF files loads its text from external text files. This works fine when viewing the SWF applet on its own. But when viewing as a whole site, the text doesnt appear. Very annoying.I made that particular SWF on my mums computer running Flash MX 2004The flash file itself uses the Scrollbar component from MX.Could someone tell me why the text doesnt load in this scenario? It runs fine on its own, just not as an external SWF.

View 4 Replies

ActionScript 2.0 :: Load An External Swf, Using A Variable?

Apr 5, 2007

I think i am screwing up the syntax. let's say I have a global variable, like. _global.something = mymovie

And then, the code to load in the external swf.... loadMovie((something)+ ".swf", _root.ec); Well, it doesn't work, and I'm just not sure where to put the quotes, and how many parenthesis are needed. How do I use a global variable and access it for this loadmovie code?

View 1 Replies

ActionScript 2.0 :: FMX Load External Variable To Array?

Mar 18, 2009

If I have an external text file with a variable, (let's say it's called names) with a list of names,... how do I load that variable into an array in flash?. Does it have something to do with Split() to separate the different values on the list separated with commas?

let's say the external file is:
names=john, peter, veronica, alfred.
How do we load that in flash so we have something like:

[code].....

View 7 Replies

Actionscript 2 :: Load An External Text Into A Variable?

Jan 13, 2010

I want to be able to load an external text from an http request to a string in my flash application.

i know that with loadvars i can load variables, when the output is as: key=value&key=value.. but this is not the case here. i get in return a string with several random characters. how can i properly retrieve them ?

View 1 Replies

ActionScript 3.0 :: Load External Swf And Set As Typed Variable?

Jan 28, 2010

So I have ClassA and ClassB. Each of these is the document class of two different FLAs. In ClassA I want to load a SWF and set it to a variable of type ClassB. The problem is that ClassB uses a ComboBox, so when I try to type the varialbe, then ClassA complains that it can't fine the definition for ComboBox. If I add the ComboBox component to the library of ClassA it works just fine. But that kind of defeats the puprose of me creating the seperate SWFs in the first place... smaller file sizes. So here is basic code of what I'm trying to do.

Code:
package
{
import ClassB;
public class ClassA extends Sprite

[Code].....

If I don't try to type the variable "swf" to ClassB then it works absolutely fine. But I want to have it typed so that I can then use intellisense/code completion in my IDE and not have to worry about the compiler telling em that functions don't exist on ClassB when I try to use them and such.

how to accomplish this? I have found that I can have ClassB implement an Interface and then set the swf to type IClassB... but I really don't want to have to do that because that means for all swfs I want to load I will have to create another Interface and prototype out all the functions. That just seems extremely tedious as this project will get very big.

View 2 Replies

ActionScript 2.0 :: Load External Data To A Variable?

May 21, 2008

im trying to assign external data to a variable,var str:String = loadVariables("text.txt",_root.descPane);why it wont work?

View 2 Replies

ActionScript 2.0 :: Variable To Load External Swf Using LoadMovie?

Jan 29, 2009

i hav one main swf inside which iam loading second swf, but instead of hardcoding it, iwant the secound swf to calldynamically using variables.

The querystring is as follows:
<PARAM NAME=movie VALUE="film.swf?extSwf=movie.swf">
This method works fine:

[code]....

View 2 Replies

ActionScript 3.0 :: Load External SWF Into MC And Get Name By Variable Class

Oct 17, 2009

I need to load an external SWF into a movieclip, and get the name of the SWF from a variable from a class. The variable is called getSWF and is defined as
Code:
public var getSWF = "movie.swf";

When I trace(getSWF); on the first frame of the main time line it outputs fine. However when I use the following code on the movieclip :
Code:
var testtest= getSWF;
var imageRequest:URLRequest = new URLRequest (testtest);
var imageLoader:Loader = new Loader();
imageLoader.load(imageRequest);
addChild(imageLoader);

I get the error:
1120: Access of undefined property getSWF.
Though if I change the variable testtest to movie.swf it works fine.

View 1 Replies

Actionscript 3 :: Load An External Swf File Using Loader.Load?

Sep 19, 2011

When i try to load an external swf file using Loader.Load(); The swf starts playing even before the init event is fired. Is there any way to stop the swf from playing atleast until the init event or complete event is fired?

View 1 Replies

IDE :: Load Mp3 From External Xml File And Make To Load Random?

Dec 24, 2009

How I can make this script lo load mp3 files via an external xml file like music.xml and if is possible to load random

Code:
music = new Sound();
music.onSoundComplete = function() {

[code]....

View 1 Replies

ActionScript 2.0 :: Load Images & Test From External File " Text File?

Jul 27, 2011

i have banner with 5 images fad in fade out effecti need to load images & test from external file " text file or xml file " with keeping fade effects on imagesall ways i know can't keep fading effect on images so

View 4 Replies

ActionScript 1/2 :: Load An External .swf File Into A Precise Location On The Stage Of Existing Flash File

Nov 20, 2009

All I'm trying to do is load an external .swf file into a precise location on the stage of my existing Flash file. I've spent an hour and a half on this site search and found nothing. What do I add to my loadMovie command to place the file at specific x,y coordinates?

View 3 Replies

ActionScript 3.0 :: Load The External Swf File And Unload The Parent Swf File?

Aug 17, 2011

i have a question. let say i have file1.swf , file2.swf, and file3.swf, how can i link this 3 files together,let say suppose file1.swf is the main content file, but as i load file2.swf, i want the file1.swf get replaced by file2.swf. How could i unload file1.swf at that time, so that my file2.swf will become the main content file?and again, when my current position at file2.swf, and i want it get replaced by file3.swf by clink on a button. so that the i can unload the file2.swf and let the file3.swf become the main content file.

View 13 Replies

ActionScript 3.0 :: Playing Flv File And After That Load External Swf File

Apr 7, 2009

i have a button that when it is pressed plays and loads an external flv file. this part works fine but directly after the flv video is finnished i want to load in an swf file. does some one have an idea how to do this? first show flv and then load swf?
this is the code as it looks now..

[Code]...

View 16 Replies

Actionscript 1.0 :: Load External Swf File To Parent Swf File?

Mar 27, 2011

i'm building a website using flash. i have a external swf file that i want to import into my website. i thought this would be an easy task but for some reason when i load the movie, it flickers. my website (parent swf) was build using 1.0. The external form swf was build using 3.0. My approach:

1.create an empty movie clip called mcForm

2.go to the mc clip page i want to pull the external movie into

3. within my actions layer, I call the following function loadMovie("main.swf", mcForm);

If i write:

LoadMovieNum("main.swf",0);

then the my main.swf opens correctly but closes the parent swf file. I wan the main.swf file to be embeded within the parent file.

View 1 Replies

ActionScript 2.0 :: Load A Variable From A Txt File?

May 17, 2002

I load a variable from a txt file.The dynamic text box has html turned ON.All characters are embeded.Here's the problem:In the txt file I have a text that contains an html link:

myVariable=Hello! This is my text! Click <a href=http://www.uachq.cjb.net>here</a> to visit my site!

However the swf displays everything up to "Click" ie before the link:

Hello! This is my text! Click

And that's it. I heard that Flash can recognize a simple html command like <a href> but this seems odd to me... Why isn't this working?

View 10 Replies

ActionScript 2.0 :: Using A Variable Number From An External File

Oct 30, 2009

Im running AS2 on Flash CS4 for this: I've found a million posts on similar topics, but none seem to do what I want, even though I feel like its very simple. I've tried a ton of different codes and can't get anything to work. All I want is for Flash to pull a number variable from an external file, lets just say a txt for now. I then want to be able to use this variable for calculations within flash. The only thing I can get to semi-work is having a txt file that says MyNum=5 and then putting the following in flash: loadVariables("Test.txt" , _root);

If I trace the variable "MyNum" it will output the right value, but its as a string no matter what I do. My most recent attempt to get it to be a number is to put the following on a later frame:

var NewVar:Number = MyNum;
var NewVar2:Number = NewVar + 1
trace(NewVar2);

Despite hardcoding multiple variables to be numbers, the output I get is 51, which means its still displaying as a string. My other issue is that you have to wait several frames before the variable is recognized. Do you have to wait numerous frames to use these loaded variables? If so, is there a way I can code it so that flash will just wait until it has the variable before moving on? I can't seem to get any loading function to work for it, but I don't just want to pull my next action down the timeline some arbitrary number of frames and hope its enough for flash to pull that number from the file.

View 10 Replies

ActionScript 3.0 :: Pass Variable From External File Into Fla?

Jul 30, 2009

I have a simple menu class for site navigation[code]...

I would like to be able to listen to the value of 'btnName' inside my .fla and respond accordingly.

Is it possible to pass this variable from an external .as file into my .fla?

View 10 Replies

ActionScript 2.0 :: Loading Variable From External File?

Oct 24, 2003

i have this code:

var loadText = new loadVars();
loadText.onLoad = function(success) {
if (success) {
myVar = this.myVar;

[code].....

to load an external variable to load one movie, on the data.txt I have myVar=video1 my problem is that he is not loading video1.swf to container mc, but the trace to the cvariable name is correct

View 3 Replies

ActionScript 3.0 :: Setup Variable To Load External Image For A Drag & Drop Object?

Feb 26, 2011

how to set up the URLRequest to load an external image to a movie clip that is being used in a Drag and Drop event.

I have successfully implemented the drag & drop code to my design but I would like to improve it by successfully loading external images to those objects that are being dragged around.

View 4 Replies

ActionScript 2.0 :: Load A Variable From A Text File?

Aug 2, 2006

I need to load a variable from a text file, search an array for the loaded variable, and output the result! EASY, so what's UP?... check it out:

Code:
_global.activeCity;[code]......

View 2 Replies

ActionScript 2.0 :: Load A Variable From A Txt File Using The New MovieClipLoader()?

Jan 12, 2004

I want to load a variable from a txt file using the new MovieClipLoader() within MX2004PRO but i have a pb...

[AS]
var my_newsloader = new MovieClipLoader();
var my_newslistener = new Object();
my_newsloader.addListener(my_newslistener);

[Code]....

but i get the error "Left side of assignment operator must be variable or property. my_newslistener.onLoadComplete() = function (){"

View 2 Replies

Actionscript 3 :: Pass A Variable From The Main Fla To External As File?

Mar 7, 2012

I'm beginner in actionscript 3, and I'm trying to pass a variable from the main fla to external as file.

View 1 Replies

ActionScript 3.0 :: Access A Variable In Stage Through One External File?

Nov 8, 2011

I have one fla called index.swf it import another swf called (home.swf) through addChild()In home.swf, there is a button.i am trying to make this button activate an event in index.swf I tried using root but not worked I tried use stage but neither worked.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved