ActionScript 2.0 :: Loading An External .swf Into A Movieclip And Exchanging Variables Between The Two?

Apr 27, 2006

i have a Main.swf within the _root of Main.swf, I load another external flash file called Timer.swf into a MovieClip titled 'container'Now, I lets say i want to share variables between the two. How would I do this? (Like lets say Main.swf wanted to know the value for Timer.swf's variable called xTime and Timer.swf wanted to know the value for Main.swf's variable xtimezone )

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Loading External SWF And Using Variables

Aug 12, 2009

When loading an external SWF file, can you actually use some of the variables from the loaded SWF file in the parent SWF file?

View 1 Replies

ActionScript 2.0 :: How To Loading External Variables

Jan 26, 2004

I had a question about loading external variables. Is it possible to load external variables from a different server other than the one that the flash site is hosted on?And if so, what would that command look like?For instance, if you load a variable from the site's own server it might look like this;loadText.load("TEXT1.txt");Would loading it from a different server look something like this;

View 1 Replies

ActionScript 2.0 :: Loading External Variables With Mac?

Mar 2, 2004

WHy o why in the world doesnt this work? I've done this quite a few times at home on my PC, but now I'm on-site with a client who has nothing but Macs. "Sure, no problem" I told my AD, "I can do that...".I'm trying to load variables from an external .txt file into Flash MX and this is the code I'm using:

