ActionScript 3.0 :: Automating Multi-file Flash Using XML File "run List"

May 2, 2011

I've created a multi-file interactive Flash "demo" for a client. It's very much like a website (though he's not using it as a website) in the way that it is laid out in that there is a main index page which can then direct you to different product categories, which you can click on to see. Each "page" contains product (or product category) information, photos, block diagrams, etc. There is nothing animated in the Flash.
 
My client also wants to be able to set it up so that the demo runs automatically from a configurable XML file. My ActionScript skills are pretty limited, but I've been able to using ActionScript 3 to load and read the XML file. Using a 'for' loop, I am able to read the XML file and return the path of each Flash file and the duration that each file should be displayed (my client requested that he be able to configure the duration of each page as well).
 
I've set up a loader for each movie clip and a timer for the display duration. Unfortunately, the thing that is throwing me off is that when I attempt to load the movie clip (as the last item in the for loop), it reads the entire XML file, returns all of the clips and durations (I'm using trace to see this) before it loads the movie clip. As a result, the only movie clip that is loaded is the last one read from the XML file.
 
As I said, I'm not very good at ActionScript, so everything that I've managed to cobble together has been from internet tutorials.
 
This is my code:
 
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded); 
var mcLoader:Loader = new

[Code].....
 
I removed the timer event because it, like everything else was getting repeated before anything got loaded, so I wanted to figure out out to get the clip loader (mcLoader) to load the movie clip for each file before I figured out where to put the time to ensure that each clip is displayed for the appropriate duration. I suspect that the timer event needs to occur in the 'playClip' function, but would take advice on that as well.

View 2 Replies


Similar Posts:


Flash :: Automating Process In AS3 - Edit Each File To Remove It

Mar 11, 2011

I've got twenty .swf files and respectively .as extensions of them. In each file there's my e-mail, but I don't have access to that e-mail anymore, so I want to edit each file to remove it. Is there any way I can change my e-mail in twenty files and compile them afterwards in an automate process via some script ?

View 1 Replies

Multi File Preloader - File Start Loading Files But Does Not Loop?

Jan 6, 2010

what I'm trying to do is make a preloader that will preload about 20 external SWF files before it lets you get to my main file. I want to do this because my main file needs the SWFs to be ready to go once its done loading. I have looked around and i found a few ways to do this with the "if (loadedBytes>=totalBytes)" and the code loops back till the files are done loading... this would be just what i need but i cant seem to get it to work. the file just seems to start loading my files but does not loop and just runs the time-line even once i state what frames i want it to loop.

View 6 Replies

Asp.net :: Flash Multi-file Uploaders?

Sep 22, 2011

