ActionScript Project - Export classes in frame 2?

I have a holder swf that loads in a swf that has its own built in preloader. Problem is those preloaders are not seen. The loaded swf only displays after it is 100% complete. On its own, the swf with preloader works fine.
I created the preloader by using the Frame metadata tag:
(import classes etc.)
[SWF(frameRate=60, width=900, height=580, backgroundColor='#2A3146')]
[Frame(factoryClass="screens.Preloader")]
public class MainClass extends Sprite
Then in the Preloader class when all is loaded:
        private function onLoaded():void
         this.nextFrame();
         var mainClass:Class = Class(getDefinitionByName("MainClass"));
         if(mainClass)
             app = new mainClass();
             addChild(app as DisplayObject);
            app.start();
In the holder swf it does something like this to load the swf:
            gameLoader = new Loader();
            gameLoader.load(new URLRequest(gamepath));
            gameLoader.contentLoaderInfo.addEventListener(Event.INIT, onGameLoadStart);
            gameLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onError);
        private function onGameLoadStart(e:Event):void
            preloader = gameLoader.content;
            addChildAt(preloader,0);
I thought this was the to do a "export classes in frame 2" kind of thing in an actionscript project, and it works great on its own but not when loaded inside another swf. Is there something I'm missing?
I know I could just built a preloader in the holder swf, but the holder swf is loading in games that all have a unique style on thier own and the games' preloaders all dipict its games style.
Thanks.

You were right. It was the Loader not having the size. After your post I checked the to see if the server was serving with the right mimetype and with no g-zip compression. Everything was in in correct order. Then I checked from my connection at home and everything is loading as intended. Come t find out its something with our firewall. When checking from work and the swfs are on a server outside our firewall the total bytes are unknown. If they are on a server within our firewall they are fine. (Most problematic in Webkit browsers). So I guess i was going about it the right way. Thanks for your help.

