AS2 swf problem under AS3 swf (probably Tweener problem)

Hello. I have this problem for a days and it hasn't been soluted yet although I put it on couple of forums. I have 3 files: test.fla, file_as2, file_as3.
The test.fla file is a typical Loader, which loads external swf files and shows them on the screen. After any key is pressed, the swf is deleted from the screen and loaded again.
The file_as2 and file_as3 are the AS2 and AS3 compiled having a simple square animation (6 squares fading in from alpha 0 one by one) animated by caurina Tweener. If the file_as3 is compilated and loaded externally there is no problem (six sqares are fading in, after pressing any key the vanish and appear (loaded) again and again...). But if the swf as2 file is loaded, it shows the squares only once and after pressing any key and loading it again, it doesn't shows it at all.
I guess it's Tweener problem, because when i trace it in AS2 file (onUpdate) it traces only at the beginning.
How it's possible, that AS3 somehow stops all Tweeners in 2nd time loaded AS2 file?? How to fix it?? Sorry for my english, i left a link for these 3 files to find solution. Try it (test.swf) and then change path inside fla to load AS2 file... Thanks for any ideas.
Link to download: http://www.filolozka.pl/zip/file.ZIP

Instead of reusing the same Loader, try loading the AS2 movie multiple times using different Loader instances. Instead of using event listeners like normal, this should be easy to do because you can addChild each Loader instance, and when it is loaded it will automatically play. If you are able to load the AS2 movie multiple times at once and have it work for you, then the problem must be in the way that you removing the old movie, and reusing code to load the movie again.

