Document Class {add image library + preloader}

Hi there,
I'm learning AS3 and want to use a document class to control
my Flash movie (i.e. I want the time line to be completely empty).
I've run into two problems.
1.) I have a large image in the Flash library which I setup
with "Export for ActionScript", but I was unable to work out how to
add the image to the displaylist as i think it needs to be added as
BitmapData? Can anyone advise how best to do this and provide an
example please.
2.) I have yet to find a simple example of creating a
preloader in a document class? There was a BizTalk website tutorial
but I don't think that explained very well what the code was doing
- so I'm hoping someone here can provide a code example with
comments (if the code example could tie into the point 1. above
that would be brilliant).
Finally, also I'm unsure of how a document class can preload
content that doesn't actually exist until the class itself creates
the content, just seems a bit odd?
Any help with these two issues would be greatly appreciated!
Thank you :)
Kind regards,
M.

Hi there,
I'm learning AS3 and want to use a document class to control
my Flash movie (i.e. I want the time line to be completely empty).
I've run into two problems.
1.) I have a large image in the Flash library which I setup
with "Export for ActionScript", but I was unable to work out how to
add the image to the displaylist as i think it needs to be added as
BitmapData? Can anyone advise how best to do this and provide an
example please.
2.) I have yet to find a simple example of creating a
preloader in a document class? There was a BizTalk website tutorial
but I don't think that explained very well what the code was doing
- so I'm hoping someone here can provide a code example with
comments (if the code example could tie into the point 1. above
that would be brilliant).
Finally, also I'm unsure of how a document class can preload
content that doesn't actually exist until the class itself creates
the content, just seems a bit odd?
Any help with these two issues would be greatly appreciated!
Thank you :)
Kind regards,
M.

