ActionScript 2.0 :: Passing Variables From Loaded SWFs

Jun 26, 2007

I'm working in a modular app and I'm having trouble passing variables between a Parent and it's loaded Child SWF file. The Child SWF has a single object called hotSpot_mc. The Parent has a frame called frame_mc to load the Child. I'm trying to pass the value of bHotSpot, which is turned on and off when the user mouses over the MovieClip. Testing shows that the value is being set in the Child but not in the Parent, where it remains undefined. Should I be using shared objects or do I just have to use better targeting?

Here is the parent SWF

Code:
// Load the child SWF into frame_mc
loadBackground("Room_1.swf");
function loadBackground(backgroundName:String):Void {

[Code].....

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Passing Variables Between SWFs?

Sep 14, 2009

I have one swf where I modify parameters of a circle using tweenlite and variables input by the user and I want to load that swf into another swf which has a boarder that I want to change according to the circle color. I got the circleChange swf to load using a uiLoader component but passing the variables for the color has become difficult and I'm a bit lost.

I tried using shared objects and kept getting the "cannot create shared object" error. I can either pass a variable or pass the inputTxtBox of the user defined color but don't know how to do either.

View 2 Replies

ActionScript 2.0 :: Passing Variables Between Seperate Swfs?

Oct 16, 2002

I am having trouble passing information from a loaded movie sitting on level1 back to the main movie.

View 3 Replies

ActionScript 2.0 :: Passing Variables From External Swfs To Main And Vice Versa

Jan 12, 2010

I wonder if it is possible to pass values from external .swf files to the main projector (.exe) file.? I would also like to know how a button of an external swf file can control the playhead of the main .exe file.

I have this map of tasks. and each map have these houses which when clicked will take you to a certain task(external swf). and when accomplished should have a button to take you back to the map(main swf), and also the button to send a value to the main swf that the task is accomplished.

View 2 Replies

ActionScript 2.0 :: Passing Xml Loaded Text To External Swfs Dynamic Textfield

Feb 21, 2007

i'm pulling my hair over this. i have sucessfully (verified) loaded an xml file and can trace the data i'd like to pass. i am loading the external swf into an empty mc called X. in the external swf i am loading is a mc and in there is a dynamic textfield. i give the content of the xml to the path to the dynamic textfield and nothing happens. trying to pass the variable with: target.text = content;

i listed the variables and objects in the test movie debug option (command+enter) and i can see the dynamic text box variable. then i took copied the path from the output window to my actionscript, replaced _level0 with _root but still to no avail. what am i doing wrong? do i have to publish the swf being loaded in a certain way? why am i able to look at the variables in the debug list variables and objects option, but not in the actionscript?

View 1 Replies

ActionScript 3.0 :: Accessing Variables In Loaded SWFs

Oct 12, 2009

If I load an SWF file, is it possible for the pre-loader to access and change a string variable inside the loaded swf? Is there any special way to do this or would it be a simple case of loadedMC.variable = "new value"

View 3 Replies

ActionScript 3.0 :: Accessing Variables In Loaded SWFs?

Mar 16, 2011

If I load an SWF file, is it possible for the pre-loader to access and change a string variable inside the loaded swf? Is there any special way to do this or would it be a simple case of loadedMC.variable = "new value"

View 2 Replies

ActionScript 2.0 :: Passing Variables From Loaded Swf?

Jun 29, 2008

so I have menu.swf that uses loadClip to bring in data.swf

Depending on what button is pressed I want menu to read menuHeight = 4600; from data.swf

in data swf I declare the var as _root.menuHeight = 4600;

and in menu.swf I try to read it as normal. menuHeight.

Shouldnt this work since the _root. of data.swf is the _root. of menu.swf?

View 2 Replies

ActionScript 2.0 :: Passing Variables To Loaded Swf?

May 15, 2011

i have a swf file that i am loading into a parent movie and i need to pass some variables to the loaded movie, unfortunately i do not have the original fla file of the movie being loaded in so i cannot use _root or _global ect..the swf that is being loaded in works fine and originally intended to have the variables passed though flashvars, is there any way i can pass these variables though the parent without having to change the fla of the loaded in swf

View 1 Replies

ActionScript 2.0 :: How To Send Variables Between 2 Externally Loaded SWFs

Sep 17, 2007

I have 2 movies 1 loaded and 1 not loaded. How do I send variables from the loaded 1 to the not loaded one when it loads?

View 7 Replies

ActionScript 3.0 :: Passing Variables To Externally Loaded SWF?

Jan 30, 2011

how can I pass variables to externally loaded SWF written in AS2 ?

View 0 Replies

ActionScript 3.0 :: Passing Variables To And From Externally Loaded SWF?

Jul 13, 2011

Then there is an external SWF that is loaded by main.swf. I am trying to get this external SWF to check the value of "myVar" and depending on what the value is, send the playhead in the main.swf to a certain frame. have it almost working, but it is giving me problems. And I am not sure it is the best way to do it.On the timeline of main.swf is a movieClip called "BG". It has 6 frames. the first frame declares that variable, and each of the other 5 frames, set the value of it. I need the external swf to check the value of "myVar" to detemine where to send the playhead of the mian.swf. So on a frame in the external SWF, I have this code:

Code:
MovieClip(parent).addEventListener(Event.ENTER_FRA ME, fl_EnterFrameHandler); function fl_EnterFrameHandler(event:Event):void { dispatchEvent(new Event("myVar_value", true)); }

[code]......

View 13 Replies

Professional :: Passing Variables To And From Loaded Movie Clips

May 7, 2010

I have a movie clip where I store a value in a variable called "yourname" and then load a different .swf file in level 1. I display the value of "yourname" in a dynamic text box, that works fine. I then move on to a frame where the user has an input text box and can re-enter a value for the "yourname" variable, and then clicks a button symbol to reassign the value. Bear in mind, "yourname" was not originally stored on this level and this movie clip, it is stored on level 0 on the first (main) movie clip.  Here is my code in the button:
 
on (release) {
_level0.yourname = String (inpt_newName.text);
}
 
inpt_newName is the input text box. My intent here is to have a "main" timeline where variables are stored, and then load and unload various .swf movie clips as needed, storing and variables (i.e. decisions) that the user makes.

View 1 Replies

ActionScript 2.0 :: Passing Variables From A Loaded Movie Clip To Main?

Mar 2, 2007

I can't seem to load a movie clip, and then pass some variables from that loaded movie clip back to through stage_mc it is loading into - to the SubClip.

The structure is as follows:

Main
>SubClip
>>Stage_mc

Where the new movie clip is loading into stage.

I need to pass two variables from the loaded clip into the SubClip. Simple vars to fill some dynamic text in SubClip.

I've done the whole _root.myvar thing, _parent, and _global.

View 5 Replies

ActionScript 2.0 :: CS3 Buttons In Loaded Swfs Loading Other External Swfs Into The Main Timeline?

Sep 11, 2009

I have a main fla file which loads an external swf into an empty movieclip on the main timeline which works fine but I want a button in the external swf to load another external swf into another empty movie clip on the main timeline.eg. start.swf loads UKEIAMap.swf into (empty movie clip within start.swf) MapLoader_mc then a button havant_b within UKEIAMap.swf needs to load HavantProjectSheet.swf into (empty movie clip within start.swf) ProjectSheetLoader_mc without unloading UKEIAMap.swf

View 3 Replies

ActionScript 2.0 :: Defining Variables - Unique To Load SWFs Instead Of Declaring All The Variables

Mar 21, 2012

I have an empty SWF that's sole purpose is to call loadMovieNum and start the project. Each loaded movie has a few variables defined within them - unique to those loaded SWFs. Instead of declaring all the variables in each SWF can I declare all of them in one place, in the first frame of the empty loader it all starts from? I'm thinking I can then declare a variable which each loaded movie can increment as needed for me.

View 2 Replies

ActionScript 2.0 :: Loading Other Swfs From Loaded Swfs?

Aug 2, 2006

Flash - 8 : Above is an example of what I would like to do/have done. I've gotten as far as loading the "loaded.swf" into the "start.swf" but my problem is I'd love to use that little loading action I made earlier without copying and pasting into the new movie the same actions for a different link. So, how do I load "loaded2.swf" into "loaded.swf" via the link in "loaded.swf"?

View 1 Replies

ActionScript 3.0 :: Parameter Passing Between Two SWFs?

Jan 27, 2009

The problem I am currently having right now is the inability to send variables loaded from the LoaderSWF to the SWF that has been loaded.

Concretely speaking, I have an embed script on an HTML page that contains several variables in the FlashVars line. The embed script loads a file called loader.swf. Loader.swf's main responsibility is basically take those variables from the flashvar, load the game URL and pass along the rest of the necessary parameters to the game that the loader is loading. However, I've been working out several solutions and none of them worked the way I wanted to.

The embed script is as follows:

Code:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="550" height="450" id="game-player">
<param name="movie" value="/shockwaves/loader.swf" />

[Code]....

how can I load the game SWF file and send along additional parameters with that request? Is there someway I can punch in variables into the myLoader object?

The code I came up with sends along the authenticity token just fine, however, it is not sending score_url correctly. I'm not sure if that is the correct behavior, but please enlighten me with any insights you may have.

I have also considered trying LocalConnection, but the problem is that I do not have the necessary source code for the games to set up LocalConnection on the receiving end.

Also, the game files are using AS2, while the loader is using AS3. The game files read variables by utilizing _root.score_url, etc.

View 1 Replies

ActionScript 2.0 :: Passing Xml Files To Swfs?

Feb 2, 2004

I have a main movie with a dynamically created menu (uses data gathered from an XML file). Each menu item has an Action and Variables associated with this action.

Code:
<?xml version="1.0"?>
<menu name="mainmenu">

[Code]...

Now as you can see from my XML file above one of my menu options is a photo gallery. What I would like to to is have one swf, i.e. photoGallery.swf, and load this into an empty movie clip called content_mc and pass it different XML files (same format, but different content). (see my loadSlideShow() function)

View 14 Replies

ActionScript 3.0 :: Loaded Swfs Not Working When Loaded Through Xml?

Jun 10, 2010

I have a "photo" gallery that loads numerous SWFs through xml, one by one on click. All works fine. All my SWF work fine stand alone. But when I load them into the player, many swf dont work properly.in example, I have textinput textfields in many of the swfs, which work fine on their own but not when loaded into the player. Then I have a word search game that works fine when alone, not when in player. I can see there is something as my mouse cursor changes into the "button finger", but nothing visual.

All drag and drop assigments work fine etc. I have no idea whats up. I have receantly switched to as3 and in as2 there was _lockroot declaration that solved similar problems, but now in as3 (where it supposedly should be automatic) it doesnt work. As it seems that it cannot recognise it own stage value, or selection_focus when loadedinside another swf through xml.Using cs4, as3.

View 4 Replies

ActionScript 2.0 :: Adding Mute Button - Passing Variable In SWFs

Feb 10, 2008

I have a client who wants to add something to a flash presentation that is almost done. There is a root swf that is pulling in a nav screen swf, which in turn is pulling in the text screen swf of that corresponding nav swf. So at the start, the root swf automatically loads nav1.swf, and nav1.swf automatically loads text1.swf. Once that plays, the next button loads nav2.swf into the root swf, and in turn, nav2.swf automatically loads text2.swf onto it. I hope that makes sense. So all the text is going to be on the screen with pix, etc, and we are going to have a VO speak the text. The VO will be on the text swf files since there is fading of pix, text, etc and we need it to match. With it almost done, the client wants a mute button added to the thing.

The question is, if the mute button is on every text swf file, is there some variable that I can pass that would keep the next text swf file from playing it's VO? The client doesn't want people to have to keep clicking the mute button with every page. I know, I know, if I knew they wanted a mute button, I never would have built it this way. It's going on the web, and I figured for loading purposes, this was the best way. Now I think Im screwed... Or rather, they are. They approved this. But can it be done? Can I pass a variable from either the root swf or the navs swf files that tells the incoming text swf files to stay muted?

View 5 Replies

ActionScript 2.0 :: F 8 - Passing Variables From One SWF To Another?

Feb 8, 2009

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 Replies

Passing Variables Between .swf Files?

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

ActionScript 3.0 :: Passing Variables On URL?

Jan 6, 2010

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].....

View 14 Replies

ActionScript 2.0 :: Passing Variables Between Mc?

Jul 21, 2010

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 Replies

Passing Variables Between MovieClips?

Sep 6, 2010

I'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].....

View 3 Replies

ActionScript 3.0 :: Passing Variables Between Two Swf's?

Nov 25, 2008

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]...

View 1 Replies

ActionScript 3.0 :: Passing Variables To PHP

Nov 17, 2010

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]...

View 5 Replies

PHP :: XML - Passing Variables From Flash

Sep 4, 2010

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] .....

View 1 Replies

ActionScript 3.0 :: Passing Variables To PHP?

Nov 19, 2010

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 four days.. Here's what I have done.

header.fla [Actionscript in the timeline]

Code:
stop();
import flash.events.Event;
import flash.display.Sprite;

[Code].....

View 5 Replies







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