Asset placement on stage

Hello all!
I am just getting started with Air 2.7 and Flash Builder 4.5.1. I have a simple Actionscript Mobile Application(for iOS) which loads a few assets from an external swc and places them on the stage. Can someone explain why the assets all appear nudged about a quarter of the way down the screen? It looks like point 0 on the y axis starts lower than it should. I also noticed that the graphics are scaled to fit the screen width.
Is there something I need to be aware of when placing assets on the stage for a mobile app? I would greatly appreciate anyone who can point me in the right direction..
Thanks and have a great weekend!

Did you set the stage align and scaleMode properties? These influence the location of the origin, sometimes in surprising ways.
I usually recommend scaleMode = StageScaleMode.NO_SCALE and align = StageAlign.TOP_LEFT (unless you want your graphics scaled to fit the screen, of course).

Similar Messages

  • Interactive Statement / Asset Placement

    Hello guys!!!
    I'm trying to build a Interactive Document solution demo based on this Solution Statement, and I have some questions
    The 1st question is:
    In the Flex Project there is a file package.xml where the line below indicates where the data is coming from, right?
    <resources controller="data">
    <resource contentType="text/xml" source="assets/test-assets/xml/AkiraTanaka.xml"/>
    </resources>
    Why is it necessary, if I have to pass the XML data in the LiveCycle process again?
    2nd question:
    In LC process (Interactive Statement), when we call the Asset Placement operation, it requires a template as input. When invoking the Solution Accelerator sample, it uses a template that is located in the LC Content. Where is it set up?
    Thanks!

    1 - You are right in that you don't need the data resource in the package file if you are going to populate data from a process.  I usually leave it in the flex project however for testing purposes.  Once I compile the template and bring it into LiveCycle I remove that resource reference.
    One thing to keep in mind is the use of the id “data” for the XMLDataLoader is important.  While you can name this object anything you want, the LiveCycle process components will specifically be looking for an object named “data”.  If you want to fill in the statement using a LiveCycle process, you need to make sure you name it “data”.
    2 - The solution template needs an additional step for installation.  Its on page 21 if the Install Guide under section 4.2.1:
    Log on to the Contentspace ES2 console using the default Administrator credentials:
    http://[server_name]:[port_number]/contentspace
    2. Click Company Home.
    3. Expand More Actions and click Import.
    4. Browse to [LiveCycleES2 root]/sa_resources/SA_SDK_9.5/InteractiveStatements/RetailBanking, and
    select adobe-sa-is-financecorp-cs-assets.zip. Click OK.
    5. Refresh the Company Home web page to view a new space, namely assets.

  • Keeping things aligned / in place when stage / browser resized

    Hi,
    I'm trying to work out how to keep objects aligned when the user resizes the browser window.
    I want the contents of the window to remain in view similar to how photoshop wourks when the window is resized. I also want any child components to remain "in place" relative to the position within the window.
    do I have to listen for the stage resizing and recalculate the position of the child components?
    Thanks
    Tim

    hi
    use the layout features of flex to manage sizing/positioning of objects: http://www.adobe.com/devnet/flex/videotraining/exercises/ex1_05.html

  • Video not showing after adding more assets to stage.

    Hello Everyone,
    Why does Edge Animate not display the embeded video when I add more than 2 assets to the stage?
    In the graphic below, I am building an animation with a total of 6 assets on the stage.
    #1 - Curtain (.png)
    #2 - Table (.png)
    #3 - Picture frame_1 (.png)
    #4 - Picture frame_2 (.png with a empty/transparent center)
    #5 - Picture frame_3 (.png)
    #6 - Rectangle
    I introduce #1 to the stage, draw a rectangle (#6) and I embed a video by using .js from edgehero.com. I test the animation and the video works fine.
    As soon as I add any other asset to the stage (#2, 3, 4 or 5) and test the animation, I can hear the movie playing but it is no longer visible.
    I have tried arranging the other assets behind #6. I have placed the additional assets away from asset #6 so that they dont overlap, however, the video problem appears as soon as I add a 3rd asset to the stage.
    Does anyone know what is causing this issue?
    Thank you in advance and kind regards. 

    update::: figured out that the video was somehow corrupt. doesn't make any sense... but i just deleted and reloaded it and it works now...
    new issue ::: when going to burn the DVD ... now i keep getting into the 20% range and then it says "video bitrate too high" ... so i've adjusted that repeatedly on the preference menu of studio pro ... and still getting the same issues.

  • AED for first stage dealer asset

    hi
    we r buying assets from first stage dealer
    we did all configuration regarding AED
    for normal purchase and FSD purchase it is woring ok
    now when we take ASSETS with FSD we r not able to post AED
    errror ,BALANCE IN CURRENCy
    plz hlp
    Edited by: Kunal Ingale on Mar 29, 2010 11:04 AM

    solved with ticking LIABLE FOR AED for specific plant EXCISE REGISTRATIOn
    Edited by: Kunal Ingale on Mar 29, 2010 11:33 AM

  • Debugging in "strict mode" while using external library assets

    Hi everyone. A new ActionScript-3 user here with a question on strict mode.
       I have multiple Flash pages which use the same art assets. To support modularity and possibly decrease total download time, I have implemented this by placing the shared assets into the library of a shared .swf file (the other .swf files all load this shared .swf file). The shared .swf contains ActionScript routines to place instances of the assets onto the stage and to perform other common functionality.
       A drawback to this strategy is that, correct me if I'm wrong, "strict mode" can not be used to debug calls to functions which exist in external .swf files. That is, if the parent .swf makes a call to a function which is defined within an externally loaded .swf, that function call will be reported as an error in strict-mode because Flash is unaware of the contents of an external .swf at compile time (though it is aware at run-time.)
       My understanding is that shared code can be compiled under strict-mode if the shared code exists purely as an external .as file, not as an external .swf file. However, again please correct me if I'm wrong, art assets which are shared at run-time must exist in an external .swf file. Therefore, by my understanding, if run-time shared assets are desired, then strict mode will not properly compile the projects.
       Is my understanding correct?
       Thanks for any help,
         - Rashid

          Posting an update.
          I have since found a way to compile in strict mode a project which loads an external .swf and acesses its functions. This external swf is able to have a library of its own which is accessed in the external swf's own ActionScript.
          Unfortunately, the solution I have found increases the size of the project's compiled swf. If anyone knows of a way to solve this problem without increasing swf size, I would be quite grateful if you were to share your knowledge.
          Posted below is the solution I am aware of, which increases file size. In these steps, “main project” refers to the top-level Flash project which is attempting to load other swf's. “External project” refers to an swf which is to be loaded by the main project.
    1) Publish the external projects as swc files. “Swc” is a class file, and is to be accessed by the main project when debugging under strict mode. The .swc presumably contains information about external project's library items which are to be exported for ActionScript.
          To create an .swc file, head to “File->Publish Settings...->Flash”. Check the “Export SWC” box.
    2) In the main project, add the external projects' .swc files to the external library path. This is found in, “File->Publish Settings...->Flash->Settings->External library path”. Either individual swc files can be added here (via the SWC file button) or the name of the directory where they reside (via the Path button). Both approaches should work.
    3) Somewhere in the main project's ActionScript, the external project is likely being loaded via a line of code similar to myLoaderObject.load( myURLRequest ). For this new approach, it is now necessary to make use of the second parameter to load(), the loader context. Here's the new line of code:
    myLoaderObject.load( myURLRequest, new LoaderContext( false, ApplicationDomain.currentDomain ) );
          If the LoaderContext parameter is NOT passed, then Flash unfortunately shall not report this as an error. Instead, you may observe strange behavior when the external swf attempts to use its exported library items.
    4) If the main project's code refers to the external project's class by name, then that class will need to be “import”ed into the main project's code. Without this, the compiler will complain about not recognizing the class.
    5) In the main project, edit  “File->Publish Settings...->Flash->Settings->Source path”.  Add the path to the external project's .as class file. Without this, the main project shall give a run-time error of not being able to find the external class.
       This final step, 5, is what increases the size of the main project's swf. I have a project with a few nested .swf loads, and the main project's swf increased by about 10Kb when using this solution.
          This does not seem proper. That is, one would desire the sizes of the final swf's to remain unchanged regardless of the level of compile-time error reporting. If my interpretation of an .swc class file is correct, then it seems logical to presume that step 5 above should not even be necessary, because the class information is given to the compiler/debugger through the .swc.
       Anyone know what I am doing wrong, or otherwise how to get around this problem?
       Thanks bunches.

  • Loading Website Assets

    Hi,
    Im working with actionscript for a while but must of all i developed applications for websites (image viewers, banners, slideshow, etc)
    I worked on a website that contains a lot of images and i created a progress bar on each page that will load the images before placing
    them on stage, but even when the images are loaded, it doesn't feel smooth and i get alot of loading issues with old computers.
    I saw some sites on the web that contains a lot of advanced assets like 3d and complex animation and those sites are running really smooth,
    there is a progress bar on the main page that loads all the information and i wanted to know if usually websites loads images and then run or
    load all the assets including movieclips, sounds, video, etc.... If thats the case is it true that most websites load all required assets from
    the library using AS and place them on the place on stage and that the actual stage and frames on the fla file are empty ?
    Should it increase the speed and smoothness of the website and be best practice for developing websites in flash ?

    Yeah I have to agree with Bob, it's not really about how you load assets although that simply affects how long it takes to load the whole file or the assets individually... I could give you some tips that helped me optimize my apps because I used to face alot of trouble with loading time and stuff like that:
    1. Whenever you can do something using code without creating it at author time then go for it. For example, when you want to draw a rectangle or a circle, rather than creating it in the Flash IDE, just use the graphics class to do so... this keeps your file size smaller.
    2. Set your frame rate to 30 - 35 frames per second. This should help you create smooth animations.
    3. Load assets externally using XML rather than embedding them into your swf file. This reduces the file size of your swf dramatically. Also, it ensures that the visitor's computer loads only what he/she would like to see rather than loading the whole app/site together.
    4. Use TweenMax as your tweening engine. It is faster than the Tween() class and much easier to use.
    I hope that helps

  • Chapter Problem with Multiple Timeline Assets

    Using Premiere Pro 2.0 and DV assets exported from Premiere.
    Normally I just create a single export out of Premiere and all works well. This time I decided to try a different workflow, taking advantage of Encore's ability to add multiple assets to the same timeline. This way, I figured, if any changes are needed, only one part will have to be reexported and retranscoded, instead of the whole thing.
    So the first asset places in the timeline OK. The second asset generates a warning message, asking me if I want to "replace existing chapters with source marker in the asset".
    Now first of all, there are no existing chapters in the section of timeline where the new asset is being added, so I don't know why it's asking if I want to replace them. But that's a minor annoyance. The real problem is that all the chapter markers in the second asset, whether I click Yes or Cancel in response to the warning, end up squished towards the beginning of the second asset. The first chapter marker is correct, and all chapter markers thereafter are redistributed 12 frames apart from there. I only noticed this when I expanded the timeline view.
    I thought maybe I had exported from Premiere incorrectly, but if I remove the first asset and place the second asset in the timeline first, the chapters appear where they should. It seems that any asset after the first exhibits this squished marker syndrome, and I don't have a clue why, or how to fix it.
    Anyone have any ideas here?

    OK, I just tried replacing the middle timeline clip here. Logistically, it works.
    Here's what I did.
    1. New project. Add 3 pre-transcoded elementary mpeg and ac3 streams to the timeline.
    2. Check project.
    3. Fix the reported error about gaps between clips. Unfortunately, I had to move the 3rd clip 12 frames away from the 2nd clip. This will introduce a 12-frame gap between clips. I did not try to build with the error uncorrected. NB: There was no gap error concerning the boundary between clips 1 and 2, so I expect the problem is clip specific.
    4. Build a disc image. All of the audio was ac3, and with the different audio clip lengths (all less than 1/2 second difference), Encore re-transcoded the audio, and only the audio. My suggestion here is to use .wav files only.
    5. Use File>Replace Asset to replace the middle clip audio and video streams with new, shorter ones.
    6. Trim out the danger stripes in the timeline and butt the video and audio of the 3rd clip perfectly up against the end of the middle clip.
    7. Check project. No gap error this time.
    8. Build disc image.
    I mounted each image in turn and played them in WinDVD. They played as expected. I cannot speak to how truly seamless the playback is because all of the clips I have for testing fade to black at the end. But WinDVD did not hesitate when going from clip to clip and there were no freeze frames that I could see.
    So upgrading to CS3 will let you do what you want. It may be a perfect solution, and it may not, but it is certain to be better than what you get from En 1.5 going from timeline to timeline.

  • Relationship between the "Stage" and the "preLoader"

    Other than the "preLoader" loading the project what is the relationship between the 2 elements in the project. Is the "preLoader" on the stage? is there a "stage" for the preloader ?
    In css markup in my html file to I need to deal with them seperately if I want to move there loaction?
    I use...
    sym.$("#Stage").css({"margin": "auto"})
    in compReady to center my stage. I tried do this with the preloader but it doesn't work. The stage is centered but the preloader off to the left.  Is there some code I can add to the project so my preloader will allways center in the same location where my stage is placed?
    If I'm using html css markup to place my "stage" how do I address the preloader so it's goverened by the same markup ?
    Also maybe this should be a seperate post question, but how would i add a timer to report preload times to the console ?
    Thanks
    Joel H

    That doesn't work all the time and sometimes it works with stage but not the preloader, especialy if I want to center vertically also like
    <style>
    #Stage {
            width:350px;
            height:350px;
            position:absolute;
            left:50%;
            top:50%;
            margin:-175px 0 0 -175px;
    </style>
    this doesn't work. But if I apply the same markup to a wrapper div it does work. like
    <style>
    #StageWrapper {
            width:350px;
            height:350px;
            position:absolute;
            left:50%;
            top:50%;
            margin:-175px 0 0 -175px;
    </style>
    then in the <body>
    <div id="StageWrapper">
    <div="Stage"  class="EDGE-blah-blah">
    </div></div>
    this works great, you just can't open your html file in edge again cause it screws your project all up.
    I was just wondering why if I was centering my stage with js in the project file why the preloader wasn't doing the same thing or how to do the same thing with js in the project file
    thanks
    Joel H

  • Flash CS3, some workstations in my classroom has a view of stage without workspace

    I have a classroom with 20 workstations, 5 or 6, of theses computers when using flash only shows a view of the stage without the workspace. when when reduce down to a view of 50% it places the stage in the upper right hand corner and never allows the normal view of the stage and workspace.  If anyone can help it would be great.

    Found the problem. This interesting, this is a screen shot I took from one of the troubled computers.  It looks good in the picture but not when we are looking at the actual screen. The students had the contrast on the screen all the way up, even though that was the first thing I asked them to look at.  I appreciate your help on this site,  Trrouble shooting with teenagers can be a challenge and this has helped me tons.

  • Working with external assets

    I remember in previous versions of FW that you could impot a PSD to the library as an imported external asset, place it on the canvas and then if you made any changes to the original PSD, update the asset to see the changes reflected in FW.
    Some where along the way it looks like this functionality was removed. I have CS4, but have not been able to replicate this with the last few versions. Is it still possible to import and update external assets like this in FW?
    If so, was is the workflow?

    To my knowledge, this functionality has never existed. Fireworks doesn't retain a link to external assets which are imported.  For several versions, Photoshop and Illustrator  (and InDesign I believe) have supported this concept through the use of Smart Objects, but not FW.
    Jim Babbage

  • Help please! How to reposition the stage?

    Somehow I've managed to place my stage in the upper right
    corner of my workspace. I don't know how I did it, but it makes it
    impossible to see symbols placed to the top and left of the stage
    area.
    Can anyone tell me how to get my stage back in the middle of
    my workspace?

    When View > Pasteboard is checked, the gray pasteboard
    area is available on all sides of the stage (the default). When you
    remove the checkmark by selecting "Pasteboard" in the View menu (or
    hitting the keyboard shortcut), the stage aligns to the upper left
    of the pasteboard. Having items outside the stage area is just a
    normal part of animation. For example, if a character comes onto
    the stage from the left, it will begin off the stage to the left.
    So you need to be able to see the pasteboard to create such
    effects. But for the purpose of viewing your animation, it could be
    useful to quickly get rid of the pasteboard area -- and now we know
    how.

  • Importing for runtime sharing

    Hi,
    I'm working on a project that involves having two swf files, one for a shared assets library and the other being the project swf, to allow the assets to be changed independently of the project and code.
    The assets get exported for actionscript in the assets swf, and then 'imported for runtime sharing' into the project swf. I want to place the assets on the stage in the project swf and then access them in actionscript using their instance names (rather than doing getDefinitionByName(asset) as Class; )
    This works fine for most of what I'm doing. However I run into trouble when I import a MovieClip asset that contains other MovieClip(s), as I can't seem to access the contained clips - it complains that they are null. Is there a way around this problem?
    Thanks,

    Hi Szymon,
    Our flash team and a few other flash clients have experienced this issue.
    It is detailed here in this thread:
    http://forums.adobe.com/message/4000804
    There is no fix however and Adobe have not commented on the issue (via twitter @adobe_care or on the forum).  I contacted adobe support, paid for a support contract, reported the issue and pointed them to the thread but they wanted a video of it after many frustrating conversations (Did I mention that adobe support is -horrible-).  Our flash team never generate a movie though regrettably, they still experience it/deal with it.  It's frustrating to say the least but I am determined to get Adobe to say something about it.
    Adobe make good products but getting support from them is like getting blood out of a stone.  I wonder how many people experience the issue but haven't reported it?
    Regards,
    M

  • Flash Loading With Blank Screen?

    I have a flash movie that has an mp3 file on one of the layers.  The mp3 file loads fine and plays but when the flash movie first appears on the page it comes up as a blank white box, then it eventually loads 5-6 seconds later.  I see the pre-loader for a split-second right before it loads.  Shouldn't I be seeing the pre-loader bar right from the beginning? and see the progress bar?  Why am I seeing nothing but white prior to it loading?

    I've found a solution that works for my situation.  I found a lot of solutions while researching this, all of them quite messy.  But you gotta do what you gotta do I guess.  Anyhow, rather than rewrite what I did, this tutorial pretty much sums it up -
    http://www.8bitrocket.com/newsdisplay.aspx?newspage=10807
    There are a few things to note in this tutorial, that I did not find in other very similar tutorials.  Many tutorials, like this one, have you unchecking export in first frame and placing assets on the stage in an unused frame (usually frame 2).  This seemed to work OK for everything except sounds for me.  The sounds would work initially, but after beating the game and returning to the main menu, EVERY SINGLE SOUND would be playing.  This tutorial makes a point to tell you to place the assets outside the stage area:
    see step 6;
    6. Put the asset holder clip on the stage in Frame 2 of your main movie (outside the viewable region)
    That resolved the issue for me.
    Anyhow, hope this helps some people.  I now have a preloader that displays when the game is about 15-20% loaded, rather than 80%.

  • 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

Maybe you are looking for