Runnng external swf Actionscript while in fullscreen mode

I am using Flash 9.0 (CS3 Pro). I am coding in Actionscript
3.0
I have two swf files, both interactive. During playback of
the, a mouse event launches the second. I also want the mouse event
to trigger a switch to fullscreen mode. The second swf is
non-linear and requires user input to jump to the appropriate frame
of the timeline. Everything tests and runs perfectly during
standard screen mode but whenever I try to load and play the
external swf file in fullscreen mode, Flash recognizes the
actionscript built into the original SWF but ignores all of the
Actionscript (this.stop(), this.gotoAndPlay(), etc.) embedded in
the second (external) swf file.
How can I get external swf files to load with their scripted
functionality in fullscreen mode?
Thanks for the help.
Aaron
The code I am using is:
// --- this is the code contained in the first swf file
// function to launch second SWF file
function movieLaunch(event:MouseEvent):void
// Sets display mode to fullscreen. With this line present,
Flash does not look at any Actionscript in ip.swf
// If I comment the below line out, the second SWF plays
correctly and has full functionality
stage.displayState = "fullScreen";
// load and launch second movie (ip.swf) which is located in
the same directory
var request:URLRequest = new URLRequest("ip.swf");
var loader:Loader = new Loader();
loader.load(request);
addChild(loader);
// Sets the listener for the button that will launch the
second movie.
launchMovieButton.addEventListener(MouseEvent.CLICK,
movieLaunch);
Text

The keyboard is disabled in fullscreen mode. This may be
causing the problem?

