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


Similar Posts:


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

IDE :: Passing Variables From Form To Php File

Sep 22, 2009

I have 5 scene's in my flash the first 3 scene are animations. 4 th scene has 4 textinput Box 1 chk box, 1 button.. in this scene i am passing varibles from my form to php file. here is the code For scene4( i called this Inscription form) Its getting datas perfectly.

[Code]....

View 2 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 Variables In From The Flash File?

Jul 9, 2008

I am trying to pass a variable into my flash from my html code. In my html flash code I have a variable "id" with a value:hotels. HTML Code:hotel_carousel.swf?id=hotelsIn my flash movie I want to use the value "hotels" in my xml.load() funtion. But I am having some trouble and I think it has to do with strings. But I am not sure.

Code:
//id = "hotels"
trace("id = "+id);

[code].....

View 1 Replies

ActionScript 2.0 :: Passing Variables To A Flash File?

Sep 30, 2004

I have used the kirupa tutorial for passing variables to a flash file, which in theory all makes sense, however my code only appears to partially work.. this if from frame 1 of the movie:

if (movie=="" or movie==1) {
_root.section = "image1.swf";
}if (movie==2) {

[code]....

It'll load image3.swf if i use myfile.swf?movie=3 but any other variables will result in the else running (even no value).

View 6 Replies

Php :: Passing Variables To Actionscript From MySQL To Play A Audio File?

Nov 26, 2010

How can you bring in a path as a variable from php? I have hundreds of mp3 file names stored in a My SQL database and I want to call the name, load it into a variable and then have it replace the URL in the call to the sound file. I am all set with the PHP and database side of things, but I have been frustrated with the Flash part. I think it would just involve passing a variable from php to flash. The web pages we are building would eventually have 10 - 15 files per page and each one would have a different sound file and a different image that you could click to trigger the sound. First click would start the file and the second would stop the sound. The images and sound files are all stored in the database.I found this code on another post and it is basically what I want to do. Still missing the button part, but if I can figure out the variable from PHP I think it will open up a bunch of new options.

var soundRequest:URLRequest = "path/to/file.mp3"; //the path would be a variable passed from the database to php and then to the actionscript
var s:Sound = new Sound(soundRequest);

[code]....

View 2 Replies

ActionScript 2.0 :: Passing Parameter To .exe File (external)

Apr 18, 2004

I have a .exe file (it is a player) i need to pass a parameter to this player so it could play a specific file ( the parameter is the name of this specific file ).

now what i do in windows is

Start>run ( <full-path-to-.exe-file><space><parameter> )

now that works perfictly on windows.

what i need is to be able to start this application ( the player ) and pass the parameter to it, all through a flash button (from the flash player )

View 3 Replies

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 :: Passing Buttons Names To External .as File?

Jun 5, 2011

I am working on a project where I have on the stage 8 movie clips, and when hovered, they are to shake. I have made this into a class, and placed the code as an external .as file.

Each movie clip is named shaker_mc - shaker_mc7

I have also gone in and changed all of the button movie clips base classes to ShakeButton.

Right now I am getting a couple of errors, and I believe all i need to do is pass the buttons names to the class in the external .as file, but I am not sure how to do that? I had everything working without the external script, but I did not want to have to create the effect for each button.

The erros are:

1120: Access of undefined property shaker_mc.

Here is my code for the ShakeButton.as file

ActionScript Code:
package{ 
import flash.display.Sprite; 
import flash.events.MouseEvent; 

[Code]......

View 3 Replies

ActionScript 2.0 :: Passing Variable From External .txt File To Field Name

Jan 19, 2008

probably a hugely embarrassing beginner question, but I can't seem to find an answer anywhere. I think it's probably (hopefully?) just a syntax problem I'm loading the content of a dynamic text box from an external .txt file and I'm trying to find a way to change the content from a link in the .txt file (if that makes sense). The code I'm using to change the dynamic text box at the moment is:

[Code]...

View 1 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 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 :: 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

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

ActionScript 2.0 :: Loading Variables From PHP File?

Nov 13, 2009

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.

View 0 Replies

ActionScript 2.0 :: Loading Variables From A Txt File?

Oct 24, 2002

I'm trying to load some variables dynamically from a text file, when a button is pressed. They will not load on first press , but on second or subsequent presses they will.

numCatalog=0;
portf4.onRelease = function() {
loadVariables("images/cg.txt","");
trace(numCatalog);
};

View 1 Replies

ActionScript 2.0 :: Use Variables From An External File?

Jan 13, 2002

I want to load an additional movie into a first one (using loadmovie), and this one has to use variables from an external file (like data from a mysql database or whatever)If I only load the additional swf without the first one everything works fine, but if I try to play the whole thing it ist not.

View 5 Replies

ActionScript 3.0 :: Loading A CSV File And Accessing The Variables?

May 6, 2009

I'm new to AS3 and dealt with AS2 before (just getting the grasp when the change it). Is it possible in AS3 to load an excel .csv file into Flash using the URLLoader (or ???) and the data as variables?I can get the .csv to load and trace the values (cell1,cell2,cell3 but I'm not sure how to collect the data and place it into variables. Can I just create an array and access it like so.... myArray[0], myArray[1]? If so, I'm not sure why it's not working.
 
I must be on the completely wrong path. Here's what I have so far..

[Code]...

View 2 Replies

Actionscript 3.0 :: Loading Variables From Text File?

Apr 20, 2009

the variables from the text file are loaded in swf and in dreamweaver the swf throws an error

Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.
at Error$/throwError()
at flash.net::URLVariables/decode()
at flash.net::URLVariables()
at flash.net::URLLoader/onComplete()

I understands this is because of flash player security and need to place crossdomain.xml file. but the my doubt is where to post my crossdomain.xml file in the local machine(to check the swf) and also in my website for the rest.

View 1 Replies

ActionScript 3.0 :: Loading Variables From Text File

Apr 21, 2009

I want to get some leaders name from text file as variables using URLLoader.load() the application is working fine while testing TestMovie from flash but it's not working in html page and throws the following error even i read articles about crossdomain policies.;[code]

View 2 Replies

ActionScript 2.0 :: Loading Variables From A Text File?

Jan 28, 2009

I'm trying to load a single string from a text file, but I can't seem to get it to work.Code (Placed On Top Level):

PHP Code:
var Items:Number = -1;
var variable:String ="test";

[code]....

View 1 Replies







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