Flash MX and XML

Hi,
I have been working on a flash app to provide users with an
FAQ area for a program I look after. I have all the faq solutions
in individual txt files which flash pulls in once the user has
selected a question which relates to their issue. The problem I am
having some of the text files use characters such as ' and %. When
looking at these files that flash pulls in half the text after
these characters is either missing or joined up without a space.
The dynamic text field has been set to render text as HTML
and I thought I would allow some basic html tags within the text
file, so I tried using the HTML number or name to reference the
correct character I need such as ' for ' and % for
%. Again these just made the rest of text after them disappear.
Can anyone help shed some light on a different way, or what
the capability of this method actually is? I was thinking XML but
I'm need very familiar with it and think I need some flash
communication software to work. Not sure if this is true if not
then maybe XML could work but will need some direction on how to
get started.
Many thanks for your time I'd appreciate any help I
receive.

Hi me again,
I have been looking into XML and have got something very
basic working. I was wondering if there was a way to have all of my
faq solutions in an xml file (solutions.xml) each separated with an
element tag relating to the question. See attached code. The issue
is how to I get just the text for say installation when the user
selected the question relating to it.
I have a combo box showing all the questions so for example
'How to I install flash MX?' the data part would be
data:"installation". In the xml file the element tage would be
<installation>Insert the CD into your CD-Drive and follow the
onscreen instructions.</installation>. This would be the only
text I would want to be displayed in the answer_txt dynamic text
field.
I hope I have explained this enough and would really
appreciate some help.