Similar Messages

  • Dling external .swf files while main movie is playing

    Does anybody know a command to have your flash movie download
    external .swf movies within the "main" movie while playing. I have
    about 8 .swf's that are all linked together but the problem is the
    loading of each one seperatly (kinda lags a bit b4 each movie is
    loaded, because you have to download each and everyone) PLEASE help
    me out I'm working on a big project here at work :yikes: Thank
    you!!

    jsns wrote:
    > Does anybody know a command to have your flash movie
    download external .swf
    > movies within the "main" movie while playing. I have
    about 8 .swf's that are
    > all linked together but the problem is the loading of
    each one seperatly (kinda
    > lags a bit b4 each movie is loaded, because you have to
    download each and
    > everyone) PLEASE help me out I'm working on a big
    project here at work
    > :yikes: Thank you!!
    >
    check help files for details and usage of "loadmovie" and
    "loadmovienum" actions.
    Best Regards
    Urami
    !!!!!!! Merry Christmas !!!!!!!
    Happy New Year
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • "ESC" event keycode not detected in document.keydown listener while exiting fullscreen mode

    I have a code to fire on exiting full screen mode.
    Therefore, i bind it to :
    # (window.document).keyup(function(e) {
    # if(e.keyCode === 27 ) {
    # // do something //
    Now, When i am in fullscreen mode,
    1. When i press "ESC", Fullscreen mode exits but my function does not gets fired.
    2. When i press "ESC" after fullscreen mode have exited, My function gets fired.
    That means "ESC" event was not propagated to code when browser was in fullscreen mode.
    ( * This works correctly in chrome )
    3. This is bit too much too ask, but can i bind browser's exit full screen button which appears at the top ??

    If you are using HTML5, I think the way to do is to bind with the fullscreen APIs that are still in''progress''. You could try these two links to see if that helps you
    #[http://www.sitepoint.com/html5-full-screen-api/ HTML5 Full screen API]
    #[https://wiki.mozilla.org/Gecko:FullScreenAPI Mozilla support for fullscreen]
    #[http://www.sagarganatra.com/2012/05/using-html5s-fullscreen-api.html HTML5 fullscreen API]
    You could create an event listener for the document.cancelFullScreen() and then see if that helps.
    Any specific reason why you want to bind to the button and not to the event?

  • Cant set in and out point on browser in fullscreen mode

    Hi
    I would like to make a 3 point edit using the brownser on fullscreen mode on FCPX.
    Someone now how?

    Thx for the answer.
    No, without Dual monitor.
    I selected all my clips and transform they on a Compound Clip on the Browser.
    Then I toggle to Fullscreen mode, because I believe that I could just play my clips and create In and Out points and insert they in the timeline on the fly.
    Even if the clip is a standalone clip I cant make in and outs while on fullscreen mode, actually any key I press I hear the ''thu'' sound.

  • Preloader ignores external swf's actionscript

    Hey guys
    I have an External.swf file that is a video. The swf is 1135 frames long and running just fine by itself, stopping as I want when the actionscript says stop(); on the first frame and looping the end of the clip with gotoAndPlay(837).
    The preloader SwfLoader.swf linked to the External.swf shows the percentage of bytes loaded as it should. However, it runs the video (sound playing in the background) while the preloader shows the loading progress I think it's because it doesn't load the first frame first.
    Once the external swf is loaded, it plays the video again, still ignoring the first actionscript frame that says stop(); and the last frame gotoAndPlay(837).
    Thank you.
    Here is the preloader's actionscript on the first and only frame:
    import flash.geom.*
    import flash.display.*
    var loadurl:String = "External.swf";
    var nDepth:Number = 0;
    var nWidth:Number = 200;
    var nHeight:Number = 20;
    var nPadding:Number = 3;
    var cLoader:MovieClipLoader = new MovieClipLoader();
    var oListener:Object = {onLoadInit:onContentLoaded};
    var mcLoader:MovieClip = this.createEmptyMovieClip("Loader_MC", 0);
    var mcContent:MovieClip = this.createEmptyMovieClip("Content_MC", 1);
    var mcLoadBarBg:MovieClip = mcLoader.createEmptyMovieClip("LoadBarBg_MC", nDepth++);
    var mcLoadBar:MovieClip = null; //Duplicated later with mcLoadBarBg
    var txtPercLoad:TextField = null; //Create after duplication
    var cMatrix:Matrix = new Matrix();
    mcLoader._alpha = 0;
    cMatrix.createGradientBox(nWidth, nHeight, 0, nPadding, nPadding);
    cLoader.addListener(oListener);
    mcLoader.lineStyle(1, 0x000066, 100);
    DrawRect(mcLoader, 0, 0, nWidth, nHeight);
    mcLoadBarBg.lineStyle(1, 0x0000FF, 0);
    mcLoadBarBg.beginGradientFill("linear", [0x006699, 0x0066FF], [100,100], [0, 255], cMatrix, SpreadMethod.PAD);
    DrawRect(mcLoadBarBg, 0, 0, nWidth - nPadding*2, nHeight - nPadding*2);
    mcLoadBarBg.endFill();
    mcLoadBar = mcLoadBarBg.duplicateMovieClip("LoadBar_MC", nDepth++);
    txtPercLoad = mcLoader.createTextField("PercLoad_TXT", nDepth++, 0, 0, nWidth, nHeight);
    mcLoadBar._alpha = 80;
    mcLoadBarBg._alpha = 30;
    Translate(mcTextMask, nPadding, nPadding);
    Translate(mcLoadBarBg, nPadding, nPadding);
    Translate(mcLoadBar, nPadding, nPadding);
    mcLoadBar._xscale = 0;
    mcContent._alpha = 0;
    mcContent._lockroot = true;
    mcLoader._x = Stage.width/2 - mcLoader._width/2;
    mcLoader._y = Stage.height/2 - mcLoader._height/2;
    txtPercLoad._x = mcLoader._width/2 - txtPercLoad._width/2;
    txtPercLoad._y = mcLoader._height/2 - txtPercLoad._height/2;
    SetTextFormat(txtPercLoad, "0%");
    mcLoader._alpha = 100;
    cLoader.loadClip(loadurl, mcContent);
    _root.onEnterFrame = function()
       var nBytesLoaded:Number = mcContent.getBytesLoaded();
       var nBytesTotal:Number = mcContent.getBytesTotal();
       var nPercLoaded:Number = Math.round(nBytesLoaded / nBytesTotal * 100);
       if(nPercLoaded > 0)
          SetTextFormat(txtPercLoad, nPercLoaded.toString() + "%");
                mcLoadBar._xscale = nPercLoaded;
    function onContentLoaded(Void):Void
       //trace(_root + "::onContentLoaded");
       SetTextFormat(txtPercLoad, "100%");
       cLoader.removeListener(oListener);
       delete _root.onEnterFrame;
       delete oListener;
       delete cLoader;
       _root.onEnterFrame = function()
          //trace(_root + "::onContentLoaded::_root.onEnterFrame");
                var nInc:Number = 5;
                mcLoader._alpha -= nInc;
                mcContent._alpha += nInc;
                if(mcLoader._alpha <= 0) startLoadedContent();
    function startLoadedContent(Void):Void
       delete _root.onEnterFrame;
       mcLoader.removeMovieClip();
       mcContent._alpha = 100;
       mcContent.play();
    function DrawRect(mc:MovieClip, nX:Number, nY:Number, nW:Number, nH:Number, nR:Number)
       trace("DrawRect in: " + mc);
       if(nR == undefined) nR = 6;
       mc.moveTo(nX+nR,nY);
       mc.lineTo(nX+nW-nR,nY);
       mc.curveTo(nX+nW,nY,nX+nW,nY+nR);
       mc.lineTo(nX+nW,nY+nH-nR);
       mc.curveTo(nX+nW,nY+nH,nX+nW-nR,nY+nH);
       mc.lineTo(nX+nR,nY+nH);
       mc.curveTo(nX,nY+nH,nX,nY+nH-nR);
       mc.lineTo(nX,nY+nR);
       mc.curveTo(nX,nY,nX+nR,nY);
    function SetTextFormat(txtField:TextField, sText:String)
       var txtFmt:TextFormat = new TextFormat();
       sText = "Loading... " + sText;
       txtFmt.font = "Verdana";
       txtFmt.align = "center";
       txtFmt.size = 11;
       txtFmt.color = 0x000066;
       txtFmt.bold = true;
       txtField.selectable = false;
       txtField.text = sText;
       txtField.setTextFormat(txtFmt);
       txtFmt = null;
    function Translate(mc:MovieClip, nX:Number, nY:Number):Void
       mc._x = nX;
       mc._y = nY;

    Hi kglad,
    The external swf is a movieclip (flv embedded with an AS3 layer to control the timeline) exported as an swf file .
    The first frame of the external swf is just stop();
    I didn't know the proloader code was AS2 though
    The preloader works fine with the external swf locally, but the problem happens when I run them from my server.
    The external swf itself and its code works fine from the server, both combined don't, so I guess the problem comes from the preloader. Probably because of the AS being 2 insted of 3.

  • HT4718 Is it possible to back up files onto an external hard drive while in internet recovery mode?

    This morning, upon starting up my MacBook, I was greeted with the lovely gray screen. I'm in internet recovery mode and have attempted to repair my disk, but it's too damaged according to the disk utility. So, I'm going to have to reinstall OS X Lion. I'm worried about losing my files and bought a 500gb external hard drive in hopes that I can back up my files while in recovery mode and then erase and reinstall the operating system
    Any help would be much appreciated!

    There are several ways to back up a Mac that is unable to fully boot. You need an external hard drive to hold the backup data.
    1. Boot into Recovery (command-R at startup; 10.7 or later), from a local Time Machine backup volume (option key at startup; 10.7.2 or later), or from your installation disc (C key at startup; 10.6.8 or earlier.) Launch Disk Utility and follow the instructions in the support article linked below, under “Instructions for backing up to an external hard disk via Disk Utility.”
    How to back up and restore your files
    2. If you have access to a working Mac, and both it and the non-working Mac have FireWire or Thunderbolt ports, boot the non-working Mac in target disk mode by holding down the key combination command-T at the startup chime. Connect the two Macs with a FireWire or Thunderbolt cable. The internal drive of the machine running in target mode will mount as an external drive on the other machine. Copy the data to another drive. This technique won't work with USB, Ethernet, Wi-Fi, or Bluetooth.
    How to use and troubleshoot FireWire target disk mode
    3. If the internal drive of the non-working Mac is user-replaceable, remove it and mount it in an external enclosure or drive dock. Use another Mac to copy the data.

  • Enabling Parent button while external swf is loaded [AS3]

    Hello everyone,
    I am very new to Flash and it takes me a while to understand what code is trying to tell me
    The problem I am currently facing is as follows:
    After searching the net for hours I finally figured out, how to load an external swf into my main timeline. As far as I understand this main timeline is the "parent". Hence the loaded, external swf should be the "child" (a quiz).
    Now the child (a quiz) loads into the flash file and is played properly, but I cannot access the button on the parent anymore. Unfortunately, I really need the home button on the parent to exit the quiz and allow for new navigation within the flash document.
    I would greatly appreciate any help.
    Thank you all in advance.
    Kliph
    my AS3 Code:
    import flash.events.MouseEvent;
    function onClick611 (event:MouseEvent) :void
            gotoAndPlay("home_einf")
    home_btn.addEventListener (MouseEvent.CLICK, onClick611);
    import flash.net.URLRequest;
    import flash.display.Loader;
    import flash.events.Event;
    import flash.events.ProgressEvent;
    function startLoad()
        var mLoader:Loader = new Loader();
        var mRequest:URLRequest = new URLRequest("quiz.swf");
    mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
    mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
    mLoader.load(mRequest);
    function onCompleteHandler(loadEvent:Event)
    addChild(loadEvent.currentTarget.content);
        function onProgressHandler(mProgress:ProgressEvent)
        var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
    trace(percent);
    startLoad();
    stop();

    By simply using addChild like you have, you're placing the loaded content above everything on the display list - covering your button. There are a few ways to solve. The easiest, if it works for you, is to just make a new layer in your timeline - make it the top most layer, and place your home button in that layer.
    Then change your addChild line from:
    addChild(loadEvent.currentTarget.content);
    to:
    addChildAt(loadEvent.currentTarget.content, numChildren - 2);
    This will place the loaded content behind the button.
    Alternatively, you can set the button to export for AS and then add it after you add the loaded file. Or you can use content containers - empty sprites that you add first, and then fill with other objects, in order to control layering.

  • Will app store approve an app to load external swf containing actionscript code in it?

    Will app store approve an app to load external swf containing actionscript code in it?

    Hi...It is not in the application bundle...it will be hosted on a server and from there it will be loaded in the application. I had created one sample application where it is loading a swf which is hosted on different server. This swf contained some actionscript code on its timeline. This app was working on ipad. I just wanted to know whether App Store will approve this.

  • Loading external SWF in Actionscript 2

    I am creating an animation within Flash CS4 in Actionscript 2.0 / Flash Player 7
    At the moment I have a handler (Movie Clip) called myHolder that is used to play other swf files within one main swf file, when called by a button
    Within a button that load the swf into the main timeline - For Example
    on (press) { loadMovie("BulletTrainDRAFT.swf", myHolder); }
    This works fine with bring other swf files into the main swf file timeline, but when I bring a swf file that has video controls for a video within it, they do not respond within the handler when played, but they do work when that swf file is played within its own external flash player window (The video is within a (Movie Clip) on its own timeline within its design fla)
    Video buttons - ActionScript 2.0
    btnStop.onPress = function(){  _root.vid.stop();  } btnPlay.onPress = function(){  _root.vid.play();  }  btn_fastforward.onPress = function(){  _root.vid.nextFrame();  }  btn_Rewind.onPress = function(){  _root.vid.prevFrame();  }
    I tried ActionScript 3.0 code as well
    Pausebtn.addEventListener(MouseEvent.CLICK,pauseHandler); Stopbtn.addEventListener(MouseEvent.CLICK, stopHandler); Playbtn.addEventListener(MouseEvent.CLICK,playHandler); 
    function stopHandler(event:MouseEvent):void { // Pause the stream and move the playhead back to // the beginning of the stream. video.gotoAndStop(1); } function playHandler(event:MouseEvent):void { // Pause the stream and move the playhead back to // the beginning of the stream. video.play(); } function pauseHandler(event:MouseEvent):void { // Pause the stream and move the playhead back to // the beginning of the stream. video.stop(); }
    Problem I have I think, is that a movie the external swf loads on the existing timeline as a child and doesn't unload the timeline resulting the actionscript not functional, but I can't fix this.

    if the loaded swf with video is an as2 swf, add:
    this._lockroot=true
    to it's main timeline.

  • Loading external swfs and controlling their actionscript

    I'm in need of some tutorials/examples for loading external
    swfs placed in empty movie clips using loadmovie into the main
    movie.
    I have actionscript and alot of interactive features within
    these loaded swf files and I'm having a heck of a time figuring out
    how to code and path the AS from them to work in the main timeline.
    I'm also open to using loadMovieNum and working with levels
    if it might be easier, however I'd like to keep this as simple as
    possible.
    PLEASE ANY HELP!!!????

    I am by no means an expert however it is my understanding
    that if you have a loaded swf within your main application and you
    wish to control features on the main timeline you need to use the
    _root function.
    Without knowing exactly what type of controlling you need
    it's hard to explain in great detail.

  • External .swf Intro ActionScript Problem

    I have used a loader component to load to an external .swf
    file (an intro animation). Once the external movie finishes playing
    I want my parent movie to move to a certain frame on my parent
    timeline. Nothing I try seems to work.

    So I could use the code that you provided in the timeline of
    the intro movie that I am loading into my main timeline?

  • Input Textfields not working in fullscreen mode

    Input Textfields not working in fullscreen mode any one help me.

    Quotes from Adobe:
    "Users cannot enter text in text input fields while in full-screen mode. All keyboard input and key-related ActionScript is disabled while in full-screen mode, with the exception of the keyboard shortcuts that take the viewer out of full-screen mode."
    Check with this article to know more: http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode.html

  • AS3 load external swf problem, please help...

    Hey guys, I am really in need of an answer here. I would tremendously grateful if someone has the answer. I'll keep it simple and right to the point:
    1. I have created "index.swf" in AS3. Has it's own "MainClass" class.
    2. I created "holder.swf" which is the main landing page. Has 2 buttons, for the viewer to load the site in fullscreen or standard.
    3. In the timeline of "holder.swf" I have created 2 frames, 1st frame containing the buttons, second frame containing the AS3 external swf loader script.
    It does not seem to want to load my "index.swf".
    I have tested a million different ways, it load other swf's just fine, AS2 and AS3, but for some strange reason it just will NOT load "index.swf".
    This is driving me crazy, I have a feeling it has something to do with a class conflict. I have tried (import MainClass;) in the first frame of "holder.swf" and no luck.
    PLEASE GUYS, LET ME KNOW IF YOU KNOW THE ANSWER!
    THANK YOU SO MUCHO.
    Michael

    Hey kglad,
    Thanks for the quick reply!
    Well here is the problem... With the exception of a few things I need to update, as well as implementing some better preloaders etc... the site is running alright...
    About a week ago I decided that I wanted to site to start with the above landing page. A simple "holder.swf" which would give the viewer something to look at before entering the site... (ideally I want to find a script that will begin loading "index.swf" while the viewer is still on "holder.swf", but I'll figure that out later).
    Anyhow, I created "holder.swf" as I have many times before, and for some reason it does not seem to want to load "index.swf" into the second frame when instructed to do so... does that make sense?
    So... ideally I would like the site to start on the above graphic, then once the button is clicked, "index.swf" opens up...
    It's driving me crazy, because my code works on other swf's I've tested it with, just not with index.swf, which leads me to believe there is something in the MainClass.as file which is causing it not to load...
    What are your thoughts?
    Oh, and many thanks again!!!
    M

  • External SWF layer problem

    I can only guess if its a layer / stacking problem or not, but I have a main fla file that loads three external SWF's, all ontop of each other, three buttons for each movie, that designate that movie is the visible one playing.
    It's basically a portfolio site.  You can see the site here
    www.tvnstudios.com/loadvis.html
    Why aren't the movies playing smoothly?  The FPS rate is the same for all three of the external SWF's and for the main fla that is loading them.
    Can anyone help? 
    I'd be so grateful!
    Thanks,
    -T
    p.s.  I'm including the fla file that has the actionscript that loads the movies.  It's a small code, but maybe the error is in there somewhere...

    If you are loading all of the files and they are all playing at the same time, that could be the problem.  Invisible files still eat up their share of the processor if they are left in a playing mode.
    I am unable to determine there is any slowness, primarily due to not knowing what the first one is supposed to be doing and the others appear to be flip book implementations that work fine as long as they are only the couple of pages I can see.

  • Loading external swf fonts created with fontswf, loaded with a Loader, compatible with iOS

    Let me immediately start out by saying that I do in fact have a current working solution for using embedded fonts, generated by fontswf and working in an AIR ActionScript mobile application, and also currently working fine with iOS.
    My current app needs CFF fonts, so I currently use the fontswf tool to pre-generate the .swfs using:
    fontswf -4 -a [SomeAlias] -o [SomeFont.swf] [SomeFont.ttf]
    and then I am currently embedding them in my app source code .as for compilation using:
    [Embed(source="/swf/SomeFont.swf", symbol="SomeAlias")]
    public static var SomeFontClass:Class;
    I then have no problem registering them using Font.registerFont(SomeFontClass) and everything works fine.
    However, I would prefer to take the use of these swf fonts one step further and load them dynamically using a Loader so that I do not have to take the hit of having multiple CFF font swfs embedded in the main compiled SWF and so that I could even load an unknown future set of fonts without having to supply them as part of the app build.
    Now I have seen and read many blogs and tutorials where people have exported font swf from Flash Builder where you add an explicit 'Class' name or even made standalone .as static files compiled into standalone swfs only including the two lines:
    [Embed(source="/swf/SomeFont.swf", symbol="SomeAlias")]
    public static var SomeFontClass:Class;
    so that you also have a 'Class' involved. Then people use some form of appropriate applicationDomain.getDefinition("className") as Class
    to pull out the class for the font registration.
    My question is, how does one perform the same font loading and registration of fonts using a Loader only loading the .swfs produced directly from fontswf?
    It seems only a DefineFont4 is tagged in the swf, there doesn't seem to be a 'Class' per se to call on.
    More importantly, iOS apps cannot load external swfs with code in them, so my understanding is any extra wrapped swf that would contain a custom Class technique would fail the iOS requirement of only having one main SWF with any ActionScript compiled code.
    Is there an alternative to the 'Class' technique by grabbing the DefineFont4 tagged resource from the swf and instantiating a proper working Font class from that? One that would still be compatible with the restrictions placed on AIR mobile apps running on iOS?

    Ironically, just after posting this, Adobe released AIR 3.5 beta onto labs, and added multiple SWF support for iOS.
    While this new support makes it easier to manage your content across multiple SWFs and technically allows you to use the class based separate .swfs for each font if desired, the system still requires that all these SWFs be present at compile time when making the final app .ipa for iOS.
    So this still doesn't solve trying to load fonts after the app is already built. For example, as part of a downloaded in-app purchase mechanism.

Maybe you are looking for