I am considering using the MultiPowUpload control from element-it on a project, as well as perhaps on a second. Does anyone have any feedback on that particular control? Does it actually work as advertised, handle errors well, etc?Multi-select of files (from a single 'browse' click, not multi-textbox)Progress bar (client requirement)ueue for upload (it's ok if it can only upload immediately)
Feedback from server - custom error messages (permissions,etc)Pass the session ID automatically, but I can use a URL hack for the upload page too Be able to remove files from the queue Support large files (~50MB, really up to 300mb would be perfect) Accessible/usable JS api
Can change the view style a little bit at least! Localizable - we need english, chinese, italian, and possible a few others Resume incomplete transfers (eg, connection dropped, so on, not required, but ++)I've been working with all of these below, and gotten most of them working in demo pages, finding issues as I go along.

[code]....

PL UPLOAD WON - for now! If we get complaints, or find it doesn't work in our real life scenarios, then we'll consider switching to MultiPowUpload. But it is good enough, and we can write some JS to do a few of the missing things. With chunking I had no problems with 300mb uploads. Yay.

View 1 Replies

IDE :: Multi Loading Bar In One Flash File

Jul 1, 2009

I have flash file contains 2 Scenes. First one is a flash intro Second one is the website how can i make a loading bar for both of them? i mean when i start the website ... there loading for the intro ... with skip button ... if i clicked on it ... i'll get the second scene which it is the website and it will get loading bar as well. or i need any way to do multi loading bar in one flash file

View 3 Replies

ActionScript 3.0 :: Flash Project Multi File Preloader?

Feb 10, 2011

i have an index.fla page and will be about 10 .swf files to load into it, they will be large videos witch need pre loading. I have read lots of threads all over the place and have tryed lots of ways.The simplest way i have found so far works but gives me the error :

TypeError: Error #1006: value is not a function.
at MethodInfo-8()

after i have loaded the 1st vid intro witch then using a dispatchEvent(new Event("allDone", true));realays the info to the index file and loads the movie but the percent timer stops working and gives the error above. I have the following code

.as file

Code:
package package1
{
public class page

[code]....

View 7 Replies

Actionscript 3.0 :: Multi Select File Upload With Flash And PHP?

Mar 9, 2011

how to build an AS3 multi file select upload that uses flash and php.

View 5 Replies

Flash :: Pdf - FOSS Based Multi File Format Viewer

Sep 4, 2011

Firstly this question has been asked a while back, and given the time there are probably newer options and improvements. Flash pdf viewer Googling seems to offer a number of tools that are a combination of executable that converts to a base format and an accompanying viewer.

[Code]...

View 2 Replies

Python :: Write Bulk Of Data Into Xml File From Backend And I Want To Bind The Xml File Into List?

Apr 19, 2010

I want to write the bulk of data into xml file ,the data coming from the backend(mysql) using cgi by httpservice, read the xml file and bind it into list. can anyone send the sample code for this?

View 1 Replies

ActionScript 2.0 :: Combobox & List - Each Selection Triggers The Specific Xml File To Load Into The List Component?

May 10, 2007

I have a combobox and list component on the stage. The combobox has 3 selections. How do I get it so that each selection triggers the specific xml file to load into the list component? I can't get them to communicate to each other.

View 1 Replies

Media Server :: Only Use One Multi-rate File When Using V4?

Sep 27, 2010

I am planning to upgrade to FMIS v4. Currently, I am using v2 and encoding separate files for each bit-rate ( i.e. 100K. 400K, 700K). Can I encode all audiences to one file like Windows Media P layer,have FMIS stream that file, and have the local Flash Player detect the correct version and stream it?

View 2 Replies

ActionScript 2.0 :: Multi File Upload Form?

Dec 21, 2007

I have been working on the multi upload form over the past couple of days. It's a variation of stuff i have found about the net. The form has to buttons. One for single file uploads and one for multi file uploads.The single file upload button works as it is supposed to but the multi file upload but although does upload all selected files it does not fire off any events.

[Code]...

View 4 Replies

ActionScript 3.0 :: Error Reading Multi-line .txt File?

Apr 26, 2010

I'm reading a 2d array from a .txt file, this is what I do:

Code:
[Embed(source = '../lib/lvl1front.txt', mimeType = "application/octet-stream")]
private var frontTxt:Class;

Then a bit further:

Code:
var fgString:String = new frontTxt();
foreGround = stringToArray(fgString);

The stringToArray function is where things go horribly bad:

Code:
private function stringToArray(input:String):Array
{
var output:Array = new Array();

[code]...

Notice the starting comma on every line except the first? I think it's the newline character somehow interfering, but I've tried everything I can think of, and nothing has helped.

View 3 Replies

ActionScript 3.0 :: Direct Flash MP3 Player To Get Song List From XML File

Nov 12, 2010

What do I need to put in my code to tell my mp3 player to grab its songs from a folder on my server via an xml doc I outputted from my sql server? (The mp3 player is also on the server).

Here's my code:
import flash.events.MouseEvent;
import flash.media.Sound;import flash.net.URLRequest;
import flash.media.SoundChannel;import fl.events.SliderEvent;
var myMusic:Sound = new Sound();
var soundFile:URLRequest = new URLRequest("lpwfte.mp3");
var channel:SoundChannel = new SoundChannel();
[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 2.0 :: High Score List - Flash Cannot Create A Simple Text File

Aug 17, 2004

I want to create a simple high score list of 10 high scores of a game. From reading the forums I seem to get the idea that flash cannot create a simple text file. I don't have php or asp but do have cgi capability. Does anyone know where I can find a simple cgi-script that will allow me to write the text the cgi receives to a simple text file: game.sco I want to be able to write a single long string to it so that I create a string of values and can load it back in using flash loadvariables. I can create the string in flash... but how do I write it to a text file using a cgi script? the text file would include this string...I already know how to read it and split it to parse it into arrays:

[Code]...

View 1 Replies

Print Labels From A Multi-select List?

Jun 24, 2009

I have created a list control with the instance name "dependents" and populated it with labels and data. MultipleSelection is set to true.
 
I would like to print the labels in a comma-delimited list.
 
I have used the following code...
 
dependents.selectedItems.toString()
 
which yeilds the following when there are two items selected...
 
[object Object],[object Object]
 
way to access the labels in these objects in the case of a multipleSelection

View 1 Replies

List Box - Display String From XML File

Nov 6, 2009

I have a list box in my flash file that I would like to display a string from an xml file that has been run though html entities in php. So for instance I need the string.

Code:
Hey "Leonardo£$£$()*%£% '"' [1999]
to display as
Code:
Hey "Leonardo;$;$()*%$% '"' [1999]

I can get this to happen in my dynamic text boxes by using .htmlText to display but I have no idea how I would do this in the list box?

View 1 Replies

Creating A List All Links In A .fla File?

May 28, 2009

I have to make a list every document linked in a multiple .fla files. I can pull them up doing a find for .pdf but I can't figure out how to copy the links from the results field. Each file links to 1000+ pdfs, so i'd like to avoid doing this one at a time. Is there a way to export the results of the find function to a .xml or .txt file?

View 1 Replies

ActionScript 3.0 :: Populate List From XML File?

Jan 10, 2010

i have an SQL base where are short messages and senders ids stored, i need them to appear on the list in flash CS4 AS3 in 2 colums sender and message.The ammount of messages is always different, so how could i do that?

View 0 Replies

ActionScript 3.0 :: List All The Files In .swf File?

Dec 13, 2010

I would like to know we could list all the files in .swf file.My application loads external .swf file (pure content inside it: Png, Mp3 inside) from Internet, and I would like to know the way how we could list all the files inside that .swf file.

View 1 Replies

ActionScript 2.0 :: Read An XML File Containing A List Of The Swfs?

Jul 12, 2010

I am trying to figure out how to read an XML file containing a list of the swfs I want to import, pause for 8 seconds to allow the swf to run and then continue the loop with the next swf.

I am reading the XML correctly but I am having an issue creating the timer to pause the for loop for 8 seconds between slide.

View 4 Replies

Java :: Possible To Get List Of Paths Of Every Object In SWF File?

May 18, 2011

I stumbled upon the need to find out (inside Java code) which files are dynamically loaded by an SWF-file. Is there any possibility to get a list of paths of every object referenced inside? I tried out some libraries without proper documentation and gave up. Maybe there is an external tool which can be accessed by Java via command line?

View 2 Replies

ActionScript 3.0 :: Linked List From Text File?

Aug 18, 2011

i need to create objects with a unique name with a loop in a way that i could get this...

var n1:node=new node(12);
var n2:node=new node(22);
var n3:node=new node(32);

[code].......

View 1 Replies

ActionScript 3.0 :: Getting File List Of Shared Objects?

Nov 28, 2011

How do you get the list of file names of shared objects? I'm trying to make a file navigator

View 1 Replies

ActionScript 3.0 :: Getting List From XML File And Printing It In MovieClips

Jul 3, 2011

I have a XML file with the following content:
Code:
<?xml version="1.0"?>
<schedule>
<class>
<name>AAA</name>
<time>9h30</time>
[Code] .....
Happens that it actually assumes the correct number of XML elements (2 classes), however, I can only print data on the first container (only the time and name from the first class).

View 3 Replies

Flash :: Automating Firefox To Get Xml?

Sep 5, 2011

I wish to get some data from a flash site. Now it is not possible to get the data directly from html. Now I have noticed using firebug that a xml file is sent to the browser containing the data I want, when I click on certain parts of the flash site. Is there any way to automate this?

View 1 Replies

ActionScript 2.0 :: List All Inspectable Properties In A Class File?

Aug 5, 2009

I am working on an enterprise application and creating a base class for some stage components that has knowledge of the class extending it. More specifically, I need a way to loop through the inspectable properties in a class file and place the names of these variables into an array. For example:

Code:

[Inspectable(name="My First Variable", type="String", defaultValue="")]
private var _myVar1:String;
[Inspectable(name="My Second Variable", type="String", defaultValue="")]
private var _myVar2;

[code]....

View 1 Replies

ActionScript 2.0 :: Sort List Of File Names Logically

Apr 16, 2010

I am near the point of breakdown trying to figure this out it's beyond my capabilities and maybe even brain power. I have a list of file names and I want to sort them as any logical human would.[code]I realised i could just name the files 01, 02, 03 but really I don't want to have to do this as it supposed to be an automated system.

View 2 Replies

Flex :: Load Text File From A List Into TextArea?

Jun 27, 2011

I have a TextArea and a DataGrid. I've populated the DataGrid with a list of text files in a directory. Now I'm trying to load the selected file into the TextArea. I'm getting a null pointer exception when selecting a file from the list, which tells me I'm not accessing it right...I think.

<s:TextArea id="mainTextField" x="0" y="0" width="730" height="523"
editable="true" enabled="true"/>
<s:DataGrid id="list" x="730" y="0" width="294" height="523" dataProvider="{files}" gridClick="listHandler(event)">

[Code].....

View 1 Replies







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