Similar Messages

  • EXPORT CLASSES IN FRAME 2 PROBLEM

    Hi to all, i am having a problem trying to do a simple preloader.
    i am making a game, only 2 frames, the first is preloader screen, the second is the game (all in actionscript):
    if i set EXPORT CLASSES IN FRAME 2, after the game is preloaded ( this.loaderInfo.addEventListener(Event.COMPLETE, onComplete)
    i execute gotoAndStop(2).
    all ok.
    but i see that some creatures (movieclips) DOESNT SHOW. those creature are there, all works fine, but simply are not visible!!! this happen also with some textbox......
    i trace (creature.visible)... and // give :    true
    also   trace(creature).... // give:   object[creature]       all ok here...
    also properties works fine      trace(creature.attack); // gives the right value, is all ok.....
    if i set EXPORT CLASSES IN FRAME 1... all works fine (but not the preloader, that doesnt load. simply a white screen of course, until all is loaded, then the frame 1 instantly execute gotoAndStop(2), starting the game)
    i dont understand, what happen to movieclips when i export in frame 2? (not at ALL, something is visible... something not.... ))))

    Yes, are all unchecked
    . only "export in actionscript" is checked, but others are all unchecked.
    i have tried both, checked and unchecked.
    but... if i have Exactly the same creature, added for 2 different players... the first player has all creatures ok.
    the second not.....
    the second will not show his creatures (0 shown, no matter what)
    if i change the Exportclasses in frame 1... then all goes perfect, all players have shown all correct.... i dont understand why.
    i also have prolems with some textbox that doesnt show if i set Exportclasses in frame 2.....

  • "Export classes in frame x" in AS3: how does it work?

    My steps:
    1. I have some beefy classes
    2. I want my SWF to show a preload anim while it loads these
    classes
    3. Using the "Export classes in frame: " option, I move my
    classes to frame 10
    4. I put a stop(); on the first frame and test w/ the
    bandwidth profiler visible.
    Desired + expected behavior:
    1. My preloader spins, and I have minimal K on the first
    frame and then the main hit on the chosen export frame.
    Observed behavior:
    1. all of my classes are available on the first frame (ala,
    all of my logic can be performed on the first frame, even though
    the framehead is sitting firmly on frame 1)
    2. there is still a spike in K on the output frame
    Notes:
    - am I just missing the point here? Is this how it always
    worked?
    - why is the Document Class available in the first frame? Is
    this mandatory w/ the new structure?
    Thanks for your time and help-
    cgs

    Thanks, moccamaximum, I believe this did open up a connection and now I have no errors.
    However, my problem still persists.
    Here is what it says in the output of my AS3 flash site:
    _root
    SWFBridge (AS3) connected: host
    SWFBridge (AS2) connected as client
    imgNum: 10
    thumb: images/image1.jpg
    image: images/image1.jpg
    thumb: thumbs/image2.jpg
    image: images/image2.jpg
    thumb: thumbs/image3.jpg
    image: images/image3.jpg
    thumb: thumbs/image4.jpg
    image: images/image4.jpg
    thumb: thumbs/image5.jpg
    image: images/image5.jpg
    thumb: thumbs/image6.jpg
    image: images/image6.jpg
    thumb: thumbs/image7.jpg
    image: images/image7.jpg
    thumb: thumbs/image8.jpg
    image: images/image8.jpg
    thumb: thumbs/image9.jpg
    image: images/image9.jpg
    thumb: thumbs/image10.jpg
    image: images/image10.jpg
    4
    _root
    4
    163
    _root
    163
    67
    _root
    67
    43
    _root
    43
    56
    _root
    56
    20
    _root
    20
    85
    _root
    85
    64
    _root
    64
    3
    _root
    3
    I don't understand how its able to trace that it is getting the images in the path, yet there are no images to be seen in the gallery!
    I found out that my gallery does work (with images and all) when loaded into a movieclip in a blank AS2 file instead of my AS3 site. Am I doomed since even localconnection will not help?

  • How to export a flash project with a changing frame rate to a video

    I have a Flash project that is a series of roughly 1000 images.  The result of the images is a simple animation, and there is music imported on a separate layer.
    There are moments in the music that I wanted to line up with certain frame changes, and there are sections of the music that I wanted to match up with a faster (double-time) frame rate.
    I used this code in several places in the a code layer:
    stage.frameRate = x;
    The result is exactly what I want in SWF -- the animation speeds up and slows down at the exact right moments to match up with the music track, but it seems like it's just not possible to export this variable frame rate project to a video file?
    According to the accepted answer on this post: http://forums.adobe.com/message/4019538, it seems that:
    The export function in Flash Pro doesn't transcribe *frames*, rather it plays the Flash animation and records it like a camcorder
    If that's true, then I would think there is a way to record a variable frame rate project into a video -- does anybody know if this is possible?

    That or Premiere would both get the job done. After Effects might be more desirable as it has a feature called Time Remapping (right-click on the video layer, Time->Enable Time Remapping). You can add keyframes to any point in a video and then drag them around to speed up or slow down the video. That'll allow for very precise tweaks.
    Finally all I'd suggest is when you jump into your next project, make a quick dummy test project to see if the software you're using is easily capable of producing what you want. It'll solve the headache of completing the project only to land where you are now. Now you know Flash won't play nicely with scripts and Export Movie. If your desired end result was always a video I'd probably use video editing software to make the video. There's some free stuff out there if you really look, but no, it won't be as nice as After Effects or Premiere by any stretch. Although when you see how amazing After Effects is, you'll probably want to buy it .

  • AddChild + "export in first frame" unchecked

    Hi all,
    i've got this problem that i can't figured out. i've tried
    google and adobe website, but no luck. i guess the people here
    could help me
    this is about addchild and export in first frame. i wanna
    call an object from my library. in its linkage option i:
    1. name it "rectangle"
    2. give a class name "Rect"
    3. have a base class "flash.display.MovieClip"
    4. check "export for Actionscript"
    5. unchecked "import in first frame"
    no problem this far.
    but when i tried to call it in main timeline with this
    script:
    var a:Rect = new Rect();
    addChild(a);
    i got this error:
    1046: Type was not found or was not a compile-time constant:
    Rect.
    1180: Call to a possibly undefined method Rect.
    why is that?
    isn't flash automatically generate the class for me?
    (a definition of this class could not be found in the
    classpath, so one will be automatically generated in the SWF file
    upon export.)
    can anyone help with my problem...

    because you haven't done anything to export your class.
    if you're not going to let flash take care of exporting your
    class in the first frame, you have to do something to export it
    later. and you're not and flash won't do that automatically
    becauese it doesn't know what you want to do.

  • Flex Project Exports - Adobe SWC Distribution

    Hi,
    I'm having a difficult time trying to find any information regarding this so I would be really grateful for any help here. Let's say I have created an ActionScript project in Flex Builder -- I am not using a Flex SDK, it has been removed from the project's library path -- instead I have added one of the playerglobal SWC files from Flash CS4 to the project. This essentially allows me to program within Flex Builder without the overhead of the Flex Framework - which I never use.
    Now, if I wanted to export that project (as a Flex Builder project) when it was completed and make it available via a website, would I run into any legal problems if the playerglobal SWC was exported/distributed along with the rest of the project files - keeping in mind that the project could only be imported/re-published using Flex Builder?
    Thanks in advance for any info.

    Hi si-robertson, I understand what your dilemma is but I'm not sure I follow why you have your development environment setup like this. You can create pure ActionScript projects from within Flex Builder and these don't use the Flex framework at all - obviously you can't use MXML in these projects .
    While AcionScript projects in Flex Builder might use the same compilers as a Flex project they don't compile in the Flex framework classes; so I'm somewhat confused why you'd even need the playerglobal.swc from Flash CS4 in your project as it'd already have a complementary version of it available?
    If on the other hand you want to access Flash Player 10 functionality, again if you have the Flex SDK 3.2 or greater you can create content via the pure ActionScript projects without the overhead of the Flex framework.
    I know this isn't exactly what you were asking, but in a round-about way it would negate your concern about distributing your project if it contained the playerglobal.swc from Flash CS4 as you wouldn't need to.
    HTH
    regards
    m
    Mike Jones
    FlashGen.Com
    Adobe Community Expert For Flex
    Adobe Certified Expert for Flex 3 & AIR
    w./ www.flashgen.com
    b./ blog.flashgen.com
    Catch Me At
    Scotch on the Rocks London '09
    Flash on the Beach Brighton '09
    Author Of Developing Flex Components
    Addison-Wesley (Q4 / 2009)

  • SWC buttons not working in a Flash Builder 4.7 ActionScript Project

    Howdy,
    I have this BIG issue. Every button in my swc causes issues when compilling in Flash Builder 4.7. Two things will happen, one or the other:
    1. I get this error in the class that extends a linked library item:
    Error #1107: The ABC data is corrupt, attempt to read out of bounds.
    2. The swf compiles with no errors but all buttons display the wrong art.
    Both problems go away when I remove the buttons.
    I found this article:
    http://inflagrantedelicto.memoryspiral.com/2012/12/flash-builder-4-7-useflashsdk/
    I tried this solution but it did not work.
    This problem occurs with all my projects. I'm creating SWCs via Flash Pro, and using them in a Flash Builder ActionScript Project.
    Does anyone have any solutions?
    Thanks!

    Hi,
    I followed the directions here: http://inflagrantedelicto.memoryspiral.com/2012/12/flash-builder-4-7-u seflashsdk/
    But the only "Use Specific SDK:" options are Flex 4.6.0 and Flex 3.6a.
    When I select Flex 4.6.0 (under "Use Specific SDK:"), I get errors, it seems that some sub classes don't have access to their parents protected methods and properties. The only way to fix this is to delete the project and create it again.
    I downloaded the apache flex SDK, and added it via the Flash Builder preferences. Then went into the project and set "Use Specific SDK:" to the appache flex. This brought up more errors, double clicking the errors wouldn't take me to any class, they where mostly something about bitmap...
    And the only way to fix it is to delete the project and create it again.
    Should I not use Flash 4.6? or not use SWCs? This is really frustrating.

  • Export in first frame

    I have some large movie clips that I don't want to load in
    the first frame. So in my publish settings I set my classes to load
    in frame 3. Then I've turned off "Export in first frame" for my
    large movie clips and place them on the stage in frame 2. I've
    placed a simple "loading" message in frame 1 and 2. This worked in
    AS2, but in AS3 my movie clips are invisible when I turn off
    "Export in first frame". I think they are invisible because I'm
    making a game and there are bullets being fired from the x and x
    coordinates of were the enemies should be.
    Does anyone have any suggestions?
    Thanks!

    because you haven't done anything to export your class.
    if you're not going to let flash take care of exporting your
    class in the first frame, you have to do something to export it
    later. and you're not and flash won't do that automatically
    becauese it doesn't know what you want to do.

  • Why I can't export a single frame from my composition?

    I try to export a single frame from the cavas but motion just did nothing when I click on export. Is there something wrong with my motion setup? I have trashed the motion's plist couple times already but still having the same issue. I can't even save the project. When click on save, motion did nothing, just like export. HELP!

    I see that you are on an intel mac. Are you running the universal versions (Final Cut Studio 5.1 w/ Motion 2.1)?
    See this article for troubleshooting steps: http://docs.info.apple.com/article.html?artnum=302596.
    When I am having major issues like this, I just start over from scratch. Do a complete erase and install with the OS discs, reinstall all applications and update everything with software update. I keep a separate partition just for film and video work that I can blow away any time (I don't store any important files on it).

  • Classes may only be defined in external ActionScript 2.0 class scripts.

    i try to use the BitmapExporter 2.2.
    i inserted the .as file into the first frame in my fla but
    when i try to test movie i get
    "Classes may only be defined in external ActionScript 2.0
    class scripts."
    since i am not expert in extensions - what did i do wrong and
    hoe can i properly use this extension?

    remove the .as file code from your fla. put the .as file in
    the same directory with your flash files. when you publish your
    swf, flash will incorporate the .as code in your swf when you use
    the new BitmapExporter() statement.

  • Using components in actionscript project

    Sorry if my question sounds dumb, but I just started learning
    AS3.
    I'm trying to use UI components in an ActionScript project.
    I can't import the definition of mx.controls classes such as
    Button or CheckBox.
    Here's the code I'm using:
    package {
    import mx.controls.Button;
    public class Learning {
    public function Learning() {
    var button:Button = new Button();
    When I compile, this is what I get: "Definition
    mx.controls:Button could not be found."
    How to import these definitions?
    -S

    Tried compiling it using the FlexBuilder IDE? There's nothing
    wrong with your code, so it sounds like your compiler doesn't know
    where to find the libraries, or is looking in the wrong place. Are
    you giving an explicit library-path argument?
    http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=L iveDocs_Parts&file=00001500.html

  • Two objects claim ownership of UID: U3615 Class: Text Frame

    Hi guys,
    since i updated today i can't save my project file anymore. Getting an error when i try to save saying:
    Two objects claim ownership of UID: U3615 Class: Text Frame
    Is there a way to fix it or did i lose all my progress from today? That would be devastating.
    Greetings,
    Joern

    Please send us a copy of your .muse file at [email protected] and include a link to this thread. If it's too big for e-mail (>20 mb) you could use a service like Dropbox, Adobe SendNow, WeTransfer, etc. We'll repair and return.

  • Exporting a freeze frame as a still image

    Hi I need to extract a still frame from some footage, how do i do this so i can export it so i can use on a website ?
    Hillster

    Here's a really cool way if you have Photoshop, especially if you ever need to export multiple still frames:
    Generally after a cut is complete we export a Quicktime movie of it in our favorite format [generally ProRes or XDCAM EX]. Open that file in a Quicktime player.
    Open Photoshop create a new document, in our case 1920x1080P.
    Place the Quicktime player just above the Photoshop document, scroll to the still you want, hold down shift [this centers the image in the center of the frame] and drag and drop into the Photoshop document.
    Do this as many times as you want, each time you drop an image it creates a new layer in the Photoshop document.
    Once you have the stills you want, close Quicktime, in Photoshop go to File/Scripts/Export Layers to Files and it will export, name and place the files where you tell it in TIFF, JPEG or whatever format you choose.
    We do a lot of corporate stuff and since exporting a still from FCP was much more time consuming than it should be we rarely provided stills. Once we were told about this method we provide 15 to 20 stills from every project for use in brochures and other promotional materials.
    The cool things is that they're not aware how quick and efficient it is to do this, and we $till charge for every $till!

  • Charting components for actionscript project

    hi -
    I have an actionscript project going (ie, not flex) and I want to use some kind of charting components
    I'm complining as desktop appilication, ie, I am running on the AIR platform
    because it's an actionscript-only project I dont think I can use any of the mx.* classes -- is this true? would be good to confirm that
    given that, I think my only option is to find a third-part charting package that's AS3-only
    any suggestions?
    thanks

    Tried compiling it using the FlexBuilder IDE? There's nothing
    wrong with your code, so it sounds like your compiler doesn't know
    where to find the libraries, or is looking in the wrong place. Are
    you giving an explicit library-path argument?
    http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=L iveDocs_Parts&file=00001500.html

  • Trouble exporting non-standard frame size

    So I have to deliver a Quicktime that's 210w x 190h that will eventually be compressed for web posting. The source footage is DV/NTSC (720x480). I cut my initial sequence at those specs and then nested that into a 210x190 sequence and resized the nest to fit, maintaining aspect ratio (i.e. sides were cropped). But whenever I export to QT, the frame size is stretched horizontally when viewed on a computer monitor. I've tried exporting that sequence "with current settings", set the sequence to square pixels, exported as Animation or "none", exported using Compressor with every conceivable combination....all to no avail. They all spit out the same problem.
    Am I missing something?

    Thanks Tom, you clarified it .......  or at least something clicked in my brain.
    I was trying to set "Custom" when I created the new project.
    I didn't know, or had forgotten, that in the "error" window I could select "Custom".
    All is now well and FCP X 10.1.1 is pretty clever after all!
    There is one weird thing I'd like to mention.
    When I clicked on "Custom" the 960 x 600  frame dimensions appeared but the  frame rate was listed as 23.98p as shown in the screenshot below.
    So what's wrong with that?
    Well the clip is 30p  and I naturally thought I was going to end up with a project with an incorrect frame rate.
    Now here's the funny thing  .........  when I selected the project and viewed it in the Inspector it was the correct 30p
    So why was I given that worrying piece of misinformation.

Maybe you are looking for

  • Pass table name as parameter PLS-00357

    create or replace PROCEDURE universal_p ( tab IN VARCHAR2, col IN VARCHAR2, whr IN VARCHAR2 := NULL) IS TYPE cv_type IS REF CURSOR; cv cv_type; val VARCHAR2(32767); BEGIN OPEN cv FOR 'SELECT ' || col || ' FROM ' || tab || ' WHERE ' || NVL (whr, '1 =

  • Report with SAP Script

    hi guys,   if i need to develop a report for purchase order using SAP script..how can that be possible???what is the name of the SAP script and how can we find that script??? regards kalpana

  • Viewing web sites with Adobe Flash contents

    How can I view web sites with adobe Flash player plugin for safari on iPad?

  • Problem clearing floats

    Here is an interesting problem. My page has a left sidebar, which is obviously floated left. In the main part of the page, I want to float an image so the descriptive text will be next to it rather than below it. I have multiple images to do this wit

  • Remove password for development mode

    Is there a way to be in development mode and not have password set up? Z10 is my primary phone, and it annoys me that I MUST have password on whenever I am in development mode. Can I be in dev mode without a password? It would make my life a bit easi