Automation of several Flash file by using the XML file 'mailing list '.

I created a Flash interactive multi-fichiers 'demo' for a client. It is very well as a Web site (although he doesn't use it as a Web site) in the way it is stated that there is an index page which can then direct you to product categories, which you can click to see. Each 'page' contains the product (or product category) information, photos, diagrams, etc. There is nothing of Flash animation.

My client also wants to be able to put in place so that the demo runs automatically in a configurable XML file. My ActionScript skills are fairly limited, but I was able to by using ActionScript 3 to load and read XML file. A loop using 'for', I am able to read the XML file and returns the path of each Flash file and the time that each file must be displayed (my client asked that he able to configure the duration of each page as well).

I created a charger for each video clip and a timer for the duration. Unfortunately, the thing that throws me off is that when I try to load the clip (as the last element in the loop for), it reads the entire XML file, returns all the clips and the durations (I use trace to see this) before loading the clip. Thus, the single loaded clip is the last reading of the XML file.

As I said, I'm not very good at ActionScript, so everything I managed to combine was internet tutorials.

This is my code:

var xmlLoader:URLLoader = new URLLoader();

xmlLoader.addEventListener (Event.COMPLETE, xmlLoaded);

var mcLoader:Loader = new Loader();
mcLoader.contentLoaderInfo.addEventListener (Event.INIT, playClip);

var mcCurrent:MovieClip = new MovieClip();
stage.addChild (mcCurrent);

var xml;

function playClip(e:Event):void
{
trace("Function:playClip");
stage.removeChild (mcCurrent);
mcCurrent = MovieClip (mcLoader.content);
mcLoader.unload ();
stage.addChild (mcCurrent);
}

function xmlLoaded(e:Event):void
{
trace ("function: xmlLoaded");
XML = new XML (e.target.data);

var cl:XMLList = xml.clip;
for (var i: uint = 0; i < cl.length (); i ++)
{
trace ("Begin"for"loop");
trace ("variable" i "is" + i);

clipPath var = cl[i].@path;
var delay = cl[i].@duration;

trace ("Clip path is" + clipPath);
trace ("Display for" + delay);

mcLoader.load (new URLRequest (clipPath));
}
}

xmlLoader.load (new URLRequest ("filerunlist.xml"));


I removed the timer event because, like all the rest was repeated until whatever it is obtained, so I wanted to figure out out to get the charger clip (mcLoader) to load the clip for each file, before I realized where put in the time to make sure each element is displayed for the appropriate duration. I suspect that the timer event must occur in the function "playClip", but that it would take advice on that as well.

Thanks to anyone who can help me understand this.

You need to do in the service of parsing xml is just to store all data in a table.  You will use while an array element after another through some timer control you set up, access each file in the order that they are stored in the table.  You do not load in this function, all data storage, and when finished, the last line of this function outside the loop, fires at any function you have who begins to treat the first element of the array.

For example, to store the data objects in the array...

var clipData:Array = new Array();   store your data xml here

var clipToShow:uint = 0;                   use later in the function showClip

function xmlLoaded(e:Event):void
{
trace ("function: xmlLoaded");
XML = new XML (e.target.data);
   
var cl:XMLList = xml.clip;
for (var i: uint = 0; i
{
clipArray.push ({clipPath: cl[i].@path, delay: cl[i].@duration});

}

showClip();
}

function showClip() {}

Regardless of the process of loading .clipPath clipArray [clipToShow]

and using clipArray [clipToShow] .delay to start some timer is involved

the timer handler function calls this function when it is run

clipToShow += 1;   increment the counter for the next clip online

}

If you are not comfortable/familiar with the approach of the object, then you could also store the clip and delay data in two separate tables.

Tags: Adobe Animate

Similar Questions

  • Several Flash files for web and iPad

    Hey there,

    If I deliberately made several flash files that connect to each other for the web, how could export them as an App for the iPad?

    for example, a flash file can be a file flash Introduction/navigation and other categories that have a navigation link.

    I join all the files flash in a single Flash file manually?

    If you design things so that all sovereign funds have no code, and code that drives lies in the main swf file, you can keep them as external files.

  • Center aligning images in table using the XML file

    Hello
    I use a flash file that uses an xml file to download a series of images one by one in a photo-gate.
    There are two different widths of images. The height is always the same. Is it possible to set up so that each image that calls file xml is center aligned as part of image.
    At the present time when using the xml file to load the image she always left aligns the image when he brings it in image even if you change the alignment to center align in the Panel align.
    Does anyone have a suggestion why this happens or how to fix it?
    Thanks for the help

    I did this quickly and did not test - but if it does not directly at the exit it might give you a starting point - or someone else can correct if there are errors. I'll check tomorrow - where I am its time to go to sleep...
    CHANGE the DETAILS: Just changed a few pieces of code I posted last night - I forgot to change the statement holder_mc.loadMovie in xml.onLoad Manager. I have not tested, but its along the lines of the approach I would use to solve your problem with resizing the image. Let me know how you go with it.

  • Is it possible to create a new file using the XML via java Script?

    Hello everyone,

    Is it possible to create a new file using the XML via java Script

    • I have xml information that need to use for file name, size.
    • Based on xml file we can create a new file in InDesign with java script?
    • Kindly help me if anyone has an idea about this.

    I use InDesign CS4 on windows 7

    Sample file is attached below.

    Kind regards

    Siva

    <UpdateAd>
    <AdId>3403699</AdId>
    <Width type="mm">91,79</Width>
    <Height type="mm">80,00</Height>
    <ProductionCategory>4</ProductionCategory>
    <BookedCCIColors>sw</BookedCCIColors>
    <WorkFlowType>PDF</WorkFlowType>
    <CustomerNumber>652224</CustomerNumber>
    <CustName1>Erich Prang</CustName1>
    <Description/>
    <Description2>R</Description2>
    <UpdateIns>
    <Titel>RHZ</Titel>
    <Publication>B2</Publication>
    <RunDate>26-07-2011</RunDate>
    <Zone>H30</Zone>
    <KDDATEN>nein</KDDATEN>
    </UpdateIns>
    <WorkflowStep>IR</WorkflowStep>
    <Proof>No</Proof>
    </UpdateAd>
    
    

    xml.png

    Try this:

    var f =File.openDialog ();
    f.open('r');
    var xml = new XML(f.read());
    f.close();
    
    var myDocument = app.documents.add();
    myDocument.documentPreferences.pageHeight = xml..Height+"mm";
    myDocument.documentPreferences.pageWidth = xml..Width+"mm";
    var rect = myDocument.pages[0].rectangles,add();
    rect.geometricBounds = myDocument.pages[0].bounds;
    rect.strokeAlignment = StrokeAlignment.INSIDE_ALIGNMENT;
    rect.strokeColor = myDocument.swatches.item("Black");
    rect.strokeWeight = 1;
    myDocument.save(File(f.path + "/" + xml..AdId + ".indd"))
    

    Substances

  • Using the XML instead of rowImpl class?

    Hello

    I have the following query.
    There is a class of VO1ViewObjectRowImpl in which I can access another method of the viewobjectRowImpl class. It works very well. My query is can I perform the same know to retrieve the values of all lines of the view object another without generating java class for it? In other words, is there a way to use the .xml rather than the VO2ViewObjectRowImpl class file? If so, please refer to the link where I can find the information.

    Please answer this.

    Thanks and greetings

    Hello

    You can still access a display object that is not a class Impl. Simply add custom methods or override default methods, a class of impl. If the VO is dependent on you can access them to the link view defined on the VO Campeau accessor. If they are not linked you can access AOS to find one instance of VO

    Frank

  • How to set up a new email account using the same e-mail address of my old computer?

    How can I configure sup a new email account using the same e-mail address of my old computer?

    Hi Melanie,

    Are you referring to the Mail app or user login account?

    If you are referring to the Mail application, you can consult the following link: Set up Mail and add contacts

    If you are referring to the user login account, you can consult the following link: create a user account

    It will be useful.

    Keep us informed on the status of the issue.

  • is it possible to buy two licenses CC photographer using the same e-mail account?

    is it possible to buy two licenses CC photographer using the same e-mail account?

    You can buy only one subscription to an electronic ID/address adobe which can be activated on both computers.

    Kind regards

    Hervé Khare

  • How to extract data using the xml data type

    Hello
    I tried the following example using the xml data type, but not the desired output.
    could you please correct the query in order to obtain the necessary
    CREATE TABLE TEST.EMP_DETAIL
    (
      EMPNO       NUMBER,
      ENAME       VARCHAR2(32 BYTE),
      EMPDETAILS  SYS.XMLTYPE
    )
    Insert into EMP_DETAIL
       (EMPNO, ENAME, EMPDETAILS)
     Values
       (7, 'Martin', XMLTYPE('<Dept>
      <Emp Empid="1">
        <EmpName>Kevin</EmpName>
        <Empno>50</Empno>
        <DOJ>20092008</DOJ>
        <Grade>E3</Grade>
        <Sal>3000</Sal>
      </Emp>
      <Emp Empid="2">
        <EmpName>Coster</EmpName>
        <Empno>60</Empno>
        <DOJ>01092008</DOJ>
        <Grade>E1</Grade>
        <Sal>1000</Sal>
      </Emp>
      <Emp Empid="3">
        <EmpName>Samuel</EmpName>
        <Empno>70</Empno>
        <DOJ>10052008</DOJ>
        <Grade>E2</Grade>
        <Sal>2530</Sal>
      </Emp>
      <Emp Empid="4">
        <EmpName>Dev</EmpName>
        <Empno>80</Empno>
        <DOJ>10032007</DOJ>
        <Grade>E2</Grade>
        <Sal>1200</Sal>
      </Emp>
    </Dept>
    '));
    I need to get the record for Empid = '2'
    Then tried the following query with no expected o/p
    SELECT a.empno,a.ename,a.empdetails.extract('//Dept/Emp/EmpName/text()').getStringVal() AS "EmpNAME",
         a.empdetails.extract('//Dept/Emp/Empno/text()').getStringVal() AS "EMPNumber",
          a.empdetails.extract('//Dept/Emp/DOJ/text()').getStringVal() AS "DOJ",
          a.empdetails.extract('//Dept/Emp/Grade/text()').getStringVal() AS "Grade",
          a.empdetails.extract('//Dept/Emp/Sal/text()').getStringVal() AS "Salary",
          a.empdetails.extract('//Dept/Emp[@Empid="2"]').getStringVal() AS "ID",
          a.empdetails.extract('//Dept/Emp[EmpName="Coster"]').getStringVal() AS "CHK"
         FROM emp_detail a 
         where empno=7  
               AND a.empdetails.existsNode('//Dept/Emp[@Empid="2"]') =1
    Thank you...

    Karthick_Arp wrote:
    I'm not very good at that... But if your XML code should not be more like this

    SQL> Insert into EMP_DETAIL
    2     (EMPNO, ENAME, EMPDETAILS)
    3   Values
    4     (7, 'Martin', XMLTYPE('
    5    
    6      1
    7      Kevin
    8      50
    9      20092008
    10      E3
    11      3000
    12    
    .. cut ..
    

    Why? It is perfectly valid to data as attributes rather than elements and also quite common for key values.

  • Clone several nodes and appl_top shared using the XML file backup

    Can I use work save file of application context to repeat the clones and avoid to perform following steps:

    -Configure the node C (run '"perl adclonectx.pl sharedappltop contextfile = < context of Applications for the existing node file >' and ' perl-I < AU_TOP > / perl txkSOHM.pl"orders ")

    If I work the previous clone XML, I would be able to use the same XMl file for re - clone without implement shared appltop and add a node step. Please, share your ideas.

    ma_apps wrote:
    Can I use work save file of application context to repeat the clones and avoid to perform following steps:

    -Configure the node C (run '"perl adclonectx.pl sharedappltop contextfile =' and 'perl - I /Perl txkSOHM.pl"orders)

    If I work the previous clone XML, I would be able to use the same XMl file for re - clone without implement shared appltop and add a node step. Please, share your ideas.

    You should be able to use it. However, according to the Oracle docs support is to clone the main node and add more nodes by cloning the context files.

    Cloning Oracle Applications Release 11i with rapid Clone [ID 230672.1]
    Sharing the Application Tier file system in Oracle Applications Release 11i [ID 233428.1]

    Cloning Oracle Applications V12 with rapid Clone [ID 406982.1]
    Share Application-level file system in Oracle E-Business Suite Release 12 [384248.1 ID]

    Thank you
    Hussein

  • Help, please! How to change the flash content without using the flash every time

    Hello everyone, I'm relatively new to Flash, although I used it on / off power a little here and there for several years... Anyway my question is this... I would like to be part of the content on my site editable flash using the pad of simple text and downloading text. If someone could explain the context, or point me to a tutorial or a resource I would be very happy. Smile.gif

    appeal of text in an external txt file in flash has been an option for as long as I can remember-
    That said, there are hundreds of online resources for the use of external text with flash. I recommend
    go to www.kirupa.com where they have a very good tutorial written on it with a source file.

    I hope this helps.

    ******************************************
    --> Certified adobe Expert * AS *.
    --> www.mudbubble.com
    --> www.keyframer.com

    Dan Raborn says:
    > Hello all, I'm relatively new to Flash, although I used it on and
    > off a little here and there for several years... Anyway my question is this...
    > I would like to be part of the content on my flash site to be editable using
    > pavement of simple text and downloading text. If someone could explain the context,
    > or point me to a resource or a tutorial I'd be very happy. Smile.gif
    >

  • How to record on several records by simply using the save after I'm done editing command?

    I want by default save, for example a word document, on my hard drive and the network using simply save it command.  Is it possible to save in several folders in several destinations by simply hitting the recording of order instead of having to manually we "save under" and goes to each destination individually?

    Hello

    Welcome to the Microsoft Community and forums thanks for posting the question.

    The description, it looks like you need to save the files in mulitple locations by clicking on save button. By design, Windows can point to one place at a time. In several places, you can choose the option "record under.

    Hope this information helps. Get back to us if you wondering more about Windows.

  • Automation of shared review for Reader using the Acrobat 9 software development kit

    I am new to the Acrobat SDK kit, but also writing plug-ins.

    However, I was instructed to implement a 'shared check' in Reader for collaborative proofing.  I understand how to do this using the "Send for shared review" Wizard in Acrobat, but I need to automate this process.  PDF files which will be a protection at a meeting of "Shared review" using player emerged a Hotfolder process, so there is no physical end user to run the Acrobat 9 "Send for shared review" for each PDF.  I need to automate this process.

    I was told that the SDK would allow this, but at the same time, I read a few posts claiming this can be done in the SDK and LiveCycle is required.

    Can someone confirm that the SDK can activate a PDF of "shared control"?  If so, how this is done?

    If it cannot be done, is the only option for LiveCycle or can a macro Acrobat written to simulate the Wizard "Send for shared review"?

    Thanks in advance.

    There is no automation facilities to "Send for shared review" in the Acrobat SDK kit - so this isn't an option.

    I don't think that the latest version of LiveCycle can do it either...

  • Using the XML file error

    Hello

    I use an XML file as the source in a map. This worked well until I changed the context during the execution of the mapping.

    Initially, during the execution of the development, it worked without any problem. But when I changed the context to run the Test, he gave me the following error:-

    ODI-1227: task load data-LKM SQL for Oracle-don't work not to connect to the source P6_ACTIVITIES - TEST.

    Caused by: java.sql.SQLException: the object name already exists: P6ACTI_READACTIVITIESRESPONSE in the statement [create table P6ACTI_READACTIVITIESRESPONSE (READACTIVITIESRESPONSEPK NUMERIC (10) NOT NULL, SNPSFILENAME varchar (255) NULL, SNPSFILEPATH varchar (255) NULL, SNPSLOADDATE varchar (255) NULL)]

    This object name, P6ACTI_READACTIVITIESRESPONSE created by ODI is a combination of scheme name defined in the JDBC URL properties (or the first five characters of the XML file) and the element root. Therefore, I don't have any control over the name, unless I have change the schema name property.

    Restart the agent will solve the problem temporarily, but the error will appear again when the context is changed. My question is, how do I create/drop / let agent do this each time that the XML file is accessed ODI. I use ODI 12.1.3.

    Thanks in advance,

    Xmen

    Only, you should be able to query code KM to understand if these tables are created, but generally it will be in the scheme of work specified on your server of intermediate technology.

    We are not allowed to change the KMs, because it would create problems of alimony.


    Who with Oracle or internally? A large part of ODI power lies in an open framework around KMs and as long as you develop and test carefully any customizations KM I really can't see why the support would be a problem. You can run the table to fall outside the knowledge module, would be - this also be a support issue, the main difference is that a KM custom allows to reuse easier?

  • Create an image slider using the XML file photo gallery

    Hello!

    I have created a photo gallery and generated an xml file.  I want to implement a cursor image on the home page that performs a simple fade from one image to the other.

    I'm not an expert on jQuery. The BC help section says to add code that retrieves in the XML file and THEN add another code query j who would style images and transitions.

    I don't know how to do this.  Here is my code and it does not work.

    If you have a simple solution, it would be great.

    There is a script called JSSOR

    "< script type =" text/javascript"src ="... / js/jquery-1.9.1.min.js "> < / script >"

    <!-use jssor.slider.mini.js (40 KB) instead for immediate release->

    <!-jssor.slider.mini.js = (jssor.js + jssor.slider.js)->

    < script type = "text/javascript" src = "javascripts/jssor.js" > < / script >

    "< script type =" text/javascript"src="javascripts/jssor.slider.js "> < / script >

    This is the beginning of the code BC gives to pull from the xml file into a div called "Gallery".

    < div id = 'Gallery' > < / div >

    < script type = "text/javascript" >

    {$(function()}

    $.ajax({)

    type: 'GET ',.

          url: " http://www.performanceaire.com/Fahrenheit-images/BannerGallery/Photogallery.XML ", / / replace with an absolute URL of the XML of your gallery of .

    data type: "xml."

    success: {function (xml)}

    {$(xml).find('img').each (function ()}

    location var = ' http://www.performanceaire.com/Fahrenheit-Images/BannerGallery/'; / / Replace with the absolute path to the directory that contains your images

    var url = $(this) .attr ('src');

    var alt = $(this) .attr ('alt');

    $('<li></li>').html (' < a href = "' + place +" + url + ' "> < img src ="' + place + "+ url + '" alt = "' + alt + '" / > < / a > ').appendTo('#gallery');

    });

    }

    });

    });

    This is the code taken from JSSOR to transitions occur, and it does not work... any ideas?

    jQuery (document) .ready (function ($) {}

    var options = {}

    $AutoPlay: true, / / [optional] If auto play, to activate the slide show, this option must be set to true, the default value is false

    $DragOrientation: 1 / / orientation [optional] to drag the slide, 0. drag, 1 horizental, 2 3 vertical or, default value is 1 (note that the $DragOrientation must be the same as $PlayOrientation when $DisplayPieces is more than 1, or in the parking position is not 0)

    };

    var jssor_slider1 = new $JssorSlider$ ("Gallery", options);

    });

    < /script >

    www.performanceaire.com/index-FS.html

    It is perhaps a bit much if you do not top:

    Developers

    http://www.BusinessCatalyst.com/BC-blog/BC-next-liquid-rendering-JSON-new-editing-capabili links-increased-performance

  • Get Reader and Flash Player without using the Download Manager

    I need to install Reader and Flash Player on boxes that are _not_ connected to the Internet, so I can't use the Download Manager. Where can I direct download Acrobar Reader and Flash Player? Thank you

    Adobe Reader: http://get.adobe.com/reader/enterprise/

    Flash Player: http://www.adobe.com/products/flashplayer/distribution3.html

Maybe you are looking for