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


Similar Posts:


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

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 :: Prevent Users From Viewing Site And Then Simply Going Into Their "temporary Internet Files" And Stealing Swfs And XML Files

Feb 5, 2009

I am trying to prevent users from viewing my site and then simply going into their "temporary internet files" and stealing my swfs and XML files. I have been using a great .PHP code to stop this but now I am working on a server server that only uses .aspx files. Does anybody know of a way that I can stop files from being stored in the "temporary internet files" folder. I have encrypted the files but this is not good enough.

View 0 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 :: 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 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 3.0 :: Linking Swfs Or Exe Files?

Jun 17, 2011

I needed to break it in smaller pieces because it is a large file (over 300 mb) and every time I wanted to publish the entire project flash crashed.
 
Here is my test: I have two exe files that should link back and forth. Intro_YIM.exe, which has a button that links to Videos_FrontPage_YIM.exe Here is my code, which is in Intro (button name= nav_4).
 
[code]...

Problem: The link seems to work, but there is a message that says save or run. When I click run, there is another message that says the file can't be open.
 
Questions:

1. Is there a better way to handle links using executable files using Flash CS5 and AS3?

2. If swfs were used, how can I have a main page displaying all other swfs as they are linked?

View 5 Replies

ActionScript 2.0 :: Pass 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">
<item name="Home" action="gotoURL" variables="http://www.something.com