links = new LoadVars();
links.load("assignLinks.txt");
links.onLoad = function(success){

[code].....

View 10 Replies

ActionScript 3.0 :: Loading Variables From External Source?

Jan 23, 2011

How to load variables from an external source? For example, Lets say I have a movieclip that contains 6 keyframes, and I want flash to load the proper keyframe when the main swf is opened. Flash knows what the proper keyframe is, because that variable is stored in a MySQL database, or txt file, or xml file, or whatever. Also, how could i have flash write to an external file, so that i can save the changes.

View 2 Replies

ActionScript 3.0 :: Loading An External .swf With Additional Variables?

Oct 14, 2009

I've been attempting to load an external .swf within a parent .swf. The problem is that the external .swf requires additional variables to pull it's content from a database. This code of course works just fine if the .swf doesn't contain any additional variables or if it's requesting an image.

Is it possible to do this using the GET method, or is there an alternate method while using Loader()?

parent.php as3:

ActionScript Code:
var loadit = new Loader();
addChild(loadit);
loadit.load(new URLRequest("gallery.swf?xmlUrl=http://localhost/gallery/api/rest/get_gallery/1/json"));

The external .swf is obviously gallery.swf while the variable that is necessary for it to function is [URL]

View 3 Replies

ActionScript 2.0 :: Loading External SWF With Variables Attached?

Oct 14, 2009

I am doing the website for this artist...so she has the permission to post this html code on her page but we are doing a full flash website and I want this swf file to load inside the main.swf..but I cannot wrap my head around how to get it to go with the ?wid variable attached.I have tried numerous combinations.URL...ABOVE is the link i am trying to get to load into my main.swf file and play the way it plays here.URl...

View 0 Replies

ActionScript 2.0 :: Loading External Variables From TextFile With Mac

Mar 2, 2004

I'm trying to load variables from an external .txt file into Flash MX and this is the code I'm using:
links = new LoadVars();
links.load("assignLinks.txt");
links.onLoad = function(success){
if(success) {
diovan = links.diovan;
diovanhct = links.diovanhct;
}}
trace(diovan);
trace(diovanhct);

(The text file has the following content: diovan=whatever&diovanhct=whateveragain&)
The trace outputs "undefined" for both variables. I also tried loadVariables instead of loadVars... same result. If this is a problem specific to Macs, whats the work around?

View 10 Replies

ActionScript 2.0 :: Loading External Variables With String To Num?

Apr 8, 2002

ok.. I really feel like pounding my head against a wall here. I'm importing variables from a regular txt file. I have dynamic text fields on the main timeline that pick up and show these variables. I know that they are coming into the player at _root, or _level0

rows="5"; is one of them. When I do a debug/List variables, that's what it shows me.

[Code]...

View 11 Replies

ActionScript 3.0 :: Loading External Variables To Be Split Into An Array?

Apr 22, 2009

I'm migrating an old project to AS3 and I'm having some problems make the conversion.

I have a text file called "variables.txt" formatted like this (note the jump form p9 to p11) Quote:

&p0=1|0|4|1|8|0|0|29|14|1|6|0&
&p1=1|0|4|1|8|0|0|29|14|1|6|0&
&p2=0|0|11|0|25|6|1|125|86|3|8|0&
&p3=0|0|1|0|0|2|0|26|17|0|2|0&
&p4=4|1|3|1|17|5|1|33|15|3|4|0&

[Code]....

What I'm trying to do is convert all those text variables into an array that will be accessible throughout the presentation.

View 5 Replies

ActionScript 3.0 :: Loading An External Swf File And Passing It Some Variables

Oct 30, 2010

I'am trying to load an external swf file and passing it some variables. He is my code:

[Code]...

When i load a simple swf, it work fine, but when i try to give him some variable it does not work anymore.(i'am also muting sound)

View 1 Replies

ActionScript 2.0 :: [external Variables] Loading Textformats From .txt Files?

Jun 2, 2004

I want to make a small flash animation in which the user can specify what text and what font/color will be used throughout the animation, by typing in the text file.On with the code which is of interest:

Code:
//Mouse.hide();
since1_txt = "";
since2_txt = "";
thename = "";

[code]...

Of course, the movie clips contain this text and all works fine if I specify it this way.So I have this in my "actions" layer on the first frame and apart from the fact that it works if I specify the formatting within the actions, it's all good. But now comes the fact that I want to specify my textformat options within the text (.txt) file. So I'd specify two color sets (in RGB hexa sets, 0xFF0000 for example), the font (in this case, tahoma) and the three sizes, and have them assigned to myTextFormat's dynamically through loading, using, for example,

Code:

myTextFormat = new TextFormat();
myTextFormat.align = left;
myTextFormat.color = theColor1;

[code]...

Which doesn't work because i can't seem to get the myTextFormat.font = Tahoma; to work if i use myTextFormat.font = theFont; because it is, perhaps, searching for a font called "theFont" instead of taking the reference to the variable within the text file.

View 6 Replies

ActionScript 2.0 :: [external Variables]Loading Textformats From .txt Files?

Jun 2, 2004

I have just recently joined and am enjoying the multiple forum q&a's and the tutorials around here. I want to make a small flash animation in which the user can specify what text and what font/color will be used throughout the animation, by typing in the text file.On with the code which is of interest:

Code:
//Mouse.hide();
since1_txt = "";

[code].....

View 6 Replies

Ampersand - Loading Variables From External Plain Text File

Sep 25, 2009

I have a Flash movie that loads variables from an external plain text file, that a client updates themselves (from a web site which generates the file). A problem occurred when they used an ampersand symbol in the text field. Is there a way around this? I haven't seen a way to escape it that works.

View 4 Replies

ActionScript 2.0 :: External Swf Loading Into Target Movieclip Loading

Apr 20, 2005

I'm trying to load a SWF movie into a target movieclip called blankmc. The SWF movie is loaded from an absolute URL (eg. [URL]/img/20042005113934movie3.swf ) My Loading Progress code fails to detect the SWF file size. However the same code works perfectly for a JPG! Essentially the .getBytesLoaded() and .getBytesTotal fail to work. Why is this and how can I get it to work for loading SWFs?

[CODE]...

View 3 Replies

ActionScript 2.0 :: MovieClip - Variables Not Loading Properly

Apr 10, 2005

I found a script which loads text from a TXT file. Now the code worked fine on a button, but as soon I put that code on a MC it doesn't load the variables properly. That meas; I don't any script errors, but the text doesn't appear in the dynamic texterea.
Code:
on (release) {
loadVariables ("document1.txt", "");
mytext.scroll=x
}
Now I want this script to work on a MC!

View 4 Replies

ActionScript 2.0 :: Loading Variables In TextBox / URL Of Image Into MovieClip

Dec 21, 2002

I have a textfile with:
1. Some text to be loaded into a textbox
2. an url of an image I want to load into a movieclip
Code:
loadVariables("mytextfile.txt", "_root");
urlpic = _root.urlintext;
loadMovie(urlpic, "_root.pic");
This doesn't work, and neither does: url1 = _root.url1.text;

View 12 Replies

ActionScript 2.0 :: Loading Text Variables Inside Movieclip?

Sep 10, 2008

I want load text variables to the movieclip inside.heres the script.

Code:
on (release) {
_root.txtBox.text = "Messages"; \outside movieclip WORKS FINE

[code].....

View 1 Replies

ActionScript 2.0 :: Exchanging Data Between Levels?

Nov 10, 2006

Is there any possibilities to exchange data or values b/w different levels?

actually im having two levels and im declaring and initializing a variable in level0. Is it possible to access that variable value from level2 ?

View 2 Replies

IDE :: Loading External SWF Into MovieClip?

Jan 30, 2009

I am a new forum user and new AS programmer (but an experienced OOP in C++/Java/.NET),now using Flash CS4 on a Windows XP Pro machine.Using pre-loader demos from the web I coded my first AS3 program, it actually works as expected with some SWF movies; but with others it fails to operate properly.What I wanted to do is to create classes for each type of movieclip I have (the movieclips are all 100 frames animations) and when I create the instances with "new" the classes would just load its corresponding movieclip content (A SWF file containing the 100 frames).

Well the first problem I ran into was that if the SWF file is from previous versions (AS2 say) it does not work. Just to let you know because that is not the prolem now.All the program is doing now is loading the external swf into a movieclip instance at the time the class is created, this part works fine always, and then listening to EVERYFRAME events just calls moveNext going from frame 1 to 100, and when I reaches frame 100 it plays backwards by calling movePrevious.

The program works fine with a SWF file I downloaded from the web, but because I am having a hard time finding long animations built with the current version of Flash I tried to create my own SWF files to test, etc... Now the problems:I have 100 frames that I import to the stage into a new movieclip, then I right click on that movieclip in the library and export this movieclip as SWF using Flash S4...which creates the SWF fine and which I can play in a player fine too.However the program fails with this Flash CS4 movieclip ! , for some reason it does not seem to react to the moveNext and movePrevious calls, it just plays from 1 to 100 and them jumps back to 1 again.

View 9 Replies

ActionScript 2.0 :: Loading External Jpg Dynamically Into A Movieclip

Feb 3, 2009

I have built a horizontal scroller, you can see images there that go from left to rigth, what I wanted to do is when a user clicks on a thumbnail:

1)go to full screen mode

2)create an empty movie clip and load a jpg into it

I did it, but when I go back to the normal screen the empty movie clip is still there. How can I get rid of it when the user goes to the normal screen? it seems to be that when I load the jpg into the emptymovieclip the empty movie clip doesn't have the click property is that true?

[Code]...

View 7 Replies

ActionScript 3.0 :: Loading External SWF Within A Moving MovieClip?

Jun 29, 2009

I'm loading external swfs into instance "Frame01" which is a MovieClip, the MovieClip is nested within instance"FrameLoader" (MovieClip) Which moves (elastic effect) when a button is pressed. Im looking to get the loaded swf to be inside "Frame01" while its sliding.

//Elasticity Effect:
var xVel:Number=535.0;
var yVel:Number=89.0;[code].......

View 0 Replies

ActionScript 2.0 :: Loading External Swf Into Movieclip Holder?

Jan 6, 2011

note I have to change some file names and urls for company privacy.I am working on an online banner ad which tight size requirements. In order to stay under the file size, I want to load an external swf housed on our server into an empty movie clip on a button press. I have this working with the following code on a button:

on (release) {
loader_mc.loadMovie("location where swf file is housed");
}

I then want to unload this movie if a different button is pressed. However I am receiving the following error.

*** Security Sandbox Violation ***
Connection to file: XXXXXXXX halted - not permitted from "location where swf file is housed"
-- Remote SWFs may not access local files.

How can I unload this external swf file from my move? Again the external swf file is housed on our sever and the main swf file will be housed with the place we are advertising.

View 0 Replies

ActionScript 3.0 :: Loading External SWF To Target MovieClip

Jan 16, 2010

I am trying to build a menu, that loads external swf to target movie clip, in the code below it works if I remove the line target removeChild, but then if a press the other button, just put it on top, so my actual problem is that if I don't have anything loaded in target, this code doesn't work because it can remove child?

menu.btn_avanti.addEventListener(MouseEvent.MOUSE_DOWN, goseccion);
menu.btn_professors.addEventListener(MouseEvent.MOUSE_DOWN, gofotos);
function goseccion(Event:MouseEvent):void{
var main:Loader = new Loader();
main.load(new URLRequest("seccion_basica.swf"));
target.removeChildAt(0);
target.addChild(main);
[Code] .....

View 1 Replies

ActionScript 2.0 :: Loading External SWF Inside Of MovieClip

Feb 22, 2012

I'm trying to load an external swf inside of my movie clip.
meter.loadMovie("external.swf");
I managed to get the above to work but as soon as I press a button in the external movie it reacts with my main movie! So a button in the external movie that makes the timeline go to frame 2 makes the main flash file to goto frame 2. Also, can you load external swf files that use external folders for content? Basically I have an interactive diabetes meter and it's all controlled via scripting ( I didn't create it ) but it has the main swf file which you load. However it references other folders and scripting files.

View 2 Replies

Data Integration :: Exchanging User Input Information With Aspx Server?

Jan 26, 2007

I've made a flash page with user input for email and comments. The thing is I am working with a aspx.net server. The programmer has written out a aspx coding for the server side. Now all i have to do is write a script in the input fields in flash to connect to the aspx server. The progammer said that I would have to create variables inside the flash program to call to the aspx page he created. I am faily new to aspx and have no clue to writing a script with variables.

View 2 Replies

ActionScript 2.0 :: [MX04] Loading External URL Into Empty Movieclip?

Oct 25, 2006

I'm trying to load an existing webpage using the loadMovie command into an empty movieclip.

I thought this would be easy, but I can't seem to get the code to work and have tried several variations of the code below....

//catrun_mc=the empty movieclip//
catrun_mc.loadMovie.getURL("http://www.website.html");

View 12 Replies

ActionScript 3.0 :: Loading Buttons In MovieClip As External SWF File

Jun 27, 2009

I am working on a website, its a project, I built custom buttons and used there own AS3 to make them play on hover. There is one problem thou, in my main scene or timeline I created this function:

about_but.addEventListener(MouseEvent.CLICK, function(){
var aboutURL:URLRequest = new URLRequest("about.swf");
})
contact_but.addEventListener(MouseEvent.CLICK, function(){
var contactURL:URLRequest = new URLRequest("contact.swf");
})
cat_but.addEventListener(MouseEvent.CLICK, function(){
var galleryURL:URLRequest = new URLRequest("catalogue.swf");
})
port_but.addEventListener(MouseEvent.CLICK, function(){
var portURL:URLRequest = new URLRequest("port.swf");
})

Ok but it had the navigatetoURL function but I took it out. Reason is because I want these buttons to load in a movieclip (mc_loader) as external swf files. I am not sure as is to linking these buttons to the loader movieclip.

View 9 Replies

ActionScript 2.0 :: Loading External JPEG Into Blank MovieClip

Jan 9, 2010

I have created a portfolio page (all flash) and am using the following code to load external jpegs. I've also created this button to take one back to the main area. The problem is, when I click on the back button, even though it does take me back to the main page, the image stays there. How would I modify the code to make that image delete itself or hide when the button is pressed?

Code:
// set up loader, an instance of MovieClipLoader, and use the main timeline ("this")
// to listen to and respond to its broadcast events
var loader:MovieClipLoader = new MovieClipLoader();
loader.addListener(this);
// define what should happen when the jpg/swf is completely loaded
[Code] .....

View 13 Replies

ActionScript 3.0 :: Loading And Unloading External SWF Into An Empty Movieclip?

Mar 22, 2010

how to load external SWFs into an empty movieclip, and then having them unload when another is selected. At the moment, all I can do is load the swf onto the stage with no positioning, and clicking the other button just loads the next swf on top.

Actionscript Code:
stop();standard_btn.addEventListener(MouseEvent.CLICK, onLoadClick);function onLoadClick(evt:MouseEvent):void{  var loader:Loader = new Loader(); 

[code].....

View 3 Replies







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