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);

Similar Messages

  • How can I make a transparent square box swf file in flash cs4?

    Hi,
    I have one picture imported into flash cs4 and would like to make a rectangle box which should be transparent. Finally I will save it as .swf file for later use. But the box should be transparent (without any background). How can I do that? Please do help.
    Thanks.

    Hi just a shot in the dark..
    Have you fiddled with movieclips and the alpha property?
    Best regards
    Peter

  • How can I use Flash_Slideshow.SWF in my Flash CS4 document?

    Hi,
    I have downloaded a nice Flash Slide show file (.SWF) and would like to use in my Flash CS4 document without any modification (as it is). How can I use it? There is no .Fla file this Slide Show. It just works using xml file.
    Please do help.

    Hi,
    You need to load a .swf file in your flash document using the loader class. I'm assuming you are using the AS3. Please click on the below link which helps you to use the loader class.
    http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/display/Loader.html
    Thanks

  • Error while loading a swf created in flash cs4, inside a flex application

    Hi there,
    I have created a rotating logo in flash cs4 using motion presets, named logoRotar.swf. I have used this inside my flex application:
    <mx:SWFLoader width="33.33%" height="100%" source="assets/logoRotar.swf">
    When I execute the flex application, I get this runtime error message:
    VerifyError: Error #1014: Class flash.geom::Matrix3D could not be found.
        at global$init()
        at fl.motion::AnimatorFactory3D/getNewAnimator()
        at fl.motion::AnimatorFactoryBase/addTargetInfo()
        at logoRotar_fla::MainTimeline()
    I also tried adding import flash.geom.*; statement in my flex application, I still get the same message.
    Flash player 10,0,22,87 is running in my browser.
    Please help me out....
    Cheers!
    Deepak

    Get Flex 3.3 and use -target-player=10
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Differences between the 2 ways to play local swf files in flash player

    There are 2 ways to allow the flash player to play local swf files:
    Add the directory/file of the swf to the Global Flash Player Trust directory. http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9 b90204-7c95.html
    Add the directory/file of the swf to the Trusted Location Settings in the Local Settings Manager.http://help.adobe.com/en_US/FlashPlayer/LSM/WS6aa5ec234ff3f285139dc56112e3786b68c-7ff0.htm l#WS6aa5ec234ff3f285139dc56112e3786b68c-7fea
    Adobe doesn't mentioned in the document what's the differences between these 2 methods, and they look has the same effect. But when I'm doing it on OS X, Safari 6.1, the first method doesn't work (It was working when I was using Safari 6.0). And then I tried method 2, it works…
    So I'd like to ask what are the differences between these 2 methods to play local swf files?

    For playing local SWF files, Download the Macintosh Flash Player 11.9 Projector
    It's a standalone app. Just copy it to your Applications folder. Launch it, and drag the SWF to the Dock icon. It'll play.

  • SWF management - Adobe Flash CS4 AS3

    I want to design my own website in flash. But I have a couple of questions about swf management.
    I have a frame which has buttons -it will be my main page- each button will call a swf file as
    submenu.
    For example I have the "about us" button. On click a swf -about us- submenu will appear.
    1. When I call -on the click of a button- a swf file I want that file to have no background, cause I
    want as background my current frame. -generally I want each swf file that i call to have no
    background. How can I do that?
    2. I want to call an intro animation. Its a swf file -short presentation of my copmany it lasts 10
    sec- I want that animation to play before my menu appears. how can I do that? Is it good Idea to
    call that intro as an external swf file or should I make it in my current project -my main page-
    3. (its similar to 2) Lets say that I have 2 layers. In my first layer and frame(1) I will place the
    movieclip1. In my second layer and frame(2) I will place movieclip2. Each movie clip lasts 10
    seconds. When I test my project I want to my first movieclip to be played (10 seconds) and then my
    second clip (another 10 seconds). What  should my actionsript be? One way that I figured out its
    that in order for my first clip to be played for ten seconds I have to place it on
    24fps*10seconds=240frames -the first frame will be the keyframe.
    thank you all in advance

    One last thing. I want now to combine importing code with your code.
    With the following code I am loading intro.swf from file "clips" into my project - first frame (1) - in a current position (x,y). It is supposed (for the imported swf) to start when I test the movie (project) and to go to the next frame when the intro clip (the same imported swf) is done.
    var Xpos:Number=110;
    var Ypos:Number=180;
    var swf:MovieClip=new Loader();
    var defaultSWF:URLRequest=new URLRequest("clips/intro.swf");
    stop();
    loader.load(defaultSWF);
    loader.x=Xpos;
    loader.y=Ypos;
    addChild(loader);
    myclip1.addEventListener(Event.ENTER_FRAME,checkF);
    function checkF(e:Event):void{
         if(e.target.currentFrame==e.target.totalFrames){
         myclip1.removeEventListener(Event.ENTER_FRAME,checkF);
         removeChild(loader);
         nextFrame();
    my questions for the code are:
    1. should be there a stop(); before the loader? (in the upbove code there is)
    2.Is the removeChild(loader) placed in the right line?
    3.Any corrections?

  • SWF Protection in Flash CS4?

    Hi i would like to know if there would be an "Encrypt
    ActionScript"-sorta like function in CS4?
    If you ask me what i think is so valueable that i should
    encrypt it i have nothing to say. I dont have anything important to
    encrypt!
    But for instance, a company wants to make a game with
    accounts and passwords. Wouldnt it be nice to be able to encrypt
    the ActionScript so that people can't decompile it?

    > But for instance, a company wants to make a game with
    accounts and passwords.
    > Wouldnt it be nice to be able to encrypt the
    ActionScript so that people can't
    > decompile it?
    That is just so much easier to do it server side rather than
    in Flash.
    Best Regards
    Urami
    "Never play Leap-Frog with a Unicorn."
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • How to play a .swf file with Flash player 9

    How do I open a .swf movie I have on my computer with the
    Adobe Flash Player 9 (OSX) I downloaded off the adobe website?
    Thank you for your help.

    You can also download Adobe Flash Player 9 — Standalone
    Players (Projectors) for Macintosh
    New Universal Binary Flash Player 9 Projectors are available
    for users of Intel-based Macintosh computers.
    Download the Flash Player 9 Standalone players:
    http://www.adobe.com/support/flashplayer/downloads.html

  • Kann man mit Flash CS4 eine (SWF 1.0) Animation erstellen

    Ich habe folgendes Problem:
    ich möchte eine SWF Animation in Flash CS4 erstellen, das hat auch Super funktioniert,
    die SWF Ausgabe hat aber leider keinerlei Optionen für die einzelnen SWF Spezifikationen.
    Ich müsste die Animation mit den gültigen Spezifikationen von SWF 1.0 ausgeben lassen können.
    Da ich das ganze später per Java Script in meine Homepage integrieren will.
    Da durch diesen Umweg der Flash Inhalt auch auf mobilen Endgeräten (iPhone usw...) zu sehen sein wird.
    Kann mir hier vielleicht jemand weiterhelfen?
    Liebe Grüße, Markus

    Schonmal vielen Dank für die Antwort,
    leider funktioniert das ganze auch über Device Central nicht.
    Ich bin mir nicht sicher ob es an der SWF liegt oder an dem Script,
    Beispielanimationen funktionieren im Script jedoch einwandfrei.
    Ich möchte meine Animationen nur gerne auf möglichst vielen Geräten ausführbar machen,
    da ich selber ein iPhone habe und auch sehr viele Leute mit iPhone kenne wäre es schön gewesen,
    auch auf diesen Geräten Flash zu nutzen, vielleicht ist das Script ja bald auch zu höheren SWF Versionen Kompatibel.
    Liebe Grüße, Markus

  • 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
    &lt;?xml version=&quot;1.0&quot;
    encoding=&quot;utf-8&quot;?&gt;
    &lt;mx:Canvas xmlns:mx=&quot;
    http://www.adobe.com/2006/mxml&quot;
    width=&quot;400&quot; height=&quot;200&quot;
    horizontalScrollPolicy=&quot;off&quot;
    verticalScrollPolicy=&quot;off&quot;&gt;
    &lt;mx:Image id=&quot;gaugeSWF&quot;
    source=&quot;@Embed(source='../../resources/gauge.swf')&quot;
    creationComplete=&quot;init();&quot; /&gt;
    &lt;mx:Script&gt;
    &lt;![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(&quot;lc_from_Flex&quot;,
    'setGauge',_amount) ;
    public function set amount(val:int):void{
    _amount = val;
    private function onStatus(event:StatusEvent):void {
    switch (event.level) {
    case &quot;status&quot;:
    // trace(&quot;LocalConnection.send()
    succeeded&quot;);
    break;
    case &quot;error&quot;:
    trace(&quot;LocalConnection.send() failed&quot;);
    break;
    ]]&gt;
    &lt;/mx:Script&gt;
    &lt;/mx:Canvas&gt;
    and the FLASH code:
    // Code in the receiving SWF file
    var receiving_lc:LocalConnection = new LocalConnection();
    receiving_lc.setGauge = function(frame:Number) {
    trace(&quot;in flash frame= &quot; + frame +
    &quot; angle: &quot; + ((frame/100)*180));
    mask._rotation = -(frame/100)*180;
    angle.text = frame.toString();
    receiving_lc.connect(&quot;lc_from_Flex&quot;);
    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.

  • In Flash CS4 a generated html with swf file won't play swf

    Using Flash CS4 and having the Flash plug-in ver 10 on my PC, the generated html file will not play the swf in the browser.
    I noticed that the active-x javascript is now included in the header as well as the javascript portion in the body tag.
    But it won't play.  I get the typical blank window in IE with the "X" in the upper left corner.
    I don't have this problem with Flash CS3.
    Any ideas what may be going on?
    Thank you.

    I am having similar difficulty; mostly I am confused.
    I want to open a flash video file in a frame within a webpage.
    I have generated a Flash CS4 html and swf file. When loaded they play, but they play on a separate, full size web page, not in the frame where I want it.
    I then generated FLV and F4V files but that doesn't work.
    It appears that I need to insert the object and embed tags "for Flash Movies" in the html file.
    Once I do that, do I go back to only putting in the html and swf files and create a link to the html file to bring up the video in the target frame?
    What are the FLV files for?

  • How can I import a .swf file in Adobe Flash CS4?

    Hi,
    How can I import a .swf file in Adobe Flash CS4?
    Thanks.

    you can use file/import but that would be a mistake.
    you should "load" your swf, not import it.
    if you want to load it and need help, are you using as2 or as3?

  • How to find totalFrames of Captivate 4 .swf in Flash CS4

    I have a series of Captivate4 AS3 .swf files that I am loading into an interface created in Flash CS4.  The files are loading and playing correctly, but I need to find a way to detect when an imported .swf gets to the end of it's timeline so that I can load the next one.
    Here's my code:
    var myLoader:Loader = new Loader();
    var movieURL:String = "resources/testTestTest.swf";
    var req:URLRequest = new URLRequest(movieURL);
    var currentMovie;
    var endShow:Boolean = false;
    myLoader.addEventListener(Event.COMPLETE, loadComplete);
    function loadComplete(evt:Event)
        currentMovie = myLoader.content;
        currentMovie.rdcmndPause = 0; //fails to pause imported .swf
        trace(currentMovie.cpInfoCurrentDate); //fails to trace out
    addChild(myLoader);
    myLoader.load(req);
    Please, help!!

    I forgot to add "contentLoaderInfo" to the myLoader eventListener.  Here's my working code:
    Captivate- output to AS3, make sure Flash player is same as destination
    AS3 code from flash UI:
    //initial variables
    var myLoader:Loader = new Loader();
    var movieURL:String = "fileName.swf";
    var req:URLRequest = new URLRequest(movieURL);
    var currentMovie:*; //data type movie; use wildcard- data type unavailable at compile time
    myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
    function loadComplete(evt:Event):void
        currentMovie = MovieClip(myLoader.content);//data type imported .swf
        trace("frame count = " + currentMovie.rdinfoFrameCount); //rdinfoFrameCount is a Captivate var
        //trace("current frame = " + currentMovie.rdinfocurrFrame); //rdinfoFrameCount is a Captivate var
    addChild(myLoader);
    myLoader.load(req);
    //set up timer to check to see if current frame == total frames
    var endTimer:Timer = new Timer(1000);//runs every sec.
    endTimer.addEventListener(TimerEvent.TIMER, onTimer);
    endTimer.start();
    function onTimer(evt:TimerEvent):void
        //trace("current frame = " + currentMovie.rdinfocurrFrame);
        if((currentMovie.rdinfocurrFrame + 10) >= currentMovie.rdinfoFrameCount) //had to add 10 to current frame
         //write your function here
        endTimer.stop();

  • Flash player can't play a .swf file alone

    I've have a weird issue regarding flash.
    I used Flash CS5 to create an interactive presentation. Everything works perfectly.
    My problem is, for some unknown reason, everytime I try to open a stand alone .swf using flash player, the player always opens my interactive presentation instead  and tries to load the .swf INTO it. Using the finder's info window, when I do select a .swf, I get the information all my .swf have been changed to "interactive presentation files", and the default application assigned to open these files is my own presentation.
    I can manually change these settings to select Flash player or Flash CS5 back as the default application for all .swf's, but as soon as I close the info window, the files immediately becomes "interactive presentation" files again, so Flash player insists in openning the fiels inside my presentation.
    There's a permanent way to fix this?
    I'm using a Mac Intel core duo 2.
    EDIT: I temporarily solved the problem deleting all copies of my presentation's projector. The flash player atemmpted to use another presentation instead to open .swf files, so I deleted that one too. After that, now plays the .swf files as normal. The only problem is, if for any reason I do re-install any of my interactive presentations proyectors, Flash player  immediately tries to use them to play the .swf's... so the problem really remains unsolved.

    The web flash player does not play stand alone .swf files on your computer.

  • Flash CS4 plug in for swf array?

    Hey everyone.  Does anyone know if there's a free Flash CS4 plug in that creates a swf array that loads external swfs in order and can control the timeline without having to mess with Actionscript?  I'm not even sure what to put in Google to search for such a plug in.
    Right now, I have an array like that.  I got the code from some very helpful people on here.  I still don't understand the majority of the code, though, so I was wondering if a plug in could do the same job that Actionscript does.  I have the code for my Flash file in another discussion thread, and I'm trying to get my file to stop looping the swfs when it reaches the end of the array.  If anyone's curious about seeing the code I'm talking about or if they know how to solve the loop problem, here is the link to that thread:
    http://forums.adobe.com/message/3417613#3417613

    use:
        var listener:Object = new Object();
        var mcl:MovieClipLoader = new MovieClipLoader();
        mcl.addListener(listener);
           // When the swf loads, set it up to constantly check its current frame
        // against the total frames, and if those match, the swf is done playing.
        // If that's the case, then load the next one.
        listener.onLoadInit = function(targ:MovieClip):Void {
           targ.onEnterFrame = function():Void {
              if (this._currentframe == this._totalframes) {
                 loadNext();
                 delete this.onEnterFrame;
    //Previous and Next Swf Buttons
    function loadNext():Void {
        if (currentSwf <swfs.length-1){
      currentSwf++;
        loadSWF(currentSwf);
    function loadSWF(nextSWFToLoad){
       mcl.loadClip(swfs[nextSWFToLoad],theTargetClip_mc);
    loadSWF(currentSwf);
    function loadPrevious():Void{
       currentSwf--;
       if(currentSwf==-1) currentSwf = swfs.length-1;
       loadSWF(currentSwf);
    previous_btn.onRelease = loadPrevious;
    next_btn.onRelease = loadNext;
    //End Previous and Next Swf Buttons
    //Play Button
    play_btn.onRelease = function() {
        theTargetClip_mc.play();
    //Pause Button
    pause_btn.onRelease = function() {
        theTargetClip_mc.stop();

Maybe you are looking for

  • Trouble Installing Adobe Download Assistant! Please help!

    Hi, I'm trying to download Adobe Download Assitant of my Mac so I can get my free trial of Photoshop. I can open the .dmg thing and double click on "Install Adobe Download Assistant" but when the bar that reaches the end on the installation window, n

  • Can I filter apps by excluding a category, i.e. games?

    I'm not a gamer, but whenever I browse the app store(s), Mac and iPhone, I have to endure all the game apps that proliferate the screens. Is there any way to filter out a category, ie -Games or <not> Games in the search criteria? Thanks

  • Satellite L10-333: Display stays black until I tap the edge of the screen

    I have a Satellite L10-333 which is about 3 years old, it has suddenly began to have screen problems. It started with a white screen instead of the normal one, and a black line all the way down the middle. Now when I turn the pc on, the screen stays

  • Ipod not sync with PC

    Hi all... I hope someone can help me!  My ipod sync fine with my PC until a few days ago.  I have removed / reinstalled itunes, use diff cables, reset the ipod but with no success!  Thanks

  • Close Popup window in webdynpro abap.

    Hi, Can anyone tell me ...how to close the popup window through the action in webdynpro abap . In my popup window there is a button(i.e 'UPDATE') apart from that  default 'OK' button , I want that when 'UPDATE' button is pressed, along with the actio