[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

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

IDE :: Passing Variables Between SWF Files?

May 21, 2009

I have a flash file that I made that displays a scrolling newsfeed (I'll call it newsfeed.swf)... I published it to an SWF. Now, I created a new flash file that I would like to use to show many instances of newsfeed.swf. In my new flash file, I have the following code:

this.onLoad=function(){
mcNewsfeed.loadMovie(http://www.whatever.com/newsfeed.swf?s=MSFT);
}

In theory, when newsfeed.swf starts up, the ?s=MSFT variable should be passed in at the _root level such that I should be able to reference it and build the newsfeed to be displayed dynamically. I've tried several different things, but no matter what I do, the following code (the _root.s part) in newsfeed.swf returns "undefined":

newsfeedURL = "http://finance.yahoo.com/rss/headline?s=" + _root.s

I would prefer to not have to pass XML files between the swf files or use system objects as that would add a level of complexity I'm not ready to deal with (I'm a total noob at this stuff)...

View 2 Replies

ActionScript 3.0 :: Load Swfs With LoadMovie Into Files?

Apr 7, 2009

is it possible to loas as3 swfs with loadMovie into as2 swf and keep them working? i have a whole as2 swf website and i want to embedd an as3 flv player....

View 1 Replies

ActionScript 3.0 :: Passing Values Through XML Files

May 21, 2010

What I'm trying to do is this: "profilename" is the name of the attribute in the XML file I want to pull from. The XML file looks like this:

[Code]...

I'm trying to pull from the profilename attribute in the test.xml file, so I'm wondering if it's possible to pass in a value/argument in the addEventListener function as I defined above. Is this possible at all to do? I hope my explanation makes sense.

View 2 Replies

IDE :: Passing (URL) Variables Between Two Swf (html) Files?

Mar 22, 2009

how do I passing variables between two swf (html) files For instance how can I request the variable "var_1" in the file blikvanger.swf (or blikvanger.html).Here is my code of one as file (contact.as):

Code:
...
homelink.addEventListener(TextEvent.LINK, linkHandler);
homelink.htmlText = "<a href="event:../blikvanger.html">THUIS</a><br>";
homelink.styleSheet = myCSS;

[code]....

View 5 Replies

ActionScript 2.0 :: Passing Variable Between Two Files?

Feb 3, 2011

I have a text field eWeight.txt in "a.as" and I need to pass the user input from this text field to antoher file "b.as". I'm using Actionscript 2.

View 1 Replies

CSS :: Flex - How To Compile Multiple Files Into Individual SWFs

Jun 18, 2010

Right now I am using an apply task inside of an antrun execution.

<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.4</version>
<executions><execution>
<id>compile-default-theme-css</id>
[Code] .....

How do I do this in pure maven? Without the antrun plugin?

View 1 Replies

AS3 :: Flash - How Are SWFs Are Compiled From External .as Class Files

Oct 5, 2011

In the Flash app I'm building, I have a "main" SWF that will load a variety of "child" SWFs.

All of the AS3 code for both the main SWF and child SWFs is contained in external .as class files.

In other words, each movie has it's own document class .as file.

There are also a number of .as class files for all of the common elements (e..g, UI buttons and controls).

So - for example - both my main SWF and all child SWFs use the "MyCommandButton" class; the code for this class is in MyCommandButton.as, which all SWFs reference (import).

Here's what I don't understand.

(Let's say that the code in MyCommandButton.as draws buttons that are red.)

First, I compile ALL of the child SWFs.

Next, I change MyCommandButton.as, so that the buttons it draws are blue, instead of red.

Then, I compile the main SWF.

When I run the app (main.swf), I would expect all of the buttons in the main SWF to be blue (since that's what MyCommandButton.as specified when main.swf was compiled), and all of the buttons in the child SWFs will be red (since that's what MyCommandButton.as specified when they were compiled.)

Instead, ALL of the buttons are blue, which means the change I made to MyCommandButton.as affected all of the child SWFs, even though I didn't recompile them.

View 1 Replies

ActionScript 2.0 :: Remote SWFs May Not Access Local Files

Feb 4, 2007

I have this situation (simplified):
MC-A.swf opened from local computer (C:/) and loads MC-B.swf which is hosted on a server.
When MC-B.swf is loaded, it tries to access file called "loader.swf" which is also on local computer (C:/).

When it tries to access the "loader.swf" I get the following error message:
*** Security Sandbox Violation ***
Connection to file:///C|/loading.swf halted - not permitted from [URL]
-- Remote SWFs may not access local files.

I read discussions concerning this issue, and as I understood, I could use:
System.security.allowDomain("[URL]");
to solve this problem, but it didn't work.
I wouldn't like to change the loaded file to load it's resources also from the web, since it can find them on the local machine.

View 4 Replies

ActionScript 2.0 :: Class Files Caching In External SWFs

Jul 30, 2009

The problem is class files being cached in external swfs when they are loaded into another swf. (as2-cs3). In a nutshell, we've got a clip on the stage that is linked to a class. You can make changes to the class, pub the swf and everything works fine. When we then load that swf into our application swf, the changes are all lost, and it "reverts back" to a previous version of the class.

View 9 Replies

ActionScript 3.0 :: Remote SWFs May Not Access Local Files?

Aug 18, 2009

lod.load(new URLRequest(str2));how to unload the lod when second time i cal that function.how to over come this (*** Security Sandbox Violation ***SecurityDomain )

View 1 Replies

Actionscript 3 :: Passing Informaton For Files With Loader?

Jan 12, 2010

I'm using Loader to get the image data out of a ByteArray. The problem is that I need to store that image data with a name (which is known beforehand) once it's passed to the complete handler. Since the operation is asynchronous, I can't be sure which image of multiple will finish loading first, so it seems I need to pass the information with it somehow... I can't seem to find any properties of Loader that pass any vaguely useful information along.

Any recommendations on how I might accomplish this?

View 4 Replies

ActionScript 3.0 :: Passing Variables To External Swf Files

Apr 14, 2011

I am loading an external child swf file into a MovieClip container in my main swf.I have a button in my child swf that when clicked, needs to be able to access a movieclip or variable that is in my main parent swf. How would I do this??

View 1 Replies

ActionScript 2.0 :: Passing Vars Between 2 Separate .swf Files?

Jan 6, 2007

- in the parent.fla i created a dynamic txt box and var String named 'txt', this initialises the dynamic text box content to say "parent value".

- in the child.fla i tried to assign and send a new string value i.e. "child value" to 'var txt' which in found within parent.fla. At this point if everything was to work fine the dynamic txt box in parent.fla should output "child value".

View 4 Replies

ActionScript 2.0 :: Passing Vars Between 2 Html Files?

Aug 16, 2003

I have 2 HTML files with embedded flash movies. One HTML file is the main area (main.html) with a flash movie called gallery.swf which has a grid of thumbnail pictures, and the second HTML file (popup.html) is a pop up chromeless window for enlarged images depending on the thumb's the user clicks. Essentially I need to pass variables to popup.html and ulimately its embedded movie enlarged.swf. These variables will basically be id's of the clicked thumbnails which I will use to locate the correct enlarged images on the server to load into into a container clip within enlarge.swf.

View 3 Replies

ActionScript 3.0 :: Share External Class Files With Multiple SWFs?

Sep 9, 2010

Is there a way to share common .as files with multiple swfs?

View 5 Replies

ActionScript 2.0 :: Preloader And Transition For Dynamic Files AND Transitions Between External SWFs?

May 15, 2008

ANYONE KNOW HOW TO Preloader and Transition for Dynamic Files AND Transitions Between External SWFs MIX TOGHETER...

View 1 Replies

ActionScript 2.0 :: Multiple File Preloading By Passing It An Array Of Files To Load?

Jul 15, 2006

I wrote this script a while ago and it's worked extremely well for me ever since. I use it in nearly every project I do. But the other day I was asked to do a project where I could only use Flash 7.

This is a class I made to easily handle multiple file preloading by passing it an array of files to load. It only has two useful methods. One gets you the current total progress (total of all the files 0-100%) and an onLoadComplete. The actual usage is in the top of the file. It works great under Flash 8, so go ahead and use it.

View 3 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







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