Similar Messages

  • Preloader and Document Class BIG question (yeap please help)

    Hy,
    I know that this its a question posted many, many times, but
    after searching the net, reading a lot of books and searching this
    forum too, I cant get out with a solution. If I'd say for sure
    there is no possibility to create something like this, I just go
    back to old methods but is not the scope of Adobe with AS3 to
    encourage the use of OOP principle or not?
    The problem:
    I have a single fla file (AS3) with a single frame on
    timeline, frame that its there when you will create the file with
    flash. In the library I have different symbols, that for simplicity
    are only jpg image, (BitmapData) checked for export for
    ActionScript and exported on frame one. An external .as file called
    DocumentClass its off course my Document Class
    This its all that I want to do with the fla, the goal its to
    create, animate etc. only with AS3 in external classes, no timeline
    script. I don't want to load external files, XML, or else in this
    movie. I just want a single swf after compilation, no additional
    files.
    Ok, how do I create a preloader that will take care of
    starting the logic after the whole swf its loaded and in the same
    time shows the user a percentage or a load bar or something that
    its not the blank screen when the swf its downloading. I want to do
    this without another swf that load this swf, or timeline scripts,
    or place all the content on second frame and then gotoAndStop to
    the third frame. All this are not solution but cheap tricks, that
    are against all this OOP principle that I just continue to read in
    books and here from guru programmers.
    The big question is:
    It is possible to create a preloader, when use a document
    class with your fla? And if yes, how?
    I know that the Document Class its not instantiated if its
    not fully loaded, if that's true when the document class will be
    fully loaded? maybe after the whole movie its loaded? And, if its
    true, it will never show a percentage bar "while" the movie its
    loaded. And if that's true WHY use a document class anyway?
    Thank you for reading this and I really wait to get some
    answer.

    I am pretty sure you cannot do self preloader with one frame
    and all the objects in the library. I guess the key here is
    one-frame design. Screen refreshes (renders) only when all the
    scripts in the frame are executed - this is a very important thing
    to understand about how Flash works. Yes, you can force screen
    refresh with updateAfterEvent() method but it is attached to a
    handful of events only (MouseEvent and TimerEvent) but, again, all
    this functionality is available only after first frame scripts are
    executed. Thus, it seems like the only way to create preloader from
    within SWF is to use multiple frames and set library objects to
    load in later (not first) frame.
    quote:
    And if that's true WHY use a document class anyway?
    Well, preloader is the last thing that would be on my mind in
    terms of using AS3 ability to link DocumentClass to the top movie.
    This feature allows for very sophisticated architectural
    approaches. It has no connection to preloader as to any other
    features developer wants to implement. Neither it depends on or
    negates timeline. As a matter of fact, although I love one-frame
    applications, I find on numerous occasions that my application
    would be more efficient if I used several (at least two) frames.
    gotoAndStop is not deprecated. It is a valid MovieClip class'
    method. After all, having only one frame doesn't mean not having
    frames at all - there is one already. Frames are fundament of
    Flash. AS3 did introduce frameless entities like Sprite, etc. but
    it doesn't mean that frames are going anywhere.
    I would agree that timeline code is inferior to
    classed/packaged (read: better organized) code but, still, how is
    it not OOP? Frame is an Object, right? Why using timeline is cheap
    and not a solution?
    On a side note, I see too many times how some authors (and
    managers) are pushing their agenda (or close mindedness) onto their
    audience with no real substantiation. Claiming that timeline in
    Flash is not valid architectural decision from OOP standpoint is
    totally wrong. As wrong as strict adherence to design patterns. I
    don't think there is sharply defined "right" or "wrong" in
    programming. One finds the best optimal solution. The goal is to
    create something that works fine. Unless, of course, the process is
    the goal - but very few of us can afford focusing on the process.

  • Preloader in Document Class Help.

    Hello,
    I want to know that how can I add a Preloader to my existing document class. In my FLA all content is on 1st Frame. I'm loading an external image to a MovieClip which is on 1st frame and on stage. My document class is working fine but when i try to add any preloading script, its not working...
    Can any one please help me in this regard..
    A Garden of Thanks.
    My Document Class is here...  (This was also a tutorial which I'm using..)
    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 = 0;
                        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;          
                   //my bottom navigation
                            bottomNav.x = Math.floor(stage.stageWidth / 2 - bottomNav.width / 2);
                   bottomNav.y = Math.floor(stage.stageHeight - bottomNav.height - 0);

    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;
         import flash.events.ProgressEvent;
         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);
                   loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, preload_image, false, 0, true);
                   private function preload_image(event:ProgressEvent):void
                          var per = int((event.bytesLoaded / event.bytesTotal) * 100);
                          pic.addChild(loader);
                          //make a textfield or preloader animation and assign this per to it.
              private function showImage(e:Event):void
                   try {                              
                        e.target.content.alpha = 0;
                        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;          
                   //my bottom navigation
                   bottomNav.x = Math.floor(stage.stageWidth / 2 - bottomNav.width / 2);
                   bottomNav.y = Math.floor(stage.stageHeight - bottomNav.height - 0);
    Oh.. Thanks.. its working now... Thanks aloooooooooooooot.....
    Any other tip if you have a time to give me will be a greatful to you...
    Thanks again for your precious time.. I've seen your Awesome Portfolio at your website....

  • Unable to add document to SP 2010 library

    In a SP 2010 library I'm unable to add a document to a specific library. When I try adding the document SP says that the file is checked out for editing by someone.  However, the file doesn't exist in the library and the require check-out option isn't
    turned on for that library either.  A file with the same name might have existed in that library at one time but it's currently not there.

    Thanks for your comments. Will recommend them to the product team.

  • Add image to iPhoto library doesn't open IPhoto screen

    OS 10.4.10
    Ibook G4
    1.5 GB Ram
    iPhoto 5.0.4
    Hi,
    When I want to capture a picture, whether from the web or elsewhere, I usually press control-click and a pop down window appears with various choices, one of which is "Add image to iPhoto library". Ordinarily, what happens is that the iPhoto screen appears, says "loading photos" and I see the image I have added.
    Today, I have pressed control-click, "Add image to iPhoto library", but the iPhoto window didn't open. The application opened because the tool bar (menu?) at the top was iPhoto, and said so at the far left corner.
    The weird thing then was that when I did get the iPhoto screen to open (and I don't remember what I did to do that) all the pictures I thought I hadn't downloaded, were there.
    I admit I have been having some weird things going on in all my programs and in the finder, such as lots of the beach ball, and the stopped watch; putting the cursor into a line of text not to select but to write, and the word and/or the line got selected. Other things too. But iPhoto has been reliable up to today. I'm pleased that I /did/ get the pictures after all, but I'd like to know why the iPhoto screen didn't appear as usual.
    Thanks for any help you can give,
    Rafael

    Rafael
    My concern is that your issue is not with iPhoto, but a more generalised one - especially when I read
    I have been having some weird things going on in all my programs and in the finder, such as lots of the beach ball, and the stopped watch; putting the cursor into a line of text not to select but to write, and the word and/or the line got selected. Other things too.
    I would have that Hard Disk checked, this could be the beginnings of a hardware issue.
    Regards
    TD

  • "Add image to iPhoto Library" in safari doesn't show up anymore!

                   Hey, I got a problem with my computer. Normally, When i right click an image, a tab window shows up with an option to "add image to iphoto". Now it doesn't come up anymore. Please tell me how to fix this!

    Well given that we don't know what version of OS X you're on, what version of Safari you're using and it's the iPhoto forum and not the Safari one, the best I can suggest is that you try repair permissions with Disk Utility

  • How do I add images to the jquery slider provided in Dreamweaver CC?

    I have inserted the slider using the DW CC Insert > JQueryUI > Slider, but find no Properties options to add images to it. Is there a missing interface for that or some tutorial? Can't find anything. I'm not a coder, which is why I use DW.
    Thanks,
    Jack

    I've never used the widgets in DW because honestly the code seems very bloated for such a simple task.  By comparison, the code for jQuery Cycle2 is very light and easy to understand.   Copy & paste this into a new, blank document.  Change images to your own.  SaveAs cycle-test.html. Preview in your browsers.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 with Cycle2</title>
    <!--help for older IE browsers-->
    <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
    <!--Latest jQuery Core Library-->
    <script src="http://code.jquery.com/jquery-latest.min.js">
    </script>
    <!--Cycle2 Slideshow Plugin-->
    <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery.cycle2/20130409/jquery.cycle2.min.js"></script>
    <style>
    /**CSS Reset**/
    margin:0;
    padding:0;
    -moz-box-sizing:border-box;
    -webkit-box-sizing:border-box;
    box-sizing:border-box;
    /**Slideshow styles**/
    .cycle-slideshow {
        width: 500px; /**adjust width as required**/
        margin: 0 auto;
        text-align: center;
        position:relative;
    .cycle-slideshow img { max-width: 100%;; display:block; vertical-align:baseline; }
    </style>
    </head>
    <body>
    <!--begin slideshow-->
    <div class="cycle-slideshow"
        data-cycle-pause-on-hover="true"
        data-cycle-speed="1200"
        data-cycle-timeout="2000"
        data-cycle-slides="> div"
    >
    <!--INSERT YOUR IMAGES & LINKS BELOW-->
    <div>
    <a href="http://example.com"><img alt="description" src="http://placehold.it/500x325/198EBA/FFFFFF&text=SLIDE-1.jpg">Slide 1</a>
    <p>Optional text for slide-1 goes here...</p>
    </div>
    <div>
    <a href="http://example.com"><img alt="description" src="http://placehold.it/500x325/2A4D6B/FFFFFF&text=SLIDE-2.jpg">Slide 2</a>
    <p>Optional text for slide-2 goes here...</p>
    </div>
    <div>
    <a href="http://example.com"><img alt="description" src="http://placehold.it/500x325/FFC000/000000&text=SLIDE-3.jpg">Slide 3</a>
    <p>Optional text for slide-3 goes here...</p>
    </div>
    <!--end slideshow-->
    </div>
    </body>
    </html>
    Nancy O.

  • How to add a library (libSomeRandomlib.so) to a project....??

    Ok, so I've been trying to get CERN's ROOT program/libraries to work in an xcode project for a while, but I'm running into one really weird error, and I think I may just not know how to add a library to a project correctly.
    Suppose I create a new Xcode C++ command line tool project. I hit Build and go, and it gives me a nice little Hello World! in the console, just as it should. If I then click on the project in Groups & Files, go to Project>Add to Project..., and choose, say, libCint.so, from my root/lib directory, and click ok, then click Build & Go, I get an error in the console:
    dyld: Library not loaded: @rpath/libCint.so
    Referenced from: /Users/paulthompson/Documents/Programming/Build Products/Debug/LibraryIncludeTest
    Reason: image not found
    sharedlibrary apply-load-rules all
    Data Formatters temporarily unavailable, will re-try after a 'continue'. (Cannot call into the loader at present, it is locked.)
    My assumption is that either I'm missing a step in the process of adding a library, or else there is something jacked up with the libraries themselves. Anyone have any advice?
    Thanks,
    Paul
    EDIT* Oh, I should mention that the actuall binary that gets built after adding the library WILL execute properly in the Finder, or from terminal, just not with the Build & Go, or Go commands from within xcode.
    Message was edited by: TraxusIV

    TraxusIV wrote:
    Results of otool:
    LibraryIncludeTest:
    @rpath/libCint.so (compatibility version 0.0.0, current version 0.0.0)
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0)
    Macintosh-9:Debug paulthompson$ otool -L /Applications/CERNRoot/root/lib/libCint.so
    /Applications/CERNRoot/root/lib/libCint.so:
    @rpath/libCint.so (compatibility version 0.0.0, current version 0.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
    I honestly don't know much about @rpath. I found this page that explains it a bit more: http://blogs.sun.com/dipol/entry/dynamiclibraries_rpath_andmac
    So, since I don't want to deploy with the environment variable set, I should ask, what IS the correct, MacOS X way to do it?
    The best way to find that is to look at how Apple does it. They put frameworks in /System/Library/Frameworks and regular shared libraries in the standard places. You can do the same. Put your frameworks into /Library/Frameworks and your shared libraries into /usr/local-based paths.
    If you want to create stand-alone executables that can be installed via drag-n-drop, you can put shared libraries inside the application bundle. If your shared libraries/frameworks are elsewhere, you will need some sort of installer to get them installed.
    I've been sifting through Apple's developer documentation but I have yet to find a concise, straightforward explanation of how to add shared libraries. I'm horribly confused at this point. Is there a good tutorial available anywhere for both the general unix case of linking to dylibs and .so's, and the Mac specific case?
    Hopefully someone else knows an answer for this one.
    *EDIT* I do already have the variable defined both in ~/.MacOS/environment.plist and also in Xcode as an additional user variable.
    I'm not sure about the whole RPATH thing. Setting environment.plist will define environment variables for use in the Finder, but that is really a hack. There are better ways to do it, but if you are porting some open-source programs, that may be the only way. You should be able to define those variables in Xcode. You have to selected the debug executable under "Exectuables"

  • How do i add images in the header and footer to a PDF using iText

    Hi ,
    I want to add images to the header and footer of every page while i am genrating a pdf i have created a separate class called EndPage which i am instanceiating its default constructor in another class 's button action method.
    The above code genrates a PDF for me however it genrates a file with file size zero bytes and does not open it following is my sample code
    //**********Any Help would be appreciated
    Thank You
    public class My_Class
    public String pdf_action()
    EndPage ep=new EndPage();
    return null;
    }//My_class Ends
    class EndPage extends PdfPageEventHelper
    * Demonstrates the use of PageEvents.
    * @param args no arguments needed
    public EndPage()
    try {
    com.lowagie.text.Document document = new Document(PageSize.A4, 50, 50, 70, 70);
    PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("D://proposals/endpage.pdf"));
    writer.setPageEvent(new EndPage());
    document.open();
    String text = "Lots of text. ";
    for (int k = 0; k < 10; ++k)
    text += text;
    document.add(new Paragraph(text));
    document.close();
    catch (Exception de) {
    de.printStackTrace();
    public void onEndPage(PdfWriter writer, Document document) {
    try {
    Rectangle page = document.getPageSize();
    PdfPTable head = new PdfPTable(3);
    for (int k = 1; k <= 6; ++k)
    head.addCell("head " + k);
    head.setTotalWidth(page.width() - document.leftMargin() - document.rightMargin());
    head.writeSelectedRows(0, -1, document.leftMargin(), page.height() - document.topMargin() + head.getTotalHeight(),
    writer.getDirectContent());
    PdfPTable foot = new PdfPTable(3);
    for (int k = 1; k <= 6; ++k)
    foot.addCell("foot " + k);
    foot.setTotalWidth(page.width() - document.leftMargin() - document.rightMargin());
    foot.writeSelectedRows(0, -1, document.leftMargin(), document.bottomMargin(),
    writer.getDirectContent());
    catch (Exception e) {
    throw new ExceptionConverter(e);
    }

    Hi,
    Thanks for the quick response.
    The problem is that when I keep the logo as a watermark, the pdf is not adjusting itself to include the logo as header.
    But if I add a header text via Tools -> Headers and Footers, the pdf is adjusting itself so that the header text is at the beginning , not overlapping with the contents of pdf.
    But while using logo as watermark, some times overlapping of the pdf contents and logo is happening.
    Is there any way to add a logo in the Header and Footer via the option in Tools -> Headers and Footers
    Thanks,
    Vidhya

  • NEED TO KNOW HOW CONVERT GIF FILE TO SYMBOL FROM DOCUMENT CLASS

                                                ROBERT LEAHONG
                                      COMPUTER PROGRAMMER / ASP Web Devloper
    Hello,
            I need to convert a GIF file (PICTURE) to a symbol (Button) From within The Document Class using ActionScript 3.0 .
    Thanks in advance for your help.

    So you imported a .gif into the library and need to get to it from the document class? If that's the case you need to  right-click the image in the library, select properties, select the ActionScript tab and then set it to export for ActionScript. Give it a class name - I'll use myGif for example. You'll see it will have a base class of BitmapData...
    Then in your document class you can just instantiate it like:
    var myImageData:BitmapData = new myGif();
    You can turn it into a useable image that you can place on stage by putting it into a Bitmap object:
    var myImage:Bitmap = new Bitmap(myImageData);
    If you want to make a button out of it, ie make it clickable - stick it into a Sprite:
    var mySprite:Sprite = new Sprite():
    mySprite.addChild(myImage);
    addChild(mySprite);
    mySprite.addEventListener(MouseEvent.CLICK, clicked);
    function clicked(e:MouseEvent):void
         trace("clicked");
    HTH

  • 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

  • Can't add images to announcements in SharePoint-hosted app in Office 365

    I tried something very simple:
    Create a new SharePoint-hosted app
    Add a new list to the app, based on the Announcements template
    Deploy the app to my Dev site on Office 365
    When I now add a new item (aka a new announcement) and try to add an image to the Body field, I encounter two errors (depending on whether I try to add an image from my Computer or from SharePoint)
    Adding from my computer gives me an unexpected error:
    Adding from SharePoint shows me a structure of all the apps in my hostweb, but no way to upload an image either to the hostweb or the appweb:
    Is it not possible to add images to a Rich Text field in a list in an app?

    Hi Rene,
    For inserting any image from you computer to you App web, you need to create a separate picture library in your app web manually i.e. in your SharePoint hosted app add a new list item, under list settings window choose "create a list instance
    base on existing list template" and in the drop down select
    picture library. Now deploy the app and try again.
    Generally when we insert any image from our computer to a SharePoint rich text field, the image gets upload in one of the document libraries, but this option is not available in the newly created app web, as it doesn't contains any separate library..
    For you next error, make sure that in the app manifest you are providing
    read access on the web, this will resolve you second problem.
    Hope it helps you.....

  • Change default association with DOCUMENT class

    Hi
    Is it possible to change the default association of files in IFS with the DOCUMENT class to a subclass of DOCUMENT?
    I would like to make a subclass of DOCUMENT with additional attributes and, by default, associate ALL uploaded files with that subclass.
    If this is a setting in IFS manager, would someone be able to tell me what to change?
    Any help will be greatly appreciated.
    Thanks very much
    Hugo

    Hi,
    Yes, you have to associate the basic content type with the document library manually. You can refer to the following powershell:
    #Get site object and
    #specify name of the content type to look for in each library
    $site = Get-SPSite http://portal
    $lookForCT = "Sales Document"
    #Walk through each site in the site collection
    $site | Get-SPWeb -Limit all | ForEach-Object {
    write-host "Checking site:"$_.Title
    #Go through each document library in the site
    $_.Lists | where { $_.BaseTemplate -eq "DocumentLibrary" } | ForEach-Object {
    write-host "Checking list:"$_.Title
    $_.ContentTypesEnabled = $true
    #Check to see if the library contains the content type specified
    #at the start of the script
    if (($_.ContentTypes | where { $_.Name -eq $lookForCT }) -eq $null)
    write-host "No content type exists with the name" $lookForCT "on list" $_.Title
    else
    #Add site content types to the list
    $ctToAdd = $site.RootWeb.ContentTypes["HR Document"]
    $ct = $_.ContentTypes.Add($ctToAdd)
    write-host "Content type" $ct.Name "added to list" $_.Title
    $ctToAdd = $site.RootWeb.ContentTypes["IT Document"]
    $ct = $_.ContentTypes.Add($ctToAdd)
    write-host "Content type" $ct.Name "added to list" $_.Title
    $_.Update()
    #Dispose of the site object
    $site.Dispose()
    Reference:
    https://social.technet.microsoft.com/Forums/office/en-US/dc030cb6-5d99-47eb-9620-f3640f6d6b1b/powershell-script-enable-content-types-on-a-list-and-add-content-types?forum=sharepointadminprevious
    http://www.getinthesky.com/2014/11/add-contenttype-documents-sitecollection-using-powershell-sharepoint-2013/
    Best Regards,
    Eric
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • XCODE WINDOW INVISIBILITY/Add images to background

    is there any way you can get rid of the actual window or make it invisible to the user?
    Also how do i add pictures to background of my window? If i understand correctly, you have to add a UIImageView, and link it from the resources file, but then how do i access it in interface builder?
    thanks for all the help.
    Lord Zartek

    To add pictures to an iPhone application (or a Mac application) follow these instructions:
    1. Add the image to the Resources section of your project.
    2. Add a class called ImageController, which is a subclass of NSObject. Add the following instance variable:
    IBOutlet UIImageView *imageView;
    Note, if you are doing this for mac, change it to NSImageView instead of UIImageView.
    3. In the .m file of the ImageController class, add the init method like this:
    -(id)init {
    self = [super init];
    if (self) {
    [imageView setImage:[UIImage imageNamed:@"nameOfYourImage"]];
    return self;
    Note, if you are doing this for mac, replace UIImage with NSImage. Replace nameOfYourImage with the name of the image in the Resources folder (adding the extension is optional).
    4. In Interface Builder, drag a view to the application's window, and drag an object to the Interface Builder document window. Set the object to be of the class ImageController, and control drag from the object to the view, and set the view to be the imageView outlet.
    5. Build and run the app.

  • How can you retieve a list of classes from the Library

    Is it possible to retrieve a list of the Linkage or Export
    Classes from a swf library dynamically?
    I am building an application where I allow the user to load
    an asset swf at runtime, then they can choose to load any Exported
    class from the library of the swf. Currently it works if you know
    the name of the asset, that you want to load, but I would like to
    be able to bring up a chooser list of the assets, rather than
    having to type the Class names.
    So far I have only seen examples where "if you know the class
    name you can load it", but nothing concerning pulling the list.
    There must be a list somewhere in flash, I just want to tap into
    that.

    I saw this before and did not have a chance to go through it
    completely.
    As I was reading it, though it did not seem to be giving me
    the answer, as they seem to extend the Export clips in the library
    by extending the class.
    I'll run through that and see.
    It does give me another idea though.
    (crazy) Idea:
    What if I extend the loader class and add a method, kind of
    like what they are doing on the document class of the loaded swf,
    to pull the class names. They hard code in the class names into the
    array though.... so that is the crux of the issue.
    Somehow I think this concept is doomed to fail but, I will
    also see if that is possible.
    I suppose for the application, I could require that any user
    would use a swf with a document class that has the getAssets()
    method.... also has some problems .... namely dealing with the
    issue of "what if they do not extend" and having it fail
    gracefully.
    oh well, food for thought... I will leave this open for now
    and perhaps I will post some answer.

Maybe you are looking for

  • KT3 Ultra-ARU SB Live! problem when using onboard Promise MBFasttrak 1

    Hello ! I have one little problem with my motherboard. I know it's a little bit older compared to today's MSI production.. I have a MSI KT3 Ultra-ARU motherboard. I used only VT8233A southbridge's IDE until now, and everything worked perfectly. But n

  • Time Machine Backup on External Drive Invalid sibling link

    I've used time machine to backup macbook air for several months.  From Feb 2011 without any problems until about 2 months ago.  I started to get the message that backups could not be started. I realized that the disk would not mount right away.  And

  • Problem in Interacting with Weblogic JMS through Informatica ETL server

    Hi All, We are trying to configure Informatica PowerCenter server to interact with JMS queues created on Weblogic 11gR1 server. We have copied the necessary jar file - wlfullclient.jar to the classpath of the Informatica server. Now when i try to rea

  • How to to display the JSP report in Application Server ? URL for displaying

    Hi Experts, Last week, we tried to change the memory of Response Cache and buffer Cache to increase the speed of the Excel report. But it didn't work out. And from the below link, I understood we can convert the oracle 9i report to excel by convertin

  • Pricing for a short Azure consultation?

    Hi, We're trying out Microsoft Azure. We wondered if you offer any consultation services (we have a short list of focused technical questions, for which we seek professional answers). Is so, what's the price estimate for such a service? It would suff