Similar Messages

  • Problems with Captivate Redirects, possibly Flash Security and XML

    Hello fellow Captivarians,
    First a little backstory, earlier in the year we developed a course that heavily used external image files, which were gathered and organised through an XML file, then placed into Captivate 4 through a widget. This was all developed in Actionscript 3 and was designed to be accessed locally, on the user's computer from a CD Drive.
    We had a whole deal of issues with Captivate and Flash security issues, finding that we could not get the importing to work correctly in Internet Explorer as it outright refused to import the XML file (Presumably because of security issues). However, Firefox would work fine. Eventually we got it working via a bandaid solution by prepackaging the course with a firefox portable install.
    Now many months later, we have discovered our previous solution still works, but it now outright denies any redirects from HTML page to HTML page, regardless if the content is on the CD or if it's on the harddrive. Buttons that link to external sources will not work, (even if it's just a local page in the same directory).Flash player simply refuses to redirect between HTML pages. We tried some older projects that were developed in AS2 - and this wasn't an issue.
    The odd thing is however, on my computer it still works fine. However, on everyone elses in our office, it will not redirect at all. We are all running the same version of Flash Player, and the same version of Firefox...
    Any ideas? Could it have been a recent update with the Flash Player that prevents this sort of interaction?
    Cheers.

    Hi there
    Have you tried configuring the Flash Security Settings? That's my guess.
    Click here for a tutorial on how to configure
    If this will be on CD-ROM or DVD, you may need to consider adding a light version of a Web Server to the media and launching via that.
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Flash Components and XML Binding

    I just ran through the XML binding Bike Trails tutorial about
    a hundred times. I can get that to work just fine. But when I try
    to work with my XML file, it keeps falling apart. I just don't get
    it! I've been working on it for 2 days and it's still not working
    right.
    For one, the bindings are not showing up right. I have 2
    combo boxes and then a final one I'd like to use to list the
    stores. Here's a link to basically what I'm trying to do:
    http://www.thinkseed.com/test/stores.html
    My bindings keep falling apart. I get null values all the
    time for the second drop box that's supposed to house the States
    (the one on the site is a fluke...I accidentally had the
    <store> node on a separate line instead of nested in the
    <state> node. No idea why that one sort of worked.)
    Here's an example of the XML code:

    The flashComponents are standard AS2 components, and you can look up their APIs in the Flash documentation.  Here is the button docs:
    http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00001977.html#3654189
    Looking at that, there is a getStyle() method, and I just tested it out:
    put sprite(1).getStyle("borderStyle")
    -- "inset"
    put sprite(1).getStyle("fontFamily")
    -- "_sans"
    put sprite(1).getStyle("color")
    -- 734012.0000
    I'm not real sure what that means (probably the hex color converted to a float), but you can change the color like this:
    sprite(1).setStyle("color","red")
    And here is a page that lists all the styles that are defined:
    http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00001973.html#3136306

  • Flash CS4 and XML

    Hi,
    I'm using Flash CS4,i'm having problems creating a xml file to work
    with the action script for a 3D carousel. I've created folder for
    the image png file and icons xml using a normal notepad in windows
    for file to work with the flash action script 2.0, but in output menu the msg says
    Error opening URL 'file:///C|/Users/User/Documents/caroselFile/icons.xml'.
    They're no compiler errors. Should the notepad be xml editor? I have been
    told i can use a normal notepad.
    Maybe i should of saved it in the fla directry but don't know where
    it is.
    Thanks Larell

    <icons>
    <icon image="icon1.png" tooltip="" />
    <icon image="icon2.png" tooltip="" />
    <icon image="icon3.png" tooltip="" />
    <icon image="icon4.png" tooltip="" />
    </icons>
    Message was edited by: larellG

  • Flash buttons and xml

    Hi...I am looking to an xml file to generate a simple text
    link in my movie
    that will load flv's. I don't want to load the links into a
    component. I
    just need simple link text buttons that change color on
    rollover and act
    like normal link buttons. Right now it loads into a list box
    and I don't
    like the default rollover stuff that can't be changed with
    setstlye. Most
    notable the box that appears and highlights around the
    rollover choice. Can
    anyone direct me in the right area toward a tut or something?
    Not much help
    on searches.
    Thanks

    if you already have a fla that loads an xml file and assigns
    links, you don't need to start over. just find the code that parses
    the xml file. use some trace() functions to see what's being loaded
    and assign mouse handlers to your buttons instead of to your list
    component.

  • Error in creating XML photo gallery with Flash CS4 and AS 3.0

    Hello, all. I've been creating an XML photo gallery with Flash CS4 and AS 3.0 following a tutorial. I followed the instructions step-by-step but at the end I got the following error message instead:
    Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
    Could anyone in the community assist me as to how to solve the problem? The script has no errors and last time I checked all the applicable files (the .xml file, the .jpg files, the .swf and the .fla file) are in my Documents folder on the Mac.
    Looking forward to your suggestions!

    Check the folder structure
    Flash is not able to get some file thats why the IO Error.
    trace the url path just before u load the file and u will be abel to find whether that file is in specified folder or not.
    http://www.darshanrane.com

  • How can i record a name a score in a flash game and write down in a soreboard?

    Hi. I wrote down the summary of my project so that you can
    understand and answer me more easily:
    I have to build an application (a little flash game) in which
    I record the number of clicks. I want the player to choose a nick
    at the beginning and when he finishes one or all the four choices
    of target, i want the application to write his nick and final score
    in a database for displaying in a scoreboard (hall of fame). All
    the new entries should be sorted according to the score. If the
    same nick appears again, it's final score will be modified in the
    scoreboard only if is higher then the previous.
    I was thinking of creating a variable for the name that is
    chosen at the beginning and a variable for the score that is
    recorded. When the player finishes the game i want the application
    to write his data in the database, and then to display the
    scoreboard (let's say top 10 players in the database from the
    highest to the lowest score).
    I never did this before so i am asking what database shoud i
    use? I need a programmer to create one for me? Or can flash
    generate the database?
    Is the variable the good way or should I aproach the problem
    by other means? And if a programmer creates a database in MySql is
    that good or he should convert it to XML, or Flash generates the
    XML?
    Thank you.
    Mark this message as the answer.

    The bottom line is you cannot write to a file (database or
    XML files) directly from flash.
    I have done a number of projects where I needed to have
    access to an XML source or a database. In these cases I had to
    create server side script. I have done them in .NET, PHP ASP.
    The only option you have is to use the Flash's Shared Object.
    This does not store the data indefinatly and has a limited size
    (100K). Let me know if you need further info.
    With regards to using a variables depends on how you are
    writing your game. If you are creating classes in ActionScript then
    all the data can be stored within the class members. For example
    you could have a Player Class and store all the player related
    information in that class until the game is over. On the other hand
    you can just use varibles to keep things simple.

  • My flash reads the xml, but does not understand the tag php....

    my flash reads the xml, but does not understand the tag php. I want to read my xml dynamically, please help me.
    code:
    stop();
    function randomOrder(targetArray)
        var _loc2 = targetArray.length;
        var _loc3 = [];
        for (var _loc1 = 0; _loc1 < _loc2; ++_loc1)
            _loc3[_loc1] = _loc1;
        } // end of for
        var _loc4 = [];
        for (var _loc1 = 0; _loc1 < _loc2; ++_loc1)
            _loc4[_loc1] = _loc3.splice(Math.floor(Math.random() * _loc3.length), 1);
        } // end of for
        var _loc5 = [];
        for (var _loc1 = 0; _loc1 < _loc2; ++_loc1)
            _loc5[_loc1] = targetArray[_loc4[_loc1]];
        } // end of for
        return (_loc5);
    } // End of the function
    var randomNUM = "?n=" + random(9999);
    _root.lan = 1;
    var homehead;
    var homelink;
    var homelinkwindow;
    var homebg;
    var homeflash;
    var lamp = Array();
    var promo = Array();
    var promobottom = Array();
    var headimg = Array();
    f_xmlwork2 = new XML();
    f_xmlwork2.ignoreWhite=true;
    f_xmlwork2.load("banner.php");
    f_xmlwork2.onLoad = function(sucess){
        if (sucess){
             trace ("XML loaded!");
             f_xmlItemx2 = parseInt(this.firstChild.childNodes[0].firstChild);
             f_totalx2 = f_xmlItemx2.length;
            trace(f_totalx2);
             var _loc12 =0;
             // declarar a imagem de fundo
             homebg = this.firstChild.childNodes[0].firstChild.nodeValue;
             f_headimg = this.childNodes[1];
                 for (var _loc2 = 0; _loc2 < f_headimg.childNodes.length; ++_loc2)    {
    juju = f_headimg.childNodes[_loc2];
    jj = headimg.push({headimg: f_headimg.childNodes[_loc2].attributes.headimg, bgimg: f_headimg.childNodes[_loc2].attributes.bgimg, msgimg: f_headimg.childNodes[_loc2].attributes.msgimg, leftthrow: f_headimg.childNodes[_loc2].attributes.leftthrow, rightthrow: f_headimg.childNodes[_loc2].attributes.rightthrow});
                 //end for
    allpromo = this.childNodes[2];
    jjpromo = allpromo.childNodes;
    for (var _loc2 = 0; _loc2 < allpromo.childNodes.length; ++_loc2)
    trace (jjpromo[_loc2].attributes.title);
    jj = promo.push({img: jjpromo[_loc2].attributes.img, title: jjpromo[_loc2].attributes.title, url: jjpromo[_loc2].attributes.url, window: jjpromo[_loc2].attributes.window, info: jjpromo[_loc2].childNodes[0].nodeValue});
        // end of for
        allpromobottom = this.childNodes[3];
        jjpromobottom = allpromobottom.childNodes;
        for (var _loc2 = 0; _loc2 < allpromobottom.childNodes.length; ++_loc2)
            trace (jjpromo[_loc2].attributes.title);
            jj = promobottom.push({url: jjpromobottom[_loc2].attributes.url, window: jjpromobottom[_loc2].attributes.window, info: jjpromobottom[_loc2].childNodes[0].nodeValue});
        } // end of for
         if (f_xmlwork2.loaded == true)
            headimg = randomOrder(headimg);
            for (var _loc2 = 0; _loc2 < f_headimg.childNodes.length; ++_loc2)
                trace (headimg[_loc2].headimg);
            } // end of for
            play ();
        } // end if
    trace(f_xmlwork2);
    stop();
    PHP code:
    <?
    $link=  mysql_connect("localhost","rnpac_eco","123");
    mysql_select_db("rnpac");
    $dir="banner/";
    $dir1="produtos/img_pro/";
    $dir2="universo/actividades/";
    $sql = 'SELECT tbl_produto.id_produto, tbl_produto.produto, tbl_produto.legenda, tbl_produto.detalhe, tbl_produto.preco, tbl_produto.produto_cat_id, tbl_detalhe_produto.proprietario, tbl_detalhe_produto.local, tbl_detalhe_produto.qualidade, tbl_detalhe_produto.alcool, tbl_detalhe_produto.acidez, tbl_detalhe_produto.ph, tbl_detalhe_produto.informacao, tbl_detalhe_produto.gestor, tbl_detalhe_produto.condicionamento, tbl_detalhe_produto.detalhe_t, tbl_detalhe_produto.interesse, tbl_detalhe_produto.transporte, tbl_detalhe_produto.produto_id, tbl_imagem_produto.id_imagem, tbl_imagem_produto.imagem1, tbl_imagem_produto.imagem2, tbl_imagem_produto.imagem3, tbl_imagem_produto.imagem4, tbl_imagem_produto.imagem5, tbl_imagem_produto.imagem6
    FROM tbl_cat_produto, tbl_produto, tbl_detalhe_produto, tbl_imagem_produto WHERE tbl_produto.id_produto = tbl_detalhe_produto.produto_id AND tbl_produto.id_produto = tbl_imagem_produto.produto_id ORDER BY RAND()';
    $resultado = mysql_query($sql)
    or die ("Não foi possível realizar a consulta.");
    $row1=mysql_fetch_array($resultado);
    $sql = "SELECT  tbl_sub_universo.id_subuniverso, tbl_sub_universo.subuniverso, tbl_sub_universo.universo_id, tbl_actividade.id_actividade, tbl_actividade.entidade, tbl_actividade.legenda, tbl_actividade.subuniverso_id, tbl_actividade.det, tbl_actividade.preco, tbl_actividade.data, tbl_detalhe_actividade.actividade_id, tbl_detalhe_actividade.periodo, tbl_detalhe_actividade.descricao, tbl_detalhe_actividade.programa, tbl_detalhe_actividade.informacoes, tbl_detalhe_actividade.actividades, tbl_detalhe_actividade.localizacao, tbl_detalhe_actividade.locais, tbl_detalhe_actividade.servicos, tbl_imagem_produto.id_imagem, tbl_imagem_produto.imagem1,tbl_imagem_produto.imagem2, tbl_imagem_produto.imagem3, tbl_imagem_produto.imagem4, tbl_imagem_produto.imagem5, tbl_imagem_produto.imagem6, tbl_imagem_produto.actividade_id FROM  tbl_sub_universo, tbl_actividade, tbl_detalhe_actividade, tbl_imagem_produto WHERE tbl_actividade.id_actividade =tbl_imagem_produto.actividade_id AND tbl_actividade.id_actividade =tbl_detalhe_actividade.actividade_id ORDER BY RAND()";
    $resultado = mysql_query($sql)
    or die ("Não foi possível realizar a consulta.");
    $row2=mysql_fetch_array($resultado);
    $query='SELECT * FROM tbl_banner ORDER BY RAND()';
    $resultado = mysql_query($query);
    echo' <?xml version=\"1.0\"?>
    <home_left_headline>
    <bgimg>'.$dir2.''.$row1['imagem1'].'</bgimg>
    </home_left_headline>
    <home_flash>';
    while($row = mysql_fetch_array($resultado)) {
    echo'<swf headimg="" bgimg="" msgimg="" leftthrow="" rightthrow=""></swf>';
    echo'</home_flash>';
    echo'<promotop>
    <promo img="" title="" url="" ><![CDATA[]]></promo>
    <promo img="" title="" url="" ><![CDATA[]]></promo>
    </promotop>';
    mysql_close($link);

    i have two files banner.php, for testing my flash banner.
    This one works:
    -------------------------------| banner.php |---------------------------------------------
    <?xml version="1.0"?>
    <content>
    <settings>
    <menu X='160'/>
    </settings>
    <nav>
    <main Name='HOME' Link='home.swf'/>
    <main Name='EMPRESA' Link='home.swf' >
    <sub Name='HISTORIA' Link='content.swf' toLoad='content/contentrosa.xml'/>
    <sub Name='OBJECTIVO' Link='content.swf' toLoad='content/contentrosa2.xml'/>
    </main></nav>
    </content>
    -------------------------------|end  banner.php |---------------------------------------------
    this other does not work:
    -------------------------------| banner.php |---------------------------------------------
    <?php
    echo"<?xml version="1.0"?>
    <content>
    <settings>
    <menu X='160'/>
    </settings>
    <nav>
    <main Name='HOME' Link='home.swf'/>
    <main Name='EMPRESA' Link='home.swf' >
    <sub Name='HISTORIA' Link='content.swf' toLoad='content/contentrosa.xml'/>
    <sub Name='OBJECTIVO' Link='content.swf' toLoad='content/contentrosa2.xml'/>
    </main></nav>
    </content>";
    ?>
    -------------------------------|end  banner.php |---------------------------------------------
    Why? What is wrong? why does my flash does not understand the tag php
    Message was edited by: armandix

  • I am trying to save a custom code snippet in Flash CC and it does not save, any ideas why?

    I am trying to save a custom code snippet in Flash CC and it does not save, any ideas why?  I am using Windows 8.1 with Flash CC.
    I even when into the "Edit Code Snippet XML" and added a Custom folder and a custom template.  Then I went back to add the code snippet again and it still did not work.
    About line 32, I added:
       <category title="Custom"
          isBranch="true" expanded="false"
          description="Code for common interactions">
          <snippet isBranch="false">
          <title>Custom Snippet</title>
          <description>This is an example of a custom code snippet.</description>
          <requiresSymbol>true</requiresSymbol>
          <code><![CDATA[
    // Code goes here
    trace("A custom code snippet");
          ]]></code>
        </snippet>
        </category>     
    Any assistance would be greatly appreciated.

    UserAgent for the OP is - Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100405 Namoroka/3.6.3 - he might be running a 64-bit 3rd party build.

  • Making a jargon buster in flash cs5 using XML

    Hi guys !!
    I am working o a jargon buster for a college project.
    I have written up an XML document like this:
    <Items>
          <Query>Rip</Query>
           <answer>to copy files from a disc onto a computer</answer>
    </Items>
    Basically the user inputs their query into a editable text field and then flash searches the xml for the query and returns an
    answer into a readable text field below.
    My problem is how do I get flash to do that??
    Thanks in advanced.

    I suggest you read some XML tutorials. Functionality you desire is one of the easiest to implement once you get a light grasp on XML.
    Here is one of the possible approaches:
    var xml:XML;
    init();
    search("Dog");
    function init():void
         xml =   <data>
                   <Items>
                        <Query>Rip</Query>
                        <answer>to copy files from a disc onto a computer</answer>
                   </Items>
                   <Items>
                        <Query>Dog</Query>
                        <answer>Animal that barks</answer>
                   </Items>
                   <Items>
                        <Query>Watermelon</Query>
                        <answer>Diuretic</answer>
                   </Items>
              </data>;
    function search(searchString:String):void
         for each (var node:XML in xml.Items)
              if (node.Query.toString() == searchString)
                   trace(node.Query.toString(), "is", node.answer);
                   break;

  • Creating metadata in Flash CS3 and reading it in AS3

    Is there a way to store metadata in a library symbol in Flash
    CS3, and then read it in AS3? For example, I want to have the
    following code run:
    m_Metadata = 'You're cool!'
    I need this data before I can play the movie clip. Is there a
    way to store this? I've been trying to find a solution, but it
    looks like I'm just going to have to load in a separate XML file
    with the data.
    Thanks!

    Unfortunately there's no simple way to add instance level
    code in Flash CS3 or CS4 with AS3. This is a significant authoring
    tool deficiency in my opinion.
    Making a component... depending on what you want to do, there
    can be a lot of overhead. There may also be some very flaky/buggy
    behavior in Flash CS3 with custom components if your experience is
    anything like mine. However, for basic metadata, try this:
    1. Select the Symbol in the Library
    2. Right click, choose Component Definition...
    3. In the Parameters data grid you can add
    parameters/properties. Make sure you set the "Variable" field as a
    unique identifier for each parameter. These are the properties
    you'll use in AS at runtime to retrieve the values.
    4. Now on each instance on the canvas you can go to the
    Parameters tab and enter custom values for each parameter.
    5. At runtime, you should be able to access the values via
    instance_name.variable_name
    I believe that will work without actually creating a
    component class and making it functional.

  • Working with Flash content in XML template

    My knowledge base of html and DWCS3 is limited. My knowledge of Flash CS3 is better and have built a web site using it.
    This is a newbie DW question. Am working on an XML template, which contained the following folders:
    site_flash folder containing:  main_v8.swf, tfile_main.xml, style.css, index (firefox doc) (+gallery stuff)
    flash folder containing: main_v8.swf, main_v8.fla, tfile_main.xml, AC_RunActiveContent (JSS file) (+gallery stuff)
    I was told by the template people to use the site_flash folder but there are no visuals (Design views), to work with and could not access Flash through DW to alter the files in Flash. When I can get a Design view in DW, all I get is the f symbol. In all the tutorials I've watched on DW, there is a Design view to work with.
    SO, I used the flash folder and adjusted the main layout in the .fla file to suit my needs, and worked on the tfile_main.xml document in DW and they seemed to be 'talking' as my changes were recognized. When I test the file from either Flash or DW, it is perfect. But when I run it from my test folder through the server, the page formatting is off (page pushed down, menu buttons squashed, etc). There is no style.css sheet in the flash folder.
    Am willing to go back and start over with the site_flash folder with CSS page if this will resolve things, but don’t know how to edit the flash layout through DW. I need a Design view…am very weak in the html side of things.
    Test run:  http://www.mackenziemode.com.au/test.html
    Any advice you can give would be helpful.
    The Not-feeling-so-Handy Ma'am  

    In followup to my own frenzied query, in case anyone else is having the same problem, the solution to the 'squashed'
    web site (that's works perfectly on testing outside the browser) is to upload the main.xml file in binary mode.

  • Flash 9 and 10 serious limitations

    Hello!
    I've been developping flash applications with AS2 for years.
    While Flash 9 and 10 are great, for the very first time in Flash
    history it had become impossible for me to do something important
    that I was once able to do with previous versions.
    In Flash 8, I developped a complex but wonderful run-time
    system in order to load my classes dynamically. As you know,
    classes were stored in the "global" object in previous versions. In
    order to store my classes in only ONE swf file in complex projects,
    I used the "global" keyword in all my actionscript code so that I
    could always decide WHERE i wanted to include a particular class.
    Of course, I had to create a special class in order to load
    all my other classes. For example, the following code
    allowed me to load a package of classes :
    myClassLoader.load ("com.mynamespace.Map");
    The classLoader was a very handful. Basically, it was
    performing the following tasks :
    1) convert the string "com.mynamespace.Map" to
    "com/mynamespace/map.swf"
    2) load the file "com/mynamespace/map.swf"
    Of course, the file "com/mynamespace/map.swf" contained the
    class "com.mynamespace.map" therefore my class loader was checking
    if _global.com.nymespace.map was defined.
    3) Once the _global.com.nymespace.map is defined, my class
    loader look for the following static properties :
    public static var PARENT_S :String= "net.tanoa.Component";
    public static var TANOA_REQUIREMENT_A :Array=
    ["net.tanoa.Geodesy","net.tanoa.Component"]
    At this point, you have are probably understanding where I am
    going.
    My classLoader is looking for all requiered classes and if
    they are not already defined, those classes will be loaded as well.
    Here, you must understand that I single SWF can contain many
    classes actually, but those classes are "raw" (thas is there is not
    inheritage at this point)
    4) When ALL required classes are loaded, my classLoader needs
    to perform an other important task : to link classes prototypes in
    order to build dynamically the inheritage. As you have already
    understood, I use the "PARENT_S" static property of all classes to
    do so.
    5) When the inheritage structure is build, the classLoader
    check out if there is any initilialization to perform on each
    classes (there was a standard name for my initilaization method in
    all classes) this was required in order to create default
    properties of some classes (when those default properties are
    instances of other classes for example) I don't want to make it
    more complex than required, but there was also an optionnal
    propertie "initalization_priority" to determine which classes
    should be initialized first.
    Well at this point I hope you understand the main ideas. I
    have a lot of classes in many swf files. There is NEVER any
    duplication of any classes. Many different projects can reuse the
    same classes and therefore the same files stored in the cache. It's
    possible for me to create a virtual Windows application and load an
    XML file in which i determine which "components" are required, and
    they will be loaded only when needed.
    As far as I know, I am the only guy in Fiji (and in the
    world) who developped such a system.
    In order to avoid the inclusion of my classes in more than
    one swf, I had to use the keyword "_global" in all my code (it was
    a pain in the ***) and I couldn't take advanatge of the compilator
    check-ups or special keywords like "extends" etc... it was the big
    price to pay.
    I am really sad that Flash 9 and Flash 10 do not allow us to
    deal with inheritage dynamically. Technically, Flash 9 and 10 are
    very limited, it's like if it was impossible for a program running
    in Windows to load a "dll" file.
    In my opinion, the next generation of flash applications
    should allow us to find a solution to that problem.
    As long as I am concerned, if I can't continue to do what I
    did before, it means that I have a big problem.
    Fijiflasher

    Thank you for the link David, I'm gonna have a look to it but
    at this point I am not absolutely sure that i'll be able to create
    dynamic inheritage and stuff like that...well let's stay
    optimistic...;-)
    Thank you for your reply Raymond. The problem here is not
    really the "global" object. using the _global object in my as code
    was the best way to avoid the inclusion of classes in my swf files.
    On the first frame of my Fla file, i was adding the following code
    in order to force the inclusion of some classes in a particular swf
    if (com.mynamespace.Map)
    As you can see, this code doesn't do anything (that's
    great...) but the class Map will be included in the "global" object
    automatically as soon as the swf is loaded.
    From there, it is possible to load many SWF files from a main
    SWF file (once they are loaded, I unload the swf files but the
    "classes" remain in the global object) it might sounds weird for
    some of you, but i can tell you it was a wonderful way to build
    complex applications. Unfortunately, this brings some problems (you
    don't get advanatage of the compilator check-up when you compile
    your modules, etc...)
    it was important for me to be able to check up at run time if
    a particular class was available. For example :
    if (_global.com.Map ==undefined){
    // i need to load "com/Map.swf"
    see? that's great isn't it? As soon as the _global keyword
    was encountered by the compilator, the following reference was
    "ignored" and therefore I could manage to validate if a class was
    there or not WITHOUT including it. it was better than using the
    "xml exclusion file" for many reasons.
    As far as I know, there is no way with AS3 to do something
    like that (there is no "eval" function) so i can't validate at the
    run time if some classes are there or not. I need to check David's
    link before to confirm that.
    An other great think when you need to develop applications in
    many languages : if you use jokers like this
    "com.mynamespace.{language}.textFunction" in your architecture
    (where "language" is a parameter which is replaced dynamically by
    my classLoader function), you can actually create a wonderful kind
    of dynamic classes. Generally, it's not possible to translate
    English to French in a "simple way", I mean that you need a proper
    function to "generate" a string output using some parameters passed
    to a function. In my architecture, only the "french" or "english"
    classes were loaded. Also, I can use other "jokers" like {style}
    for example if i have a collection of different "rendering
    functions" for a same application...when you need to use bitmaps,
    it's really useful.
    Well my main point is that it's very important to :
    1) be able to load classes at run time in a "common" place ;
    2) be able to check out if a class is available in that
    "commom" place without forcing the inclusion of that class in the
    code.
    There is a few more other things, but that is the core idea
    here.
    Thanks
    Mathieu

  • Flash CC and google display network clickTAG

    I have been trying to add a clickTAG to my advert files in Flash CC. Seems to work fine but google is rejecting the adverts as an 'unsupported format'. It appears that Google will only accept SWF files up to 10.1 and the lowest you can export in CC is 10.3. I have downloaded 10.1 encoder and added it to the program XML files but still not accepting. My last hope was to open in CS5 or CS6 and that should work but I can't seem to be able to backsave or I don't know how. Any advice on this? The clickTAG I am using is below:
    btn.addEventListener(MouseEvent.MOUSE_DOWN, onClick);
    function onClick(e:MouseEvent):void {
              var click_url:String = root.loaderInfo.parameters.clickTAG;
              navigateToURL(new URLRequest(click_url), '_blank');

    I got it sorted... finally. I had found a link that explained hpw to add 10.1 but the info was not 100% correct, another guy had it right for 10.2 so I just went through the 10.2 code with a fine tooth comb and changed it over and it is working now.
    For anybody who is looking, and I am not a coding person, far from it, this is what I done.
    (1) Downloaded the 10.1 playerglobal.swc from Adobe here.
    (2) Right mouse click (or ctl click on a mac) on the Flash folder and show package contents - then click Contents/Common/Configuration/ActionScript 3.0/
    (3) Create a folder called FP10.1 and drop in the downloaded file (should be called playerglobal.swc).
    (3) Go back to the common folder and go to Common/Configuration/Players
    (4) Duplicate the FlashPlayer10_3.xml as FlashPlayer10_1.xml and open this file in textedit or whatever editor you have and replace the text with this:
    <?xml version="1.0" encoding="UTF-8"?>
    <players>
      <player id="FlashPlayer10" version="10" asversion="3">
       <name>Flash Player 10.1</name>
            <path builtin="true" />
            <path platform="WIN">Device Central/adcdl.exe</path>
            <path platform="MAC">Device Central/adcdl</path>
            <playerDefinitionPath as2="$(UserConfig)/Classes/FP10;$(UserConfig)/Classes/FP9;$(UserConfig)/Classes/FP8;$(Use rConfig)/Classes/FP7" as3="$(AppConfig)/ActionScript 3.0/FP10.1/playerglobal.swc" />
            <feature name="multiScreenPublish" supported="true" />
            <feature name="mobileAuthoringIntegration" supported="true" />
            <feature name="deviceSound" supported="false" />
            <feature name="exportStreamingSound" supported="true" />
            <feature name="exportEventSound" supported="true" />
            <feature name="FSCommand2" supported="false" />
            <feature name="gradient_linearRGB" supported="true" />
            <feature name="gradient_overflow" supported="true" />
            <feature name="shape_strokeHint" supported="true" />
            <feature name="shape_cap" supported="true" />
            <feature name="shape_join" supported="true" />
            <feature name="shape_mitre" supported="true" />
            <feature name="shape_scale" supported="true" />
            <feature name="linkage_exportForActionscript" supported="true" />
            <feature name="linkage_exportForRuntimeSharing" supported="true" />
            <feature name="linkage_exportInFirstFrame" supported="true" />
            <feature name="linkage_importForRuntimeSharing" supported="true" />
            <feature name="linkage_importAndAddToCache" supported="false" />
            <feature name="publish_localPlaybackSecurity" supported="true" />
            <feature name="publish_hardwareAcceleration" supported="true" />
            <feature name="symbol_blendMode" supported="true" />
            <feature name="actionScript_documentClass" supported="true" />
            <feature name="symbol_blendMode" supported="true" />
            <feature name="filters" supported="true" />
            <feature name="component_binding" supported="true" />
            <feature name="component_schema" supported="true" />
            <feature name="screens" supported="true" />
            <feature name="video" supported="true" />
            <feature name="deviceVideo" supported="false" />
            <feature name="accessibility" supported="true" />
            <feature name="dynamic_text_kerning" supported="true" />
            <feature name="static_text_charwidth_nondeviceFont" supported="true" />
            <feature name="static_text_charwidth_deviceFont" supported="true" />
            <feature name="advanced_anti_alias_text" supported="true" />
            <feature name="nine_slice_scaling" supported="true" />
            <feature name="runtimeNumberMinMax" supported="true" />
            <feature name="use8kSampleRate" supported="true" />
            <feature name="useDefineFont4ForDeviceText" supported="true" />
            <feature name="useDefineFont4ForEmbeddedFonts" supported="true" />
            <feature name="textLayoutFramework" supported="true" />
            <encodingPresets>
                <preset uuid="da5cac1a-417a-4d86-b7f7-ef21010a5d7d" name="FLV - Match Source Attributes (High Quality)" ext="flv" default="true" />
            </encodingPresets>
            <testmenu>
                <menu name="ID_testInFlash" default="true" />
                <menu name="ID_testInDeviceCentral" />
            </testmenu>
            <debugmenu>
                <menu name="ID_debugtInFlash" default="true" />
                <menu name="ID_debugInDeviceCentral" />
            </debugmenu>
        </player>
    </players>    
    (5) close and restart flash
    (6) Pick 10.1 in your export settings and it will work now.
    Seriously, thanks to all who tried to help, Adobe should really fix this issue as its a pain for people who are not developers and code is alien to them.

  • Load assets and xml

    I am trying to add games to a Flash file. They are in different folders and the assest and xml information is not coming with it? I get the error : "[BulkLoader] Error loading LoadingItem url: images/, type:text, status: error Error #2032: Stream Error. URL: file:///G|/%2D%2DWORK%2D%2D/Gilcrease%20Projects/Kravis/images/
    Here are the files I need to load into the main file. Please help. Thank you in advance!
    Angela

    As mentioned, the very first SWF that is loaded will set the file path. That means every single call to load an external file from that point on will come from the location of the very first SWF.
    If the first SWF loads another SWF, that other SWF needs to know this so it properly requests files in the right location.
    Example file structure:
    Main.swf
    MatchingGame\MatchingGame.swf
    MatchingGame\images\a.png
    Say Main.swf loads MatchingGame\MatchingGame.swf. Now the root is set to the path of Main.swf. If MatchingGame\MatchingGame.swf wants to load the a.png, it cannot do this:
    var img:Loader = new Loader();
    img.load('images/a.png'); // FAIL
    It must be loaded as though it was Main.swf. The full relative path to a.png is MatchingGame\images\a.png. So MatchingGame\MatchingGame.swf must do this:
    var img:Loader = new Loader();
    img.load('MatchingGame/images/a.png'); // SUCCESS
    Hopefully this illustrates that paths will always originate with the first loaded SWF, which was Main.swf in this example.

Maybe you are looking for