Document Class not work when I shift my MovieClip to 2nd Frame.

Hello,
All my content is at 1st frame of my FLA file...and I'm using Document Class... When I try to shift my content to 2nd frame, so I can use 1st frame for preloader.. but its not working...
This is my document class... Basically at 1st frame I'm loading external jpg image to a MovieClip..
Is it possible, I can **** my MovieClip and other content to 2nd frame of the timeline... ??? and Document Class work???
Thanks...
package com.ahmad.bg
     //import all classes
     import caurina.transitions.Tweener;
     import flash.display.Loader;
     import flash.display.MovieClip;
     import flash.display.Sprite;
     import flash.display.StageAlign;
     import flash.display.StageDisplayState;
     import flash.display.StageScaleMode;
     import flash.events.Event;
     import flash.events.MouseEvent;
     import flash.net.URLRequest;
     public class MainClass extends MovieClip
          //create variables
          private var loader:Loader;
          private static const IMAGE_PATH:String = "bgs/bg.jpg";         
          public function MainClass() {
               stage.align = StageAlign.TOP_LEFT;
               stage.scaleMode = StageScaleMode.NO_SCALE;              
               stage.addEventListener(Event.RESIZE, stageResize);         
               //load external image
               loader = new Loader();
               loader.load(new URLRequest(IMAGE_PATH));
               loader.contentLoaderInfo.addEventListener(Event.COMPLETE, showImage);
               pic.addChild(loader);    
          private function showImage(e:Event):void
               try {                             
                    e.target.content.alpha = 1;
                    Tweener.addTween(e.target.content, { alpha:1, time:1, transition:"easeOutSine" } );                   
                    e.target.content.smoothing = true;                             
               } catch (e:Error) { };
               stageResize();
          private function stageResize(e:Event=null):void
               pic.x = 0;
               pic.y = 0;
               pic.scaleX = pic.scaleY = 1;              
               if ((stage.stageHeight / stage.stageWidth) < pic.height / pic.width) {
                    pic.width = stage.stageWidth;
                    pic.scaleY = pic.scaleX;
               } else {
                    pic.height = stage.stageHeight;                   
                    pic.scaleX = pic.scaleY;
               pic.x = stage.stageWidth / 2 - pic.width / 2;
               pic.y = stage.stageHeight / 2 - pic.height / 2;         
               bottomNav.x = Math.floor(stage.stageWidth / 2 - bottomNav.width / 2);
               bottomNav.y = Math.floor(stage.stageHeight - bottomNav.height - 0);

If you have code in your main class that references specific movieclips on the stage, they have to be on every frame you plan on using.
If you have a movieclip named "pic" on frame 2, but you are referencing it right away in the main class, which starts on frame 1, then it is looking for a movieclip that does not exist until you move it to frame 2

Similar Messages

  • Print Document option, not work when adding documents.

    Dear friends.
    I have checked inside SAP BO the checkbox Print Document when AR Invoice is added (Print preferences)   But this action not work because the document not is printed automatically, then the user has to print it manually.
    Thanks for your comments,
    Daniel

    Thanks Rahul,
    That was the way: Option Defaults in the User Definition.
    Best Regards,
    Daniel

  • Adding a MeshView as part of another class not working when returned?

    I have a class that extends box, to get the properties to display it as a box, or else have the option to display it as a 3D image/Mesh.
    I have this code
    public class Face extends Box
            private MeshView image3D;
            public Face(TriangleMesh mesh)
                this.image3D = new MeshView(mesh);
        public TriangleMesh getImage3D()
            return (TriangleMesh) image3D.getMesh();
    public MeshView getImage3DView()
            return image3D;
        public void setImage3D(TriangleMesh mesh)
            this.image3D = new MeshView(mesh);
    Granted there are many more methods and variables I just wanted to show what I needed. Basically I have a 3D importer class, which I'll post in a second, which imports the data for the mesh. From there I return the TriangleMesh and then set it to a MeshViewer that is setup currently as a constructor call in the Face class, and then I set it to a group using the getter method.
      Face d = new Face(i.stlImporter("CylinderHead-binary.stl"));
    d.setMaterial(gray);
    d.setLayoutX(200);
    d.setLayoutY(200);
    Group s1 = new Group (d.getImage3DView());and finally
    public class importer
        TriangleMesh mesh = new TriangleMesh();
       public TriangleMesh stlImporter(String s)
            StlMeshImporter stl = new StlMeshImporter();
            // Generated vertex normals result in a smoothly shaded surface
            stl.setCreaseAngle(24); 
            try
                URL cylinderHeadUrl = this.getClass().getResource(s);
                stl.read(cylinderHeadUrl);
            catch (ImportException e) {
                e.printStackTrace();
            // STL includes only geometry data
            mesh = stl.getImport();
            stl.close();
            return mesh;
       public TriangleMesh getStlImport()
           return mesh;
    }However if I change all of the face code into MeshView it will work. So basically it seems that something is up with MeshView being used in Face.
    Edited by: KonradZuse on Apr 5, 2013 8:22 PM

    Well basically I wanted to have a class that was originally a box, but then would have a 3D image. The converter that came out a week or so ago imports it as a Mesh, so I wanted to be able to have it return a mesh if it's a 3D object.
    I was just confused how it would all work. To make a box, I assumed I had to extend the box, and great it based on that, or shape. Maybe it would just be easier to save the TriangleMesh, then load it into a MeshViewer in another class. I figured I could just make a viewer in the class and just add that viewer, but maybe that's not a good idea.
    Now I realize that I can just make everything a 3D mesh, box included, so I can just make it a viewer with additional properties like my box was supposed to be, or maybe just the mesh itself, then add it to a viewer later, thoughts?
    I'd appreciate any insight on the class structure that I'm confused about, thanks!~!!
    ~KZ

  • Output Tray 2 does not work when we print a smartforms document immediately

    Dear printer specialists,
    we've the following issue:
    We are printing the same smartforms document in different plants. One plant decided to get the print output into output tray 2 of the printer (lower tray), so we've copied the standard device type into a z-device type and made the SPAD set-up with a preselection for the tray 2 (lower tray). The new device type has been assigned to the output device. Now we made a test and released the print-output for an immediate printing. The output was printed as before in tray 1 (upper tray). When we restart the output from the spool (SP01), the output will be printed in tray 2. Why does this not work, when we print immediately ? Does anyone know how to solve this problem ? (We don't want to change the smartforms document.)
    Thany you for every information to solve this problem.
    Kind regards, Wolfgang

    HI,
    Check if there is a different tra setting in the smartform itself.
    /nsmartforms -> <Form> -> Pages and Windows -> FIRST, NEXT, TERMCOND -> field Resource Name
    Regards,
    Aidan

  • Send to is not working when a document library is associated with work flow.

    Send to is not working when a document library is associated with work flow.
    question is when a workflow is tied to list send  to don't work ?
    we get a ntlm login prompt sphoradically, if we cancel the prompt we and reload the page we get the resultsen

    could you please give more detail about the issue?
    What kind of the workflow associated to the Library and what error you getting when trying to perform send to?
    check ULS logs...
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Transferred CS4 to new MacBook Pro, now some fonts will not work when PDFing documents from InDesign CS4. Help!

    I recently purchased a new MacBook Pro. I transferred my CS4 from my older MacBook Pro to my new computer, and although it seemed to be working fine now some fonts will not work when PDFing documents from InDesign CS4. These fonts are installed on my new computer, can be found in InDesign CS4, and work fine within the program but will not appear in PDFs. The letters turn into rectangles. Does anyone know why, and how to fix that?
    Help/input would be much appreciated. Thank you!
    Kristen.

    you should properly install adobe products, not move, migrate or otherwise transfer them.
    Downloads available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  12 | 11, 10 | 9,8,7
    Lightroom:  5.5 (win), 5.5 (mac) | 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • ExternalInterface not working when swf file is embed inside a dynamically cloned DIV element.

    ExternalInterface not working when swf file is embed inside a dynamically cloned DIV element.
    It seems that flash movie is identifed as 'undefined' inside document.
    //a statically placed div
    var staticdiv=document.getElementById('PropDiv');
    //dynamically placed div with object tag
    var dynDiv =staticdiv.cloneNode( true );
    var xD=50;
    var yD=50;
    if(dynDiv)
    dynDiv.style.display  = "block";
    dynDiv.innerHTML="<object classid=" + "\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\"" + "codebase=" +
    "\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\"" + "width=" + xD + "height=" + yD +
    "id=" + "\"external\"" + "align=" + "\"middle\"" + ">" +
                    "<param name=" + "\"allowScriptAccess\"" + "value=" + "\"sameDomain\"" + "/>" +
                    "<param name=" + "\"movie\"" + "value=" + "\"external.swf\"" + "/>" +
                    "<param name=" + "\"quality\"" + "value=" + "\"high\"" + "/>" +
                    "<param name=" + "\"wmode\"" + "value=" + "\"transparent\"" + "/>" +
                    "<param name=" + "\"bgcolor\"" + "value=" + "\"#ffffff\"" + "/>" +
                    "<embed src=" + "\"external.swf\"" + "quality=" + "\"high\"" + "wmode=" + "\"transparent\"" +"bgcolor=" + "\"#ffffff\""
    + "width=" + xD + "height=" + yD + "name=" + "\"external\"" + "align=" + "\"middle\"" + "allowScriptAccess=" + "\"sameDomain\"" +
    "type=" + "\"application/x-shockwave-flash\"" + "pluginspage=" + "\"http://www.macromedia.com/go/getflashplayer\"" + "/>" +
                    "</object>";
       dynDiv.style.top=50;
       dynDiv.style.left=100;
    document.body.appendChild(dynDiv);
    In above situation communication is not establised when a  funtion which is retruning boolean is called from flash using
    ExternalInterfcae.call.The return value of this function is getting as false inside flash.But the value is true in javascript.
    if (navigator.appName.indexOf("Microsoft") != -1) {
       return window[movieName];
      } else {
       return document[movieName];
    window["external"] is returning as 'undefined'.
    Please give a  solution to solve this.

    Note that you have different file names for the object (images/banner.swf) and the embed (images/banner1.swf)
    You also placed the embed in the middle of a param tag and nested all param tags.
    Because you didn't include a MIME type and the object doesn't have a classid for an ActiveX control for IE, I'm not sure what Firefox will be using.<br />
    The object doesn't have a data attribute to specify the file.<br />
    A separate embed is only needed when you specify a classid in the object.
    <pre><nowiki><div class="bannercontainer">
    <object width="940" height="445" type="application/x-shockwave-flash" data="images/banner.swf" >
    <param name="wmode" value="transparent" />
    <param name="movie" value="images/banner.swf" />
    </object>
    </div></nowiki></pre>

  • Partner function not working when creating PO with ref to PReq

    Partner function is not working when creating a Purchase Order with ref to a Purchase Requistion, Partner functions maintained in the vendor master are VN, OA & PI.
    But OA & PI are not appearing in the PO header partner tab when created with ref to PR.
    however it works when i create the PO directly ( without the PR ref )
    I am using the same material & Plant for both manual PO & PR to PO.
    Any idea what could be wrong .
    I have maintained the settings for schema groups for vendor master & purchasing doc in the partner determination.
    Thanks
    Dkmurthy

    Hi,
    I have also an issue that seems similar to one you are discussing.
    When we use ME59N and create a PO with ref. from a PR (created from a sales order), the message determination works well, it reads the condition set in MN04 (condition records for messages), and creates a message (with output type for EDI , medium: 6, and partner function LS: Logical system). Message is created and idoc is sent.
    When we try with ME21N, ME21 and we create the PO with ref. to the same PR, either by entering manually the PR in the document overview of ME21N or by selecting the PR (without entering the PR number), i.e with date, the message is not created in the PO.
    Company code is assigned to purchase organization, and so is purchase organization to plant.
    Any idea why there is no automatic message determination in the case of the transaction: ME21N
    Note: If I try ME21N, and enter the output type and partner, manually, I receive a warning message
    VN006 (Partner XXXX does not exist for partner function LS). If I accept this warning message, then message is saved- idoc is sent. However I can not overcome the warning message, if it plays any role, because I can not assign partner function LS to the vendor.Then I receive message CZ 327 (Can not use this partner role).
    Any input is wellcome.

  • Report with JDBC connection does not work when they includes CommandTable

    I am trying to render using the new version of Crystal report java component - CRJ a report contains Data base Fileds of type Command Table (Row Set) which seems to be not working.
    when i use the previes version of crystal SDK it works fine.
    after deugging the Sample CrystalHelper.java file which contains the method .changeDatasource()
    i found that the DataBaseController.setLocation() method changes the CommandTable class to Table when using it on CommandTable instance and as result all the fields defined into that CommandTable were disappear.

    That appears to be a known issue:  Eclipse JRC: To change the JDBC connection at run time
    Sincerely,
    Ted Ueda

  • I baught Seagate Backup plus 2T hard drive to use as my Backup time machine. But its not working when i connect to time machine its not coping files, it keep saying preparing files. Can someone help me please...

    i baught Seagate Backup plus 2T hard drive to use as my Backup time machine. But its not working. when i connect to time machine its not coping files, it keep saying preparing files. Can someone help me please...

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled, or if a firmware password is set, or if the startup volume is a Fusion Drive or a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually login automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of the test.

  • Links not working when I export to HTML or PDF

    I am a longtime Mac fanatic, but new to using Keynote. I am creating lectures for a class I teach where the computer in the classroom is Windows, so I have to export my Keynotes to another format.
    First I tried exporting to Powerpoint. That was a disaster. Since, I've tried exporting to HTML, exporting to PDF, and print -> Save as PDF (to get a PDF that prints nicely).
    My problem? Hyperlinks within my Keynote work fine when I play the presentation in Keynote. They also work when I export to PDF. However, they do not work when I generate the printable PDF OR when I export to HTML.
    I guess I understand them not working in the printable PDF, but not the HTML. Am I doing something wrong?
    Ideally I would like to export one PDF that I could use up on the projecter (with links working) and that students could view and/or print from their computers.
    Should I really have to have 2 PDF's - one for students who want to view it on screen with working links and one for people that want to print it out?!?!
    TIA for any help/advice!

    Do you have any filters applied to your clips?
    This happened to me before, I accidently had applied a broadcast safe filter to a color matte that was black....
    I figured it out by duplicating my sequence and deleting items from my timeline 1 by 1 until I was able to export a reference movie.
    Anywho, export again, this time with "self contained" movie selected.
    Then try to import to Compressor.

  • JSObject programming was not working when compiled in JSDK1.4.2_06

    JSObject programming was not working when compiled in JSDK1.4.2_06.
    But problem solved when i compiled with JSDK1.3.1_15 and tested with JVM 1.3.1_15.
    Still I could not run the class file generated in JSDK1.3.1_15 in JVM 1.4.2_06.
    What do you think happened across the SDK versions? Shouldn't the JSObject
    and other classes be part of the browser JVM.
    I want to know whether JSObject supports in JSDK1.4.2_06.
    It goes into the loop. It neither say error nor execute.

    Do not spam the site by posting to 4 forums

  • Fuego.Util.Document is not working

    Fuego.Util.Document is not working.Please find code which is i am using to download the file from server.
    open Fuego.Util.Document
    using fileName = "/tmp/sample-encoded-receipt-image.txt"
    Anyone could you please help me to resolve the issue.
    Thanks&Regards,
    M.K
    Edited by: user640554 on Feb 16, 2010 2:23 AM

    If you are download the file from the server, in this case you have to use the anchor html tag in your JSP page
    In this tag you have to pass the source value ( where the file is located)
    and the file path will be like this:
    Download
    href value will be like this Fuego.Server.homeDir + "/tmp/sample-encoded-receipt-image.txt"
    you can also set this Fuego.Server.homeDir value from the Code and it will give the actual path when the code will run
    Thanks,
    Brijesh Kumar Singh

  • Photoshop CC. Colour selection not working when using alt and brush.

    Hi, Photoshop CC. Windows 8.1 64 bit. Colour selection not working when using alt and brush. I have tried rebooting and other things like closing swatch panel etc.
    The alt key is otherwise OK.  It's not the recent upgrade from Win 8 to 8.1 (5 days ago) because the colour selection facility was working yesterday. Any ideas.

    I'd say things sound desperate enough to try resetting Preferences
    Reset Preferences
    Windows — Hold down Shift Ctrl Alt immediately after starting Photoshop
    Mac — Hold down Shift Cmd Opt immediately after starting Photoshop
    If that fails, we need to know your operating system?
    Do you have a full CC subscription, or by apps do you mean Photoshop, Bridge and Lightroom?
    Another other information that might pertain ?

  • Jsp:useBean  not work when I install aplication!!

    Hi
    I developing an application with UIX JSP on Jdeveloper 9.0.2 and i using something like this:
    <jsp:useBean id="cbean" class="oracle.jsp.dbutil.ConnBean" scope="session" />
    <jsp:setProperty name="cbean" property="dataSource" value="jdbc/BiblosConnectionCoreDS" />
    </jsp:useBean>
    <%
    try{
    cbean.connect();
    This code work fine in standalone mode, but when i install this application on 9IAS, with an archive War, the code <jsp:useBean, not work.
    What is missing for? o What is the reason for this situation
    Thanks for some help?

    many thanks for your reply, and I have download new updates driver from your website (http://consumersupport.lenovo.com/en/DriversDownloads/drivers_show_890.html) and Installer it on my Y410 but it still does not work!!!
    the firstly: when I star up with win7, I can see a speaker icon right down near the clock, when I click mouse on it, I can see: Volume Mixer - Speaker with Device(Speaker Hight definition Audio Device, Digital Audio(S/PDIF) ( Hight definition Audio Device) ).
    Look in devicemanger I can see "Sound , video and game controll " has already installer with 'Hight definition Audio Device ' & 'Unimodem Hafl-Duplex Audio Device' below... but I cannot hear the sound when I play music, video, games...etc...
    the second: when laptop wakeup after 'sleep' mode, I can hear sound on speaker! but headphone jack does not work when I plug my headphone jack into it (I cannot hear sound with headphone), however I still hear sound from speaker, in this case!  
    Can you help me or tell me how I can do ?!
    Thanks and Best Regards,
    jupitervn

Maybe you are looking for

  • I can't open a second playlist window in iTunes 11!? And no double-clicking the title bar to minimize to dock?!

    Please tell me I'm overlooking something. These are two functions I use all the time. Really quite bummed about my inability to open a second playlist window, as I manually manage my playlists and I'm frequently grabbing chunks of songs and transferi

  • Extended fan control v.1.2

    Can anyone tell me why this version of fan control does not detect sensors on the GPU despite having an apparent facility to do so? The temp for the GPU always reads zero degrees, which suggests it's not picking it up. As my macbook pro overheats whe

  • Nokia 6230 - URGENT HELP!!!!!!

    I have recently purchased a 512 mb memory card for my 6230 and it was working fine until yesterday. When my memory card is insirted my gallery says it's empty and when i take my memory card out it says the same and i have to leave the memory card out

  • Next Double from a String

    I have used a Scanner Object before to read doubles from an input, but how do I get the Next double from a String? Used this in the past: Scanner input = new Scanner(System.in); double num = input.nextDouble();I am looking for something like this: St

  • Import or log and transfer?  does it matter?

    I am a handful of .mov's I'm using for a project and usually I just left click and import the folder full of .mov's. Does that have drawbacks? Or should I log and transfer? or does it matter?