Loading muliple accordions into as3 swf

I have an application written in AS3 that is loading swfs written in  AS2.  Most of them work fine, except for ones that contain the old AS2  accordion component.  Loading one results in it working correctly, but  each one that is loaded after it breaks the previous one (the content no  longer shows and the mask disappears).  It's not just limited to the  accordion, any of the AS2 components that came with Flash Pro cause  breakage.  I've tried loading the swfs to separate movieclips, tried  using applicationDomain, tried everything else I can think of.   Rewriting the swfs in AS3 is not an option due to circumstances out of  my control.  Any thoughts, ideas, even snide remarks would be welcomed.   Thanks.

AS3 and AS2 stuff actually run in different VMs... to my knowledge, you can't have anything in AS3 in the same display tree as anything in AS2. Sorry, but you might be out of luck with this one...

Similar Messages

  • Load AS2 swf into AS3 swf problem

    I have a flash with AS3 and inside this swf i load in a AS2 swf.
    to load swf works just fine, but the problem is when i load this i want to go to
    a specific part of it, for example i want to go to frame 3 in the loaded swf.
    i must control this from the AS3 swf, does someone know if this is possible?
    thanks in advance

    so can i do like this then to go to frame 3 in my loaded swf?
    MovieClip(ldr.content).gotoAndStop(3); ?
    sorry for being such an airhead
    thanks for helping me out =)
    Date: Sun, 7 Jun 2009 10:25:09 -0600
    From: [email protected]
    To: [email protected]
    Subject: load AS2 swf into AS3 swf problem
    no.
    if, in your loaded swf, you have a function f1() on the loaded swf's main timeline and you load that swf using a loader (say ldr), use:
    MovieClip(ldr.content).f1();   // to call f1() in the loaded swf
    >

  • Load AS2 swf into AS3 swf

    here is the code i'm using:
    var url:String = "avm1.swf";
    var urlrequest:URLRequest = new URLRequest(url);
    var loader:Loader = new Loader();
    loaderListener(loader.contentLoaderInfo);
    loader.load(urlrequest);
    function loaderListener(dispatched:IEventDispatcher){
    dispatched.addEventListener(Event.COMPLETE, assignSWF);
    function assignSWF(event:Event){
    addChild(loader.content);
    here is the error i get:
    It is illegal to move AVM1 content (AS1 or AS2) to a
    different part of the displayList when it has been loaded into AVM2
    (AS3) content.
    Is there a different way to do this?

    addChild(loader)

  • Problems with loading AS2 assets into AS3 container

    Hello,
    in a Project I use the AS3 Loader Class to load
    AS2-swf-files. The swf-files are placed into different subfolders,
    since they're using the same filenames and subfoldernames for
    config-files etc.
    The Problem is: Whatever swf-file I load first, it is
    working, but every swf-file after that fails. It seems to be
    loaded, but it's not working correctly.
    I'm using the attached code (easy as it seems) to unload the
    present content and then loading the new one. But also using a
    separated second loader to load the second file is not working.
    I made some kind of testcase (a loader with 2 content
    swf-files) for you, so you can understand what I'm talking about.
    Here you can download the
    testcase (28
    MB).
    It seems like there is a bug in the flash player 9 that
    prevents the AS2-content from being unloaded correctly from an AS3
    file. Can you confirm that there is such a bug? Or do you have an
    explanation for this behavior? Or even better: a solution or
    workaround?
    Thanks a lot!

    Thanks for your help, but as said ("But also using a
    separated second loader to load the second file is not working.")
    even when using a second loader (with a different name) the second
    file loaded will not work.
    I'm removing any EventListener from the first loader,
    unloading and then nulling it.
    But to me it seems, that the first content is not garbage
    collected and because of that, even when loaded with an other
    loader the first loaded swf-file interferes with the second.
    I came to this conclusion, because the first loaded swf-file
    is still working after trying to load the second file. And just
    more weird: the first loaded file is in the same state and also
    after closing the Flash-Player.
    You can see it for yourself: download the testcase. Start the
    testcase.swf. Load a contentfile. Skip a few pages. Quit the Flash
    Player. Start the testcase.swf again and load the same contentfile.
    You will see it's at the same position like before quiting the
    Player.
    And I can't help, but that seems like a bug to me...

  • Problem going to fullscreen after loading AS2 movie into AS3

    I've got a loader movie that is written in AS3, and
    fullscreen is enabled. I have a context-menu fullscreen trigger and
    a keypress fullscreen trigger built into the loader movie. When I
    load an AS3 movie or an AS1 movie through the loader movie, I can
    go to fullscreen without problems. When I load the AS2 movie, I
    cannot.
    Does anyone have an idea why this might be? I'm struggling.
    Thanks in advance.

    Thanks for your help, but as said ("But also using a
    separated second loader to load the second file is not working.")
    even when using a second loader (with a different name) the second
    file loaded will not work.
    I'm removing any EventListener from the first loader,
    unloading and then nulling it.
    But to me it seems, that the first content is not garbage
    collected and because of that, even when loaded with an other
    loader the first loaded swf-file interferes with the second.
    I came to this conclusion, because the first loaded swf-file
    is still working after trying to load the second file. And just
    more weird: the first loaded file is in the same state and also
    after closing the Flash-Player.
    You can see it for yourself: download the testcase. Start the
    testcase.swf. Load a contentfile. Skip a few pages. Quit the Flash
    Player. Start the testcase.swf again and load the same contentfile.
    You will see it's at the same position like before quiting the
    Player.
    And I can't help, but that seems like a bug to me...

  • Loading PDF's into a flash file?

    Hi there, I just need to load a pdf into a swf with AS2... I have a movie clip but its not doing anything?... its it possible? works with swf's
    Any ideas?

    Hi,
    Here's an article shows you how to use a sample Adobe InDesign script that automates the process of converting PDF files into InDesign files that are easy to import into Folio Producer.
    http://www.adobe.com/devnet/digitalpublishingsuite/articles/dps-pdf-to-indesign.html
    Thanks,
    Laxman

  • External as2 userDrawingTablet into as3

    created a tablet where the user could draw on the pad. i did it a while ago using actionscript 2. now i'm loading it externally into as3. when placed in as3 it seems to be confused as to where the tablet is and draws only on the bottom right and off the page. also have a text function that is not working properly either.
    kind of a random application and random problem, but not sure where else to go with this...
    was just wondering if anyone had done this and had a similar problem?
    thanx

    "submitter" is a movie clip on the main timeline. this code is inside submitter layed out with a mc named "blackboard". blackboard has a mc named "innerBlackboard" inside of it.
    blackboard.clearChalk = function():Void {
        var cl = this._parent._parent.chalkLine;
        this.createEmptyMovieClip("chalkLayer", 0);
        this.chalkLayer.lineStyle(cl.thickness, cl.color, cl.alpha);
        this.drawings = [];
    blackboard.clearText = function():Void {
        this.createEmptyMovieClip("textLayer", 10);
        this.textfields = [];
    blackboard.clearAll = function():Void {
        this.clearChalk();
        this.clearText();
    blackboard.enterDrawMode = function():Void {
        this.innerBlackboard.onPress = this.startDraw;
    blackboard.startDraw = function():Void {
        var x:Number = Math.round(this._xmouse);
        var y:Number = Math.round(this._ymouse);
        var coordinates = [x + "," + y];
        this._parent.currentDrawing = coordinates;
        this._parent.drawings.push(coordinates);
        this._parent.chalkLayer.moveTo(x, y);
        this._parent.onMouseMove = this._parent.drawChalk;
        this.onRelease = function() {
            delete this._parent.onMouseMove;
    blackboard.endDraw = function():Void {
        delete this.onMouseMove;
        delete this.innerBlackboard.onRelease;
    blackboard.drawChalk = function():Void {
        if (this.hitTest(_root._xmouse, _root._ymouse)) {
            var x:Number = Math.round(this._xmouse);
            var y:Number = Math.round(this._ymouse);
            this.currentDrawing.push(x + "," + y);
            this.chalkLayer.lineTo(x, y);
        } else {
            this.endDraw();
        updateAfterEvent();
    blackboard.enterTextMode = function():Void {
        this.innerBlackboard.onPress = this.startText;
    blackboard.startText = function():Void {
        var d:Number = this._parent.textLayer.getNextHighestDepth();
        var x:Number = this._parent._xmouse;
        var y:Number = this._parent._ymouse;
        this._parent.textLayer.createTextField("t" + d, d, x, y, this._parent.width - x, this._parent.height - y);
        var tf:TextField = this._parent.textLayer["t" + d];
        this._parent.textfields.push(tf);
        tf.type = "input";
        tf.multiline = true;
        tf.wordWrap = true;
        tf.restrict = "^'<>";
        tf.setNewTextFormat(this._parent._parent._parent.chalkFormat);
        tf.embedFonts = true;
        tf.text = "Type message";
        Selection.setFocus(tf);
        Selection.setSelection(0, tf.text.length);
        tf.onKillFocus = function() {
            this.type = "dynamic";
            this.selectable = false;
    blackboard.formatEntry = function():String {
        var tf:TextField;
        var d:Object;
        var entryXML    =  "<entry>";
        entryXML        +=         "<text>";
        for (var i:Number = 0; i < this.textfields.length; i++) {
            tf = this.textfields[i];
            entryXML    +=            "<field x='" + tf._x + "' y='" + tf._y + "' text='" + tf.text + "' />";
        entryXML        +=         "</text>";
        entryXML        +=         "<drawings>";
        for (i = 0; i < this.drawings.length; i++) {
            d = this.drawings[i];
            entryXML    +=            "<drawing coordinates='" + d.join("|") + "' />";
        entryXML        +=         "</drawings>";
        entryXML        += "</entry>";
        return escape(entryXML);
    blackboard.clearAll();
    blackboard.innerBlackboard.useHandCursor = false;
    blackboard.width = blackboard._width;
    blackboard.height = blackboard._height;
    draw_bn.onRelease = function() {
        blackboard.enterDrawMode();
        text_bn.gotoAndStop("_Up");
        text_bn.enabled = true;
        this.gotoAndStop("_Down");
        this.enabled = false;
    text_bn.onRelease = function() {
        blackboard.enterTextMode();
        draw_bn.gotoAndStop("_Up");
        draw_bn.enabled = true;
        this.gotoAndStop("_Down");
        this.enabled = false;
    clear_bn.onRelease = function() {
        blackboard.clearAll();
    submit_bn.onRelease = function() {
        var name:String = name_if.text;
        if (name == "" || name == "name (required)") return;
        var email:String = email_if.text;
        if (email == "" || email == "email (required)") return;
        entry = new LoadVars();
        entry.name = name;
        entry.email = email_if.text;
        entry.message = blackboard.formatEntry();
        returnEntry = new LoadVars();
        returnEntry.onLoad = traceReturn;
        entry.sendAndLoad("submitEntry.php", returnEntry);
    function traceReturn() {
        if (this.result == "success") {
            blackboard.clearAll();
    name_if.onSetFocus = email_if.onSetFocus = function() {
        this.text = "";
        delete this.onSetFocus;
    name_if.restrict = email_if.restrict = "^'<>";

  • Loading external SWF's into an SWF Loader as3 style?

    Hi,
    I've recently made the switch from as2 to as3 and am still struggling to get my head around one aspect in particular. I've managed to load one external swf into a blank file via the script
    import LoadDisplayObject;
    var loader:LoadDisplayObject = new LoadDisplayObject("button_01.swf", true);
    loader.addEventListener("displayObjectLoaded", onComplete, false, 0, true);
    addChild(loader);
    function onComplete(evt:Event):void {
         trace("loaded complete received");
         loader.scaleX = loader.scaleY = .75;
    .....however I'm struggling with the script to make a swfs load into a space when one of my 3 buttons is clicked....
    My page currently has three buttons (button_01, button_02 and button_03) and in a local folder three separate swfs with the same names which I wish to load in, when the appropriate button is pressed. 
    I have managed to get them to load in using a tutorial...however they load over the top of each over...far from ideal. From research on the internet I've found a range of different script...but I just can’t find anywhere I can find script to make this work..hence why I have turned to here.
    Any help much appreciated...thanks in advance.

    Hi,
    Just throught I would let you know that I've manged to get this to work this morning. Changed the script slightly and used a different method of:
    var home:MovieClip = this;
    function butt1Click(evt:MouseEvent):void {
        var ldr:Loader = new Loader();
        ldr.load(new URLRequest("button_01.swf"));
        ldr.contentLoaderInfo.addEventListener(Event.INIT, loaded);
    function butt2Click(evt:MouseEvent):void {
        var ldr:Loader = new Loader();
        ldr.load(new URLRequest("button_02.swf"));
        ldr.contentLoaderInfo.addEventListener(Event.INIT, loaded);
    function butt3Click(evt:MouseEvent):void {
        var ldr:Loader = new Loader();
        ldr.load(new URLRequest("button_03.swf"));
        ldr.contentLoaderInfo.addEventListener(Event.INIT, loaded);
    function loaded(evt: Event):void {
        if(contentClip.numChildren > 0){
            contentClip.removeChildAt(0);
        contentClip.addChild(evt.target.content);
    button_01.addEventListener(MouseEvent.MOUSE_UP, butt1Click);
    button_02.addEventListener(MouseEvent.MOUSE_UP, butt2Click);
    button_03.addEventListener(MouseEvent.MOUSE_UP, butt3Click);
    seems to work well. Only small question is if I want one page to load automatically upon opening...how do I alter the script to do this??? Thanks

  • Textbox shows xml text in working file but now when loaded into another SWF

    Hi all,
    I have downloaded an xml gallery (as2) as we needed one for an old as2 file. Now I mostly use as3 but thought as I only needed to tweak it there would be no probs. Of course, it rarely works out that way. The problem is, text loaded from the xml file is displayed with its corresponding image. This works fine in the file. When I load the SWF into another SWF however, it all works EXCEPT the text doesn't show at all?? Whoever made the gallery used 'device fonts' in the textbox, I don't know if this has anything to do with it. I tried changing the textbox to dynamic and embedding characters but still nothing.
    This seems the key line -
    _root.descmc.desc.htmlText = XMLdaten[number];
    I have also tried
    _root.descmc.desc.htmlText = XMLdaten[number].firstChild;
    This traces out the correct xml data when tested so it is finding it okay.
    Any help would be much appreciated.
    Thanks

    The problem might be in the use of the "_root"  You probably need to set _lockroot = true; in the loaded swf, otherwise the _root is that of the loading swf, not the loaded one.

  • Loading AS2 mc's into AS3 movies

    Hi. Using the following code to import AS2 mcs into AS3.
    var contenedor = new Loader();
    contenedor.load(new URLRequest("animal_catch2.swf"));
    addChild(contenedor);
    contenedor.x = 100
    contenedor.y=0
    BUT doesn't work too well. Games don't work but and the image is displaced. Would appreciate any help.
    Thanks in advance.

    Sorry, excuse me. The displacement was becuase I cut and pasted the and I've just seen x = 100.
    Anyway, the game still doesn't work.
    Also, even if mcs are imprted and have different sizes than the container, can't they fill the container anyway - with fullscreen or something.

  • AS3 swf loaded as AVM1Movie

    I have an as3 proj in flex.
    I have a custom class Screen which is complied into a swf (by
    flex)
    I'm loading this file via a Loader..., then passing data up
    to it on INIT.
    fine that works great for the first time, second time, then
    on the third time nothing.
    when I trace for the type of the Loader.content, the first
    two times it traces [Screen,Object] as expected but on the third
    time it traces [AVM1Movie, Object].
    what's this about?? is it some security thing??
    the relevent code is below - the path resolves in all cases
    to the same path (..../SimpleScreen.swf)
    // ActionScript file
    package gs.ctl
    // imports
    import flash.display.DisplayObjectContainer;
    import flash.display.Loader;
    import flash.events.Event;
    import flash.events.EventDispatcher;
    import flash.net.URLRequest;
    import flash.system.ApplicationDomain;
    import flash.system.LoaderContext;
    import gs.mdl.LoadXmlUnicode;
    import gs.vw.Screen;
    import mx.utils.StringUtil;
    import utils.LogEvent;
    public class Navigator extends EventDispatcher implements
    INavigator{
    private var _currentScreenLoader:Loader
    private var _currentScreen:Screen
    private var _currentScreenXml:XML
    private var _screenSetXml:XML
    private var _rootScreen:DisplayObjectContainer
    private var _pathUserRoot:String
    private var _pathData:String
    private var _pathAssets:String
    private var _URLscreenSet:String
    private var _legalScreenItems:XMLList
    private function _changeScreen():void{
    var URLReq:URLRequest = new
    URLRequest(_pathUserRoot+"\\"+_pathAssets+"\\"+_currentScreenXml.url);
    var context:LoaderContext = new LoaderContext();
    context.applicationDomain = ApplicationDomain.currentDomain;
    _currentScreenLoader=new Loader();
    _currentScreenLoader.contentLoaderInfo.addEventListener
    (Event.INIT, _initHandler)
    _currentScreenLoader.load(URLReq, context);
    private function _initHandler(event:Event):void{
    if(_rootScreen.numChildren==2)_rootScreen.removeChildAt(0)
    trace("type = "+_currentScreenLoader.content)
    _currentScreen=Screen(_currentScreenLoader.content);
    _rootScreen.addChild(_currentScreen)
    _currentScreen.setData(screenXml, _legalScreenItems,
    _pathUserRoot+"\\"+_pathAssets+"\\");
    _currentScreenLoader.unload();

    -- When u say first time, seccond.... you mean each time you
    compile your flex applicaction?
    I mean every time the changeScreen function is called... ie
    at run time.
    strange eh??
    this is no longer an urgent issue, as i've change the
    architecture now (much better :~) but I would like to know whats
    happening

  • Embed AS3 swf into a AS2 FLA?

    HI, I have a flash site designed in AS2 and want to embed a
    AS3 video player in it. If I republish the AS2 site to AS3 the
    website doesnt function, and if I load the AS3 swf into the
    website, the Player doesnt function.
    I need the AS2 functionality on the website and I need the
    advanced AS3 functionality on the video Player.
    Is there any way to get these two guys to talk to each
    other?

    Creating a 3rd fla, to load the AS2 Fla and the AS3 FLA just
    aint gonna fly. This website is updated daily and its just too much
    of a maintenance nightmare.
    However, I do want to use Wabbits suggestion but I dont know
    how to create a web object.
    The GetURL function opens the swf on its own, which I dont
    want to do. I want it to open the AS3 SWF in a small window within
    the page.
    Can someone help please? Thanks in advance,

  • Other problems with loading Captivate files into Flash AS3 project

    I have a Captivate file done with Captivate 3, published to
    Flash player 9 that is being loaded into Flash AS3. The captivate
    is a simple recording of some mouse clicks in a browser. I am
    displaying the playbar along the bottom, and its buttons all work
    fine except for the progress bar, where you can drag the knob and
    scrub back & forth in your presentation.
    This progress bar is not working as it should. I see the
    mouse cursor change to a hand, but when I click I cannot drag the
    knob to control the progress bar. The other buttons in the playbar
    do work (replay, pause, play, back, forward).
    This is a unique problem in that it is only happening when
    viewed in IE (7) when loaded into my Flash AS3 project. When viewed
    in Firefox in my project, or as a standalone SWF, or as a SWF
    simply embedded onto a plain HTML page, it works just fine.
    Does anybody have any insight?
    Another thing I notice with loading Captivate files with AS3
    is the the amount of output messages it displays. Rather annoying
    (unless this is a "feature" I've yet to be aware of - heh)

    Hi,
    I know exactly how you feel, there is simple answer; replace
    Captivate for Camtasia Studio 5 at techsmith.com. The weight on
    those shoulders will be gone! You'll smile more, be more
    socialable. One Happy Person.
    I am very happy person ;)
    Kind Regards,
    Boxing Boom

  • GetURL not working when swf is loaded into another swf

    Ok, I need some help for something relatively simple which
    for some reason I've not been able to find any information on at
    all?
    Hopefully it will be something easy to fix.
    Essentially I have the following:
    my main movie "Home.swf"
    another movie "Sub.swf"
    I've loaded "Sub.swf" into "Home.swf" via an empty movieclip.
    Within "Sub.swf" I have some links which when clicked call
    getURL and open a HTML page in the browser.
    But for some reason the getURL isn't working and I believe
    its because the getURL is called from a loaded movie within
    "Home.swf".
    I've tried changing the actionscript to:
    _root.getURL('/mypage.html');
    _parent.getURL('/mypage.html');
    but neither (_root / _parent) seems to work?
    Need help here please.
    Many thanks.
    Kind regards,
    M.

    Hi kglad,
    Yes the button is definitely firing ok.
    In the "Sub.swf" movie, on the second frame of the timeline
    (the first frame is some preloader code) there is the following
    code:
    imgMC.mascara.onPress = function() {
    //trace('mc[activo] = ' + mc[activo]);
    switch(mc[activo])
    case _level0.imgMC.MC0:
    trace('0 - ' + mc[activo])
    break;
    case _level0.imgMC.MC1:
    trace('1 - ' + mc[activo])
    break;
    case _level0.imgMC.MC2:
    trace('2 - ' + mc[activo])
    break;
    case _level0.imgMC.MC3:
    trace('3 - ' + mc[activo])
    break;
    case _level0.imgMC.MC4:
    trace('4 - ' + mc[activo])
    break;
    case _level0.imgMC.MC5:
    trace('5 - ' + mc[activo])
    break;
    If I run this movie in Flash (ctrl-enter) then the trace
    works fine.
    But the trace stops working when I run the main "Home.swf"
    movie in Flash (ctrl-enter) when the "Sub.swf" is loaded into an
    empty movie clip.
    And when I change the trace for a getURL and test in a
    browser it still doesn't work?
    What do you reckon?
    Thanks.
    M.

  • Need help with loading child .swf into parent .swf

    Hello,
    I am having trouble with an external .swf that isbeing loaded
    into the master.swf. All of the files loads perfectly. However the
    .swf that has the contact form movieclip in it will not work. The
    combobox does that display any of the items listed and the form is
    not being sent to the server. Can anyone give me a hand with
    this?

    can you post your code

Maybe you are looking for

  • Bt openzone/FON connection issue

    Ok so I often use this specific btopenzone wifi hotspot, used it for a couple hours every now and again for ages. Hit a problem now though my laptoop no longer connects to it. it sees it i click connect but it just keeps coming up no internet connect

  • Advance payment through APP

    HI Kindly let me know the below process I want pay advance paymnet through F110 ,KINDLY Explain step by step process and what are the configuration settings to be required Teja

  • ORA-06502: PL/SQL: numeric or value error: NULL index table key value Repor

    W've been experiencing the Oracle Error: ORA-06502: PL/SQL: numeric or value error: NULL index table key value Report' [we are currently on apex v3.0.1]. From the forum there was a reference to a bug fix: apex bug (6416829) fixed in 3.1. When we view

  • Java Config for parameter disp/ms_keepalive_timeout

    hi All, understand that in abap server we can configure the idle time at this parameter disp/ms_keepalive_timeout to make sure that the user not automatic logoff from server when they idle, now i having a sap as java system which the user are accesin

  • Activating objects but not showing up in Cache Status Overview

    Hello SDN. We are on PI 7.1. A strange thing started happening. I can change an object and when activate, I get success, but in checking the Cache Status Overview it does not show up. We set up our SLD as follows SC_Systems (i.e. SAP, Outside Vendors