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


Similar Posts:


ActionScript 3.0 :: Pass A String Variable To A SWF So That Can Specify A XML File To Load

Jun 14, 2010

I want to pass a string variable to a SWF so that I can specify a XML file to load without republishing the SWF. When I assign the string variable to a textfield it is correct.But when I use that variable in the loader it does not display the XML from that file.You can see below that I commented out the string "lesson_11/images/0301_objectives.xml".If I put this string in the loader it works, if I use the string variable in its place it does not work.

Code:
var xmlFileToLoad:String;
var myQueryString:Object;

[code].....

View 1 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 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 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 2.0 :: Create A String Then Use It To Reference A Variable In An External Text File

Jan 19, 2011

So i have an external text file organized like this:

/* $file: data.txt */
&title0=Sacrum
&detail0=Detail text for Sacrum
&title1=L5

[Code].....

There are 28 of these 'title' and 'detail' pairs. The 'title' text is to fill a dynamic text box and the 'detail' to fill another dynamic text box depending on which section the user is mousing over.

My issue is getting the text from the file stored into arrays. For my test loop I keep getting undefined as the stored value, and i know it has something to do with converting a string value to object..

var lv:LoadVars = new LoadVars();
lv.onLoad = handleDataLoad;
lv.load('data.txt');
function handleDataLoad (success:Boolean) {

[Code]....

View 1 Replies

ActionScript 3.0 :: Pass A Variable Between AS File And Fla File?

May 1, 2009

How do I pass a variable between .AS file and .fla file?

View 7 Replies

Flash - Pass Variable From .swf File To .as File?

Nov 1, 2011

I have a main in .as and I load .swf in my .as.It's Working fine,Now I want the take variable From .swf and Pass it Into .as.

My .swf file coding

function formatMessage(chatData:Object)
{
var number:uint = chatData.user;
trace(chatData.user);

[Code].....

View 2 Replies

Locate And Check The Date Of An External File (either .exe Or .swf) And Return That Date String To A Variable In Flash

Dec 11, 2009

I'm using flash CS4 and actionscript 2.0. I have a situation where I need to locate and check the date of an external file (either .exe or .swf) and return that date string to a variable in flash. I then need to display that date to a piece of dynamic text within the flash file. Is there a function within action script that will check and retrieve the file date of an external file.

View 4 Replies

ActionScript 3.0 :: Declare A Variable In PHP And Pass That Variable To My Flash File?

Mar 5, 2010

I am trying to do is declare a variable in PHP and pass that variable to my flash file. Right now i am simply trying to do 1 easy variable, more will happen in the future but i need to figure this out first.I have used other forums and they say try this and that, but nothing i do seems to work. here is my code.

PHP Code:[code].....

View 8 Replies

String :: Flex - Download A String Variable As A File To The Local Machine?

Sep 21, 2011

I have a String variable in my flex (flash builder 4) application containing CSV data. I need to allow the user to download this data to a local file. For example, giving them a "csv" button to click and it might present them with a save file dialog (and I would be sending the contents of my string variable).Is this possible / how ?I am using the ResuableFX component for the datagrid to csv. This the code I ended up with that works to save the string to a text file for the user (in a web browser):

var dg2CSV:DataGrid2CSV = new DataGrid2CSV();
dg2CSV.includeHeader=true;
dg2CSV.target=adgEncounters;

[code]......

View 1 Replies

ActionScript 2.0 :: Showing Entire XML File Display As String In Dynamic Text Field (XML To String)?

Nov 24, 2009

Basically I'm trying to output the contents of an XML document into a dynamic text field (as loaded - not just its node values and content - the entire thing - into a variable called _root.log). The text field is set to show the variable value of _root.log.This is the actionscript...

PHP Code:
var newProfileXML:XML= new XML("<contacts result='true'><contact name='John Doe'/><contact name='Jane Doe'/></contacts>");

[code].....

View 2 Replies

ActionScript 3.0 :: Passing Dynamic File With Different Names To SWC Object?

Nov 4, 2009

I have a flex application that reads from external XML file(URL loader) and displays graph. My xml file is dynamically generated using PHP and the filename=currentloggedin user name(i.e. username.xml).How should I load the xml into SWC? Will Flashvars work? I have a HTML page that has PHP code to get username and the same file embes the swc. How to pass the PHP varibale to my SWC?

View 0 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 3.0 :: Have An External XML File Which Holds A List Of Names?

Dec 5, 2011

I've done some googling for the past hour, but I can't seem to find what I need.Maybe I'm overlooking something.I want a very simple, basic thing. But I have no clue how to do this.I have an external XML file which holds a list of names.I want these names to be pushed/added to an array so I can access it based on it's position in the array. (A for loop is used to read a different XML file and the child[i] is named after the same array spot, childName[i]

View 10 Replies

ActionScript 3.0 :: Pass Variable From It To Php File?

Apr 8, 2009

I am trying to send a single variable from a flash application to a php file. The user input field in flash will send a variable to the php file for purging of the database. The following returns nothing. There is no error. I believe the error is in the php and not the flash. Here is my actionscript for the flash[code]...

View 7 Replies

Flash :: Pass The Variable From One Swf To Another File?

Nov 2, 2011

I'm trying to pass a variable from my main swf to another one that's being loaded in a container in the main swf.I follow this Link,Its Working Fine,My problem is, if i declared the variable within the function i Cannot Access the Variable.

[Code]...

View 2 Replies

ActionScript 3.0 :: Pass Variable From One Swf To Another .as File?

Nov 1, 2011

I have main in .as file, in that file i loaded the .swf file now i want to take the values from .swf and pass it into .as file how can i do this? Here my Coding !

[Code]....

View 6 Replies

Flex :: Load Variable From A File & Pass As Arg Value In Ant Build

Nov 29, 2010

What I want to do is load the contents of a file and sent it to an mxmlc compiler as an argument parameter. I can load and read the contents of a file using loadfile and setting a property value say propery="filecontent". But the problem is I can pass it into the mxmlc (flex) compiler. I'm not able to pass it (tried with ${filecontent}) to the arg line. Its gives an error: "value contains unknown token 'filecontent'" How will I pass the contents of the file as a argument value to a compiler argument? Edit: The problem is with the include-resource-bundles arguments. When using command line it works. But using ant build doesn't. Do we need to manually provide the name of resource bundles by generating the resource file?

<exec executable="${MXMLC}" dir="${APP_ROOT}/src" >
<arg line="-locale 'en_US'"/>
.. .. ..
<arg line="-include-resource-bundles

[Code]....

which doesn't work and gives and error -> command line: Error: configuration variable 'include-resource-bundles' value contains unknown token 'resources'

View 1 Replies

ActionScript 3.0 :: Pass Variable From Class File To Flash?

Dec 21, 2011

I am adding some movieclips dynamically to stage. If we click on the movieclips, they goto and stop at frame 2. The Click Event for the Movieclip is defined in the base class

Code:
package {
import flash.events.MouseEvent;
import flash.display.MovieClip;

[Code].....

But, I cannot figure out how to get the name of the movieclip.

I cannot add click event for movieclips in flash, because there is already a click event in the class file.

View 1 Replies

ActionScript 3.0 :: Pass A Variable Value Contained Within A MovieClip To Class File

Dec 13, 2009

I need to pass a variable value contained within a MovieClip to my class file. The MovieClip is my preloader, to which my code will show that upon the initial launch of the SWF. Until the variable is sent, my code assumes the preloader is still running and therefore will not progress. Originally, it was working when I had my class file extend MovieClip and then used this code in the preloader MC:

[Code]....

View 1 Replies

ActionScript 1/2 :: Pass Variable Into HTML To Play A Flash File?

Feb 17, 2010

I'm trying to create a simple SWF file that can receive the name of a FLV file in the HTML file and play it since I have many FLV files.  Basically using the technique of FlashVars.  I've set the contentPath/source in the components to be blank, and set my actions in the first frame to be player.source = filename, as was instructed to do so in a Flash book I am reading. I then set the "filename" variable to a file in the same path as the web page in the HTML file, however, all I get is a blank Flash player skin.  The FLV file will not load.  I also tried setting the "filename" variable to load the FLV from a public website in the same domain and on another domain, but it still doesn't work.

View 5 Replies

ActionScript 3.0 :: Load External File To String?

Sep 14, 2009

I'm completely new to Actionscript 3, and I can't seem to figure out how to do nothing more than load a string of text into the code and into a variable.

I just need a way to get the contents of "somefile.txt" into the variable "someVariable".[code]...

View 2 Replies

IDE :: Write String In External Text File Using Cs4?

Dec 30, 2009

i want to write string into external txt file in cs4.how to write String in external text file.i am not interest do in php script with flash for write textfile.

View 2 Replies

IDE :: Pass A String To A Function And Use Its Value As The Variable Name?

Dec 21, 2009

Is there any way that you can pass a string to a function and use its value as the variable name you wish to change. For example.

Code:
var text:String = "Goodbye World";
function myfunction ( varToChange)
{
varToChange = "Hello World";
}
myfunction("text")

View 2 Replies

ActionScript 2.0 :: Pass String To Variable

Mar 12, 2006

I'm creating a webpage where all the content is within the same swf. In order to get things to work I have all my different content in different MC's. Each of those separate MC's have two frames inside. One where it's empty and the other where the content is displayed. To make this work I have a variable name 'page'. My menu is supposed to pass a string to this variable and at the same time trigger a transition to be played ('doors' sliding over and hiding the stage).

Then the transition sets all my content MC's to the hide position. Then it checks what the page variable is and sets the corresponding content MC to show before the 'doors' open again. At least that's how it's supposed to work in theory. But I haven't figured out how to do all this. First off I don't know how to get my menu to pass that string to the 'page' variable. Here's my menu with the problem area marked:

[Code]...

View 6 Replies

AS :: IDE - Pass A String To A Function And Use Its Value As The Variable Name

Mar 18, 2009

Is there any way that you can pass a string to a function and use its value as the variable name you wish to change. For example.

[Code]...

View 1 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 3.0 :: Flash - Pass Variables From One Movie Clip's AS File To Main AS File?

Jul 7, 2010

how to pass variables from one Movie clip's AS file to my Main AS file. Let say my Movieclip's AS file is calling damage = 1; so how the Main AS file retrieve the damage value from the Movieclip's AS?

Code:
public class robotMC extends MovieClip
{
public function robotMC()
{

[code]....

View 5 Replies

ActionScript 3.0 :: Access/pass Variables'(s) Of A .swf File Into Another .swf File?

Apr 1, 2009

I have basic knowledge of Flash and AS3.0. Suppose i have a flash swf file(main.swf). In this main.swf file, i loaded another swf file(sub.swf) by writing the following code snippet in main.swf file as shown below:

var textLdr:Loader=new Loader();
var noteUrl:String = "AddNote.swf";
var noteUrlReq:URLRequest=new URLRequest(noteUrl); textLdr.load(noteUrlReq);
addChild(textLdr);

Now, how to acess the data present in main.swf into sub.swf.Note: Here data represents values/data stored in variables/objects of main.swf file.

View 3 Replies







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