Similar Messages

  • Tweens don't work in multiple external AS2 SWFs loaded by AS3 SWF

    When I try to load a single external AS2 SWF in an AS3 parent
    SWF, scripted tweens using the mx.tween class work fine. However,
    when I load two or more external AS2 SWFs, the first will work, but
    in subsequent SWFs the tweens do not animate. Does anyone have a
    solution?
    Related post:
    http://www.actionscript.org/forums/showthread.php3?t=147637

    SymTsb,
    So what is the code to do that? To delete the TWEEN variable?
    easeTime = .5;
    var day_handlerX:Tween = new
    mx.transitions.Tween(daynightlabel_mc, "_x",
    mx.transitions.easing.Regular.easeOut, daynightlabel_mc._x,
    (left_point+daynightlabel_mc_leftDifference), easeTime, true);
    day_handlerX.onMotionFinished = function() {
    trace("day_handlerX="+day_handlerX);
    trace("day_handlerX onMotionFinished triggered");
    delete day_handlerX;
    trace("deleted day_handlerX="+day_handlerX);
    does not work. the TWEEN object is still there.
    Can ADOBE say something??
    AS3 is ...

  • 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
    >

  • Is loading a as2 swf into my as3 flash site the problem here?

    My question is listed on another board here, but I am too inexperienced to understand how to fix my issue:
    http://forums.adobe.com/message/5045059#5045059
    I went on flashkit.com and a member there immediately said that it "sounds like the problem is using the AS2 swf loaded into the AS3 swf."
    If it is... this mean I will have to convert everything in the AS2 .swf (including the XML retrieval script) to AS3. I may need some help with that if that is the problem.
    So will AS2 swfs cause XML communication and retrieval issues if loaded with a loader script into an AS3 file?
    Everything works (the buttons are clickable and when you click on a square in the "thumbnails" scroller it displays the correct photo title and captions), except I just cannot see the actual photos in my XML gallery. I am truly clueless as to why this happens and I've searched for days straight and tried many things...
    You'll find all the details of my problem in the above link.
    Thanks!

    Its really not worth the trouble to get as2 working with as3 if your goal is to make an xml driven gallery. There are literally thousands of free examples/tutorials how to achieve that feature with 50+ LOC. Like this one.

  • Loading an AS2 Swf into an AS3 project

    I have a need to be able to load legacy AS2 SWF's into a new
    AS3 project. I know that this is not readily possible, because you
    can only communicate between the two via the LocalConnection class.
    So, what I have done is to create an AS2 proxy SWF. This SWF will
    handle the loading of all legacy SWF's and act as a middleman to
    pass the function calls between the pre-compiled SWF and the new
    SWF using the LocalConnection class. The new SWF also needs to be
    able to load AS3 SWF's, though.
    Because of this, I have the need to detect the AS version of
    the loaded SWF. If 1 or 2, then change the source to the
    AS2Proxy.swf, if 3 then simply load it.
    I have written the following code. My problem comes in when
    the init event fires. Regardless of the compiled version of the
    loaded SWF, it always traces 3 as the AS version.

    Alright, I solved this problem, only to come up with many
    more.
    To solve this problem, I needed to point to the loaderInfo
    object of the UILoader's content. So:
    simulation.content.loaderInfo.actionScriptVersion.
    Now the proxy loads correctly, but I start getting errors
    immediately. Let me paste some code to show the next steps:
    First off. I immediately receive a StatusEvent error, though
    the path gets sent into the proxy and loads correctly.
    Next, when the complete event fires in the AS2 SWF - it sends
    a completion back up to let the AS3 SWF know that it finished (and
    any handling that needs to happen at that point.) I receive the
    following error:
    Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095:
    flash.net.LocalConnection was unable to invoke callback loadSwf.
    error=ReferenceError: Error #1069: Property loadSwf not found on
    com.applied.flash.events.AS2Connect and there is no default
    value.

  • Convert AS2 swf to AS3 swf

    I have a swf (written in AS3) that loads other swfs into it.
    There are no issues when loading other AS3 swfs but there is a
    problem loading AS2 swfs. I get the following error:
    TypeError: Error #1034: Type Coercion failed: cannot convert
    flash.display::AVM1Movie@35d3a51 to flash.display.MovieClip.
    Is there any way to convert the AS2 swf into a AS3 swf so it
    will be compatible with my loader? I cannot go back and change the
    AS2 swfs because I do not have the fla files. Or is there any way
    to incorporate AS3 code that will load AS2 swfs properly? It seems
    hard to believe that Adobe would neglect this backwards
    compatibility issue. Thanks

    Hello Andrei1,
    Thanks for looking at my simple AS3 code. The AS2 swfs that
    I've been working (and having difficulties) with are components
    that I've purchased from places like www.flashden.com. Some are
    image transitions (such as "Dynamic Image Draw found at
    http://www.flashden.net/item/dynamic-image-draw/7532)
    while another is used to create a looped banner rotator animation
    (IMG_loop, a free d/l from www.afcomponents.net). I have another
    that uses an .xml file to configure a slideshow animation.
    You mention "needing to do more" if AS2 scripts inside its
    swf are to be run by the parent AS3 fla; what would these lines of
    code be?
    In researching my problem further I've since realized that
    most of these issues deal both with the version of AS used, as well
    as the version of the Flash player the fla is set up to animate
    for. In particular, the "Dynamic Image Draw" component requires
    that Flash Player 8 or 9 be used with AS2.
    Given that many of my purchased components are like this,
    I've since changed my main fla movie from AS3 back to AS2 and have
    learned that the scripting needed to call individual multiple swfs
    into it at various points in the timeline is MUCH simpler!!!!! One
    single, easily interpreted, line of code vs. 5 lines using
    variables and much more arcane (to me) function calls.
    I started my file with AS3 figuring that I'd be better off
    learning the new version of the language; much stress and
    forehead-rubbing later, I've seen just how much easier and
    understandable AS2 is to learn.
    I recognize that there are likely very strong arguments for
    the more structured coding approach used by AS3, but for someone
    like me who wants to generate customized Flash presentations with
    little fuss, I'm not qualified to make them.
    Perhaps this is a no brainer for those many flash gurus out
    there, but for me this tiny bit of wisdom has been hard fought for!
    That being said, is there an easy way to convert a swf file
    created using AS2 to something that AS3 can work/interact with?
    I've come across a free d/l product called actionscript bridge, but
    haven't been able to understand how to get it to work.

  • Loading an AS2 swf into a AS3 project?

    I have an AS2 swf that is merely an image gallery made with a few components. I tried loading this swf into an AS3 project I am working on and it seems to load in and play properly in my AS3 file. I'm not looking to communicate with the AS2 swf with AS3 code, I just want to display it and be able to use the component buttons in the AS2 file that play or stop the images from being played.  I was wondering if using this will cause any potential issues in my AS3 project. It seems to render and work fine on my machine. Thanks

    as2 swfs will play without problem when loaded into an as3 swf.

  • AS3 issue embedding AS2 .swf files

    Hi there,
    I'm attempting to create a menu navigation system with Flash/AS3 that opens up a series of older AS2 activities.
    At the moment I'm testing it with two buttons/two activities.
    The problem I'm having is that when I'm testing the navigation, the first button clicked will open its respective activity correctly, which can then be shut down using the original activity's exit button, and return to the two buttons on my AS3 menu. However, if I then select the other activity from the same screen, it won't load. I'm able to click the original activity again, and have it open, but not the new one.
    If I test the main flash navigation file again and click the other button first (that wasn't working), the other activity opens fine, and can be closed down. However the first button now won't open the activity. So both the buttons work (if they're the first ones clicked), but from then on, only the first button clicked works.
    In the debug panel, it looks as if the AS2 .swf files that I'm attempting to embed are themselves embedding a wrapper.swf file (with navigation buttons) as well as another sub set of shared .swf files for their own operation. Might it possible that these sub swf files aren't being unloaded properly when I switch between the main AS2 movies from my menu system?
    Is there a way to clear/unload everything that's been loaded (even resources loaded by the external files themselves - like a hard reset) between button presses?
    I have no access to the original AS2 code as this was done by another team years back.
    I'd be really grateful for any help or advice that anyone might be able to give.
    Thanks

    Just looking at the debugging panel, this is what I see when I try and run the program:
    Attempting to launch and connect to Player using URL /*****/*****/****.swf
    [SWF] Volumes:Data:Documents:*****:****:****:*****.swf - 876582 bytes after decompression
    [SWF] Volumes:Data:Documents:*****:****:****:*****:F11_pr_qu_3:quiz.swf - 176016 bytes after decompression
    LocateFolders.enginesFolder(file:///*****/****/****/*****/F11_pr_qu_3/quiz.swf)
    [SWF] Volumes:Data:Documents:*****:****:****:*****:F11_pr_qu_3:wrapper.swf - 481279 bytes after decompression
    ### Latest wrapper ###
    etc etc...
    Then follows a whole set of loading instructions and trace instructions put in the as2 swf which show XML files being loaded and the program launching. These must have been put in place by the previous programmer.
    When I click the exit button on the 'embedded' swf, the debugging panel shows things shutting down:
    ActivityToolbar clickQuit()
    Wrapper quitActivity()
    EndGame clear(false)
    Now when I click the second button, I should see a similar set of launching greetings etc. instead it bottles out at the following:
    [SWF] Volumes:Data:Documents:*****:****:****:*****:F11_wb_fc_1:flashcards.swf - 94720 bytes after decompression
    LocateFolders.enginesFolder(file:///file:///*****/****/****/*****/F11_wb_fc_1/flashcards.s wf)
    And there it stops.
    If I restarted the program and pressed the second button first, it would show the flashcards.swf activity loading correctly, but would then refuse to load the first activity when I clicked on the button.

  • AS2 swf to AS3 local Connection

    Hello:
    I am embedding multiple copies of a single AS2 swf build in
    FLASH into a FLEX2 AS3 swf. I am using LocalConnection to
    communicate from FLEX to the flash swfs. This exhibits the strange
    behaviour that only the last loaded swf actually works correctly.
    The swf is a told to gotoAndStop at a particular frame. I trace the
    FLASH swf function and it is getting the correct frame number from
    FLEX. But it does not work correctly.
    see a samle at
    http://www.miragevideo.com/test.html
    The problem seems to be the localConnectin being shared by
    three similar instances of the gauge class. Any ideas??
    Here is the FLEX code
    <?xml version="1.0"
    encoding="utf-8"?>
    <mx:Canvas xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="400" height="200"
    horizontalScrollPolicy="off"
    verticalScrollPolicy="off">
    <mx:Image id="gaugeSWF"
    source="@Embed(source='../../resources/gauge.swf')"
    creationComplete="init();" />
    <mx:Script>
    <![CDATA[
    import flash.net.LocalConnection;
    private var toFlash_lc:LocalConnection = new
    LocalConnection();
    private var _amount:int;
    private function init():void{
    toFlash_lc.addEventListener(StatusEvent.STATUS, onStatus);
    toFlash_lc.send("lc_from_Flex",
    'setGauge',_amount) ;
    public function set amount(val:int):void{
    _amount = val;
    private function onStatus(event:StatusEvent):void {
    switch (event.level) {
    case "status":
    // trace("LocalConnection.send()
    succeeded");
    break;
    case "error":
    trace("LocalConnection.send() failed");
    break;
    ]]>
    </mx:Script>
    </mx:Canvas>
    and the FLASH code:
    // Code in the receiving SWF file
    var receiving_lc:LocalConnection = new LocalConnection();
    receiving_lc.setGauge = function(frame:Number) {
    trace("in flash frame= " + frame +
    " angle: " + ((frame/100)*180));
    mask._rotation = -(frame/100)*180;
    angle.text = frame.toString();
    receiving_lc.connect("lc_from_Flex");
    stop();

    You can only have 1 LocalConnection per sender/receiver. If I
    have 2 SWFs, A and B. If I want A and B to send messages to each
    other, I need 2 LocalConnections. If I have 3 SWFs and want
    bi-directional communication between all of them, I'd need 6
    LocalConnections. Add a 4th SWF and you'll need a total of 12 and
    so forth.

  • Nest AS3 swf into AS2 swf

    I purchased a flash template written in AS2, i have all files needed to customize this site, .fla, psd's you name it. I also purchased a photo gallery that is written in AS3 (did not know it was AS3 when purchased) . My question: is there any way to embed/nest the AS3 photo gallery, which i the swf file for, into my AS2 website?

    Per AS3 documentation:
    A single SWF file cannot combine ActionScript 1.0 or 2.0 code with ActionScript 3.0 code.
    SWF files written in ActionScript 1.0 or 2.0 cannot load SWF files written in ActionScript 3.0. This means that SWF files authored in Flash 8 or Flex Builder 1.5 or earlier versions cannot load ActionScript 3.0 SWF files.
    The only exception to this rule is that an ActionScript 2.0 SWF file can replace itself with an ActionScript 3.0 SWF file, as long as the ActionScript 2.0 SWF file hasn't previously loaded anything into any of its levels.

  • Load as2 swf in as3 swf

    Hi All,
    I am new to this forum.
    Can anyone tell me how to load as2 swf in as3?
    If this is possible,can anyone give me some sample example?
    Thanks
    Harshal

    You can talk to loaded AVM1 (AS1/2) SWF using LocalConnection. I used Grant Skinner's SWFBridge class in the past and worked very well:
    http://gskinner.com/blog/archives/2007/07/swfbridge_easie.html
    Kenneth Kawamoto
    http://www.materiaprima.co.uk/

  • How do you load an AS2 swf into AS3?

    I think this is the way around my dilemma. How do you load and AS2 .swf into an AS3 file?
    thanks again!
    Steve

    check that code in your last thread:
    What is the  code to load a .swf file in AS3 on the same layer?

  • AS2 SWF loaded inside a AS3 SWF

    Hi,
    In a recent project I had to load a FlashPaper2 document
    inside a SWF implemented in AS3. I read a couple of articles about
    Darron
    Shcall's article and
    FlashInterface
    but none of them seemed to be useful in my case.
    I needed to load a FlashPaper SWF inside a AS3 and couldn't
    rely on ExternalInterface since they were not two separate SWF's.
    To be more clear, I was using the Loader class via a Sprite to load
    the FlashPaper SWF.
    Anyways, I created FlashPaperLoader.SWF implemented in AS2
    which was used to load the FlashPaper SWF. This loader was able to
    communicate with the FlashPaper APIs (AS2). As you can guess, the
    AS3 SWF was used to load the FlashPaperLoader.swf.
    What I don't understand is how come the FlashPaperLoader the
    FlashPaper document SWFs can communicate with each other thru AS2
    function calls when they are loaded inside a AS3 SWF, I thought
    that due to VM differences, no communication is possible!
    I hope I was clear, if I was, any guru insight is really
    appreciated.
    Cheers.

    Thanks kglad,
    But you still haven't answered my question. I am not looking
    for solutions, my own solution works. I wanted to understand more
    about the VM's.
    AS3
    var request:URLRequest = new
    URLRequest("./FlashPaperLoader.swf");
    var loader:Loader = new Loader();
    loader.load(request);
    AS2
    var loader:MovieClipLoader = new MovieClipLoader();
    loader.loadClip("./FlashPaperDoc.swf", fpContainer);
    // the loader SWF used IFlashPaper APIs to communicate with
    the FlashPaper SWF.
    Now, the first part (AS3), all that code is interpreted by
    VM2. Once an AS2 SWF is loaded a
    AVM1Movie
    is created and no direct communication between AS3 and AS2 is
    possible. I am curious to know how come the two AS2 SWFs can
    communicate with each other while inside the VM2 space.

  • AS2 .swf to AS3.swf

    This may have been posted somewhere else however I have created a series of AS2 .swfs and now that I am using captivate 5 i need to convert them to as3.swf
    Can anyone help

    That's going to depend on whether or not there's any AS2 code in your SWFs and how complex that code is.
    Did you create these SWFs in Flash?  If so, what version?  If it's Flash CS3 or above you should be able to open the original FLA files and change your publish settings to output as AS3.
    If you've programmed a lot of interactivity into these SWFs as AS2 and you don't know AS3, you'll need to either learn it yourself or pay someone that does.

  • Playing AS2 SWF fiel in Flash CS4

    Naive question perhaps... Does anyone know how adobe plays the AS2 SWF file so beautifully, including being able to go to next frame or prev frame or zoom functions?
    I have tried many different ways to play an AS2 SWF in my flex (AS3) SWF loader and it is a very difficult problem. I use a AS2 Shell as a proxy and I use local connection to communicate between the two AVMs. The result is quite a horrible one because, I am not able to scale the swf very well and also have a torrid time with the debugger.
    Does anyone know of any special methods used by Adobe to achieve that in CS4 Flash or do they also use LocalConnection to play the AS2? Thanks

    Hi Kglad,
    I am indeed using LocalConnection. My requirement is to load an AS2 SWF in my flex app and be able to control the playing of the AS2 file. After a lot of research, I found out that the only way to really accomplish that will be load a proxy AS2 shell swf in the main AS3 app using a SWF loader and to communicate with the AS2 shell using LocalConnection. Thru LocalConnection, I then pass the AS2 SWF movie name and have the peoxy shell load the SWF into an empty movie clip and play.
    This actually works, sort of. My problem is that I am not able to scale the AS2 SWF movie automatically. I can scale using the _xscale and _yscale properties, but to do taht, I need to know the width and height of the incoming SWF, which I don't know of a way of finding.My attempts to find it using the following code have resulted in bupkiss. the trace statement which attempts to show the width and height of the movie clip show 0 and the stage trace staement gives me the dimensions of the browser. Instead of what I really need is the width and height of the movie "fileName" that is loaded. Any thoughts? Thanks, Ramesh
            __vid = createEmptyMovieClip(__vid, 0);
            __vid._lockroot = true;
            __vidMCL = new MovieClipLoader();
            var mclHandler:Object = new Object();
            mclHandler.onLoadComplete = function(mc:MovieClip) {
                trace("wh vals are " + mc._width + "," + mc._height);
                trace("stage wh vals are " + Stage.height + "," + Stage.width);
                mc._xscale = 48;
                mc._yscale = 48;
                out_lc.send(LC_OUT_NAME(), "onPlayVideoResult", true);
            __vidMCL.addListener(mclHandler);
            __vidMCL.loadClip(fileName, __vid);

Maybe you are looking for

  • How can I get EVERY music file on my iPod onto my new Mac, not just the songs purchased off of the iTunes store?

    So I've got an iPod classic with songs on it from the iTunes store, from CDs of my own, from free online playlists, etc. and when I plug it into my new Mac laptop the only songs that show up on iTunes are the ones I actually purchased in the iTunes s

  • Printing with encrypted PDF

    I created a form (about 4MB with FormCalc scripts)with Adobe LiveCycle Designer 7 and could print it as a PDF from Adobe Reader. However, when I decided to include PDF Security using a password to restrict printing etc., I could no longer print the f

  • CMC Services won't run - CR XI

    Post Author: peachpx CA Forum: Authentication Hi - I just installed CR Server XI and none of the CMC services (CR Page Server , Destination Job Server, Event Server etc) are running and I can not make them to start. Please help.

  • Unannounced service call questions?

    Just a quickie post asking for help. Not sure if this is the place to post this: 1 - Around May, 2015 I had a Comcast truck / technician show up at my home 2 - He said he rang the doorbell and no one answered - I was home 3 - He started to check my c

  • Starts but doesn't run

    15" Original MacBook Pro (3 years old) 2.3 GHz intel, 2GB DDR2 Starts, login, desktop comes up, multiple programs open on boot... then the color wheel appears and all processes freeze... for a second I can move mouse, switch between apps with command