Size of sprite different in AS3 and Flash

When i do a Select All of my symbol in Flash I get a height
(lets say 300x300). Even if there are multiple items, it groups
them together to give me the total size.
In AS3 I never get the same size. I have tried calling
getRect(), width/height, etc... I get a different size, it's close
but still invalid, sometimes smaller, sometimes larger.
To replicate this:
1. Create a new sprite with some text, add some paint
brushes, etc..
2. Add the sprite to the stage and notice its width and
height
3. Give the sprite an instance name (in this case I called it
"block")
4. Add a document main source file and add the following code
to the constructor (from the bottom of the script)
You will see that the size the code tells you and the size
the flash editor gives are different. Is this a bug?

1) yes the sprite is on the stage. It is accessible by AS3
just the size is wrong.
2) no, the sprite is not always a whole pixel, sometimes the
size in Flash may be 300.50 x 210.90 etc..

Similar Messages

  • Different OS's and flash player

    I would like to use Android since it is much faster than waiting for clunky ol microsoft, and it's never ending updates.  However one cannot use flash, why?
    I see that europe has an OS called Symbian which has never surfaced in OZ !
    Android loads faster with it's solid state construction can use antivirus, although we are plagued by spam and have to delete it twice.
    Surely there can be a library that Android can use to facilitate code,  or is no one writing code these days.  There are some so called flash players on the net but who can sort the wheat from the chaff?
    I have been involved in computing since the little box with switches then the 2650 Motorola with the Creed teletype.  When I was a young sprout I had a spell with Reuters which I thought not much of TTY machines.
    Anyhow enough of history get some of the keen youngesters (Are there anymore?)
    Regards
    Roy

    Adobe stopped ALL development of Flash for Android last year.
    http://helpx.adobe.com/flash-player/kb/archived-flash-player-versions.html
    There are older versions of Flash Player (for Android) at that link, but there are no guarantees any of them will work.
    See also: http://forums.adobe.com/thread/1061194
    I've read a lot about "Dolphin" for Android https://play.google.com/store/apps/details?id=mobi.mgeek.TunnyBrowser
    I'm not an Android user (no tablet or phone) so I can't make any endorsements that would hold any credibility, but most of the Flash solutions I've read point to Dolphin as the best alternative.
    Check the Android forums: http://androidforums.com/ to see what their "gurus" recommend.

  • Adobe Air and Flash Future on Desktop and Mobile Devices

    Hello,
    iam interested to develop for mobil and desktop devices with AS3 and Flash Professional and i have any question.
    I see also many benefits to develop in flash as in java because javas gui development is based on swing a old java graphics engine.
    Next reason is the plattform like Linux,Windows,IOS.,the Game Development and other stuff.
    With Flash i can create nextgen interactive stunning cool gui interfaces for apps.
    I dont know why flash sucks for the market and devices.
    My question: is as3 and flash save for the future ?
    Make it really sense to learn as3 and Flash ?
    I have read many blogs,threads on adobe and other forums year 2012 Adobe stop flash development,
    and now 2013 google androids kitkat now have removed api features that kills complete flash !!!
    Other comments says Flash is dead for the market!? Many frustradet flash developers he work 10 years and more with flash are crying.
    So what is really the Future for the A3 and Flash Development ?
    Thanks and greetings

    Hi mc_gfx,
    > You think i can get started with flash and air development without worries?
    Software development always involves risk, so you can't really do much without worries.       AIR in particular is a cutting (bleading?) edge technology. Adobe is attempting to solve a difficult problem with limited resources, and the results aren't always ideal.
    If you want to deploy to Android and iOS, and you write two native apps, you face a 100% risk that you'll have to write your app twice. While this may not take twice as long as writing it once, it will come close.
    If you use AIR, you only have to write your app once, but you face other risks.
    Here's the problem. In AIR, Adobe is attempting to create a framework that translates ActionScript into bytecode for two different platforms. This isn't easy. Every time Apple or Google upgrades their operating system Adobe has to try to refine AIR so that it translates everything correctly for the new OS. AIR also has to maintain backward compatability with all previous OSs (is that the plural of OS?). AIR also has to work with many different models of Android and iOS devices. This includes supporting most, though not all, of the many different capabilities that these OSs support. Adobe, wisely, doesn't try to support every new feature immediately. Instead, it picks and chooses which new features it will support, and how soon. But even taking this approach I have the impression that their task is daunting.
    If you research this forum you'll find numerous examples of people complaining about features that don't quite work correctly. For example, I've put ~6 developer months into developing a language learning app, only to find that AIR's MP3 playback support has some limitations which severely impact the playback of voice recordings, which severely degrades the value of my app. I'm hoping that Adobe will fix this bug, but it's been two months now, with no movement. Another serious bug, involving audio recording using the device microphone, took three months to get fixed. During that period I had no idea whether it would get fixed, or whether I'd have to disable an important feature of my app on iOS.
    So, you want "without worries"?  
    Some people are lobbying Adobe to include support for Windows Phone in the AIR framework. IMHO, this is madness. Adobe clearly has limited resources. Let them first focus on making basic features like MP3 playback work properly on the platforms that they already support.
    The same issues probably apply to all the other cross-platform development frameworks - Sencha, Xamarin, etc. They face the same difficult technical challenges. I can't speak to the question of how well they're addressing them, but I'd want research them carefully before I invested a lot of time into developing with them.
    With regards to AIR, here's my advice: Before you start a non-trivial project using AIR, make a list of all the things that your app will do, then see if you can find existing apps created with AIR that do these things. Make sure that the feature works on both Android and iOS. You won't be able to test on every device that you'd like to support, but pick a few and test on them.
    You don't need to worry about your app's logic - ActionScript is great for that - and AIR translates it just fine. But think carefully about your app's 'skin' - all the ways that you want it to interact with the outside world - input and output - and confirm that apps exist that demonstrate that AIR can handle these features. Also think about the app's infrastructure - network interactions - database interactions - etc.
    You'll probably end up with a list of features that you haven't been able to confirm. You can vet these by creating a proof of concept that confirms that AIR will support these needs. Do this before you start developing the full app. Once that's done, pray that everything that works now will continue to work with future OSs and devices. Adobe has a pretty good record on this sort of things, but there aren't any guarantees.
    Don't worry, be happy        ?
    HTH,
    Douglas

  • AS3 and XML, HELP!

    Hi
    I have no idea where to post this, so pls forgive me if im in the wrong place, but I have an Assessment due tomorrow, I'm only 4 weeks knew to AS3 and Flash, and confused as, so pls forgive me if i also look silly asking this question.
    The issue is loading data from an XML file and having it present in a Flash website. Its a book review thing (i've altered the XML and AS3 for posting here so please bare that in mind), so the XML looks a little like this
    <books>
        <book>
            <bookName>The Monsters</bookName>
            <genres>
                <genre>Thriller</genre>
                <genre>Crime</genre>
                <genre>Comedy</genre>
            </genres>
            <description>about the mummies.</description>
            <image>mummies.jpg</image>
            <reviews>
                <review>
                    <date>16/07/2011</date>
                    <name>unnamed</name>
                    <info>
                        <rating>5</rating>
                        <why>blah blah</why>
                        <theGood>it was good...</theGood>
                        <the Bad>it was bad…</theBad>
                    </info>
                </review>
            </reviews>
        </book>
    <books>
    but each Book has multiple reviews, i've just shown you one. Anyway, i need to present this information in 3 dynamic text fields when a book is selected in my ComboBox… after a lot of trouble i got the basics of it. So in the Genre box the genres will display, and in the Description box the description will display, and in the Review box i can get all the information, but only with all the tags. I need it to display without any tags, it would be wonderful if i could figure out how i could put date, name etc in front of that information as well, but I cant even begin to figure that one out.  For the life of me i cannot figure it out. below is the code I have so far:
    //Load XML
    var booksXML:XML = new XML();
    var loader:URLLoader = new URLLoader();
    var request:URLRequest = new URLRequest("gigGuide.xml");
    loader.addEventListener(Event.COMPLETE,loaderOnComplete);
    loader.load(request);
    function loaderOnComplete(event:Event):void
       booksXML = new XML(event.target.data);
       var books:Array = new Array({label:"Select a Book"});
       for each (var book:XML in booksXML.band)
          books.push({label:book.bookName.toString(), data:book.description.toXMLString(),
                     infoLocal:book.genres.genre.toString(), infoDate:book.reviews.review.toString(),
                     infoImage:book.image});
       bandCB.dataProvider = new DataProvider(bands);
    //ComboBox changeable
    bookCB.addEventListener(Event.CHANGE, changeHandler2);
    function changeHandler2(event:Event):void
       genre_txt.text = ComboBox(event.target).selectedItem.infoLocal;
       description_txt.text = ComboBox(event.target).selectedItem.data;
       reviews_txt.text = ComboBox(event.target).selectedItem.infoDate;
       empty_mc.tex = ComboBox(event.target).selectedItem.infoImage; //doesn't work
    any help would be greatly appreciated, and the image doesn't work, i've already faced facts that im not going to get that one to work
    Thank you in advance

    From what I can see you have a few problems. In your loaderOnComplete you set the data provider with 'bands' but create a variable called 'books'.
    Also, you want to be using the XMLList object to parse your data out. It's much simpler.
    Have a look at the following:
    var booksXML:XML;
    function loaderOnComplete(e:Event):void
              booksXML = new XML(e.target.data);
              var books:XMLList = booksXML.book;
              trace(books[0].bookName);
              var bookReviews:XMLList = books[0].reviews.review;
              trace(bookReviews[0].name);
    trace(bookReviews[0].date);
    First we get all the book xml objects in an XML List - the trace traces book number 0's name - The Monsters.
    Next, you can get all the reviews for a book in another XML List. Here we use the first book - book[0] and trace out the review's name and date.
    You can iterate through an XMLList as it has a length() method - (not a length property)
    Also, loading an image for a book would be easy - you just grab the image property of the current book and then use a Loader to load it.
    trace(books[0].image);

  • How do I upload an image using as3 and display it without a server?

    Is it possible to upload an image using as3 and flash player 9 and then display it in a movie clip without server side assistance?
    thanks,
    JB

    Hi,
    Check out the links..
    I hope it will helps u.
    http://labs.findsubstance.com/2008/04/03/as3-upload-encode-images/
    http://flexscript.wordpress.com/2009/01/12/uploading-an-image-into-flash-without-server-si de-script-using-flash-player-10/
    Saransoft

  • Is Vista and Flash CS3 performance issue solved?

    My performances in Flash CS3 are very poor. When I try to
    scroll up-down/left-right I got slideshow. When move the
    framecursor to view the frames I also get slideshow. Searched
    google, do the compatibility settings and the only batter thing I
    get is smoother scrolling of the code. Nothing more. Is this
    solved?
    Im running C2Duo with 4gb 800 ram with Vista x64.
    Should I go back to Flash 8?

    I have an old AlBook G4 1.67 2GB and I actually think CS3
    works great. There is a huge thread about this very issue going on
    at the moment so you might want to take a look there. I never had
    Flash 8, but MX04 also ran just fine on my laptop.
    As far as player performance, it has sped up a lot with AS3
    and Flash plugin 9. (Even if you publish AS2 for Flash 9!). I Don't
    know if there is true parity between the systems, but it is
    certainly faster.
    I've always thought it a good idea to develop on a Mac. If
    you can make your animations look smooth and good playing back in
    the Mac version of the player then you know they will look good
    across the board. I can't tell you how many sites (thankfully fewer
    these days) where I go and everything just crawls and chugs along.
    It is usually due to over high frame rates and excess transparency
    or animated raster images. (And I'm talking about the kind that
    even if it did move smoothly it wouldn't be worth it!)

  • Swf increase size mystery publishing into Flash 8 and Flash CS4

    Hello,
    i discovered recently that a swf build with Flash 8 IDE, published for Flash Player 8 get a different size when published with Flash CS4 IDE.
    You can reproduce that effect with all sort of swf.
    I did a report for each publish (same .fla into Flash 8 IDE and Flash CS4 IDE)
    The result was : all vector graphics, all fonts, all bitmaps, all actionscript code increased
    From test.fla, i did one key frame with :
    - a dynamic TextField with some simple chars in it = "Test Chars",
    - a simple shape with brush tool
    - and one movieclip with an ordinary circle
    Size report from Flash 8 :
    test.swf Rapport sur l'animation
    Image #    Image octets    Total octets    Séquence
          1          14419          14419    Séquence 1 (Image d'exportation des classes AS 2.0)
    Séquence                        Forme octets    Texte octets    ActionScript octets
    Séquence 1                           86           132                     0
    Symbole                       Forme octets    Texte octets    ActionScript octets
    clip_circle                           69             0                     0
    Nom de la police                 octets        Caractères   
    Arial                         14056     !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy z{|}~ˆ˜–—‘’‚“”„†‡•…‰‹›€™
    Size report from Flash CS4 :
    test.swf Rapport sur l'animation
    Image #    Image octets    Total octets    Séquence
          1          18932          18932    Séquence 1 (Image d'exportation des classes AS 2.0)
    Séquence                        Forme octets    Texte octets    ActionScript octets
    Séquence 1                          103           174                     0
    Symbole                       Forme octets    Texte octets    ActionScript octets
    clip_circle                           91             0                     0
    Nom de la police                 octets        Caractères   
    ArialMT                       18467     !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy z{|}~ˆ˜–—‘’‚“”„†‡•…‰‹›€™
    Does somebody knows something about this strange phenomen ?

    Didn't look at the file size of the FLA, just the SWF as I didn't even necessarily resave the CS4 as CS6. No edits were made, I tried it with a simple open and publish just to make sure I wasn't doing anything to change the file and the resulting file was heavier (kb).
    I looked through the size reports and saw that while image compression was better in the CS6 version, the fonts were all heavier than they were in the CS4 version and this put it over the 40kb limit.

  • Print in A4 size paper through AS3 using Flash CS5

    Hi all,
    Is any idea to print a job in A4 paper size by defult through AS3 using Flash CS5?

    Hi Shakeel,
    I am already having customised page format .
    It works fine when I choose Standard Device type EPLQ550
          But EPLQ550 is probably not supporting Arabic text.   It Gives ########
    Thats why I changed to Standard Device type ARSWIN
        Now Arabic text looks ok..... but Printer is not getting initialised after the first check. it skps.
    Pl suggest
    Thanks
    SK

  • FlashBuilder and Flash AS3 question

    I'm heads down working with the FlashBuilder tool which is heavy AS3, and have used Flash CSx for years.
    My question: I'm assuming my AS3 skills that I develop with FlashBuilder will be directly applicable to Flash CSx, correct? I understand I'll need the context of applying my AS3 code to the Flash objects when working in Flash CSx but for the most part will my AS3 skills carry over from FlashBuilder to Flash CS4/5?
    Thanks in advance,
    Rich

    AS3 knowledge and skills has nothing to do with editors/IDE (which CSx, FlashBuilder, etc. are) per se. So, once you get your hands on AS3 - it doesn't matter where you write your code - it will work the same way in the final compiled swf. Nevertheless, there is a learning curve involved while getting to know new development environment as with any new software.

  • What is different  "init size 1 GB ext 1 GB" and "init size 1 GB ext 1 G

    Hi all,
    What is different of performance (and backup) between
    "init size 1 GB ext 1 GB Max 10 GB : 10 Files "
    and
    "init size 2 GB ext 2 GB Max 20 GB : 5 Files "
    in Oracle10 database?
    Thank in advance,
    Kor

    Hi,
    I guess you are concerned with "Bigfile Tablespaces".
    Oracle lets you create bigfile tablespaces. This allows Oracle Database to contain tablespaces made up of single large files rather than numerous smaller ones. This lets Oracle Database utilize the ability of 64-bit systems to create and manage ultralarge files. The consequence of this is that Oracle Database can now scale up to 8 exabytes in size.
    An Oracle database can contain both bigfile and smallfile tablespaces. Tablespaces of different types are indistinguishable in terms of execution of SQL statements that do not explicitly refer to datafiles.
    Bigfile tablespaces can significantly increase the storage capacity of an Oracle database. Smallfile tablespaces can contain up to 1024 files, but bigfile tablespaces contain only one file that can be 1024 times larger than a smallfile tablespace. The total tablespace capacity is the same for smallfile tablespaces and bigfile tablespaces. However, because there is limit of 64K datafiles for each database, a database can contain 1024 times more bigfile tablespaces than smallfile tablespaces, so bigfile tablespaces increase the total database capacity by 3 orders of magnitude. In other words, 8 exabytes is the maximum size of the Oracle database when bigfile tablespaces are used with the maximum block size (32 k).
    Bigfile tablespaces are intended to be used with Automatic Storage Management or other logical volume managers that support dynamically extensible logical volumes and striping or RAID.
    Hope this concludes you.
    Regards
    Vinod

  • ScrollPane in Flash MX and flash Mx 2004 professional

    Summary:
    The refreshPane method works differently in Flash MX and
    Flash MX 2004 Professional
    What went wrong?:
    I have used scrollPane component in Flash mx and loaded some
    content. I changed the content size i.e. width and height
    at runtime and after that called the refreshPane() method to
    resize the scrollPane. It works fine with Flash MX
    But same I tried with Flash Mx 2004 Professional, but it
    doesn't work, since in Flash Mx the refreshPane() method resizes
    the content and in flash Mx 2004 Professional the
    refreshPane() metod reloads the content.
    What should have happened?:
    Can there be a method in flash Mx 2004 Professional which
    just resizes the scrollPane and not reloads the whole content?
    Since if I have to generate a content at runtime and resize
    it also at runtime then just by calling the method refreshPane() in
    flash Mx 2004 Professional, it loads the content what it was
    originally and not the changed one.
    Product version: flash Mx, Flash Mx 2004 Professional
    Product: Flash
    Component: scrollPane
    I would like to request you to help me in the same as early
    as possible.
    Thanks and regards,
    Shreeram Shiralkar

    "vookster" <[email protected]> wrote in
    message
    news:go7cec$obn$[email protected]..
    >
    > I was wondering are files produced from Flash MX
    compatible with
    > Dreamweaver
    > cs4? I have Flash MX and don't want to buy Flash cs4 if
    I don't need
    > to.
    Flash MX creates .swf files. Dreamweaver CS4 creates HTML
    files, and
    has the capability of inserting .swf files in a web page. It
    doesn't
    matter which version of Flash you use to create your .swf
    files; they
    can be inserted into a web page in any version of
    Dreamweaver.
    David Powers
    Adobe Community Expert, Dreamweaver
    http://foundationphp.com

  • Adobe Premiere and Flash

    Forgive me if this is a stupid question, but I know virtually
    nothing about Flash, and have a somewhat limited background in
    Adobe Premiere. I want to create a Flash intro for my Web site, and
    I was figuring I could do it first as a video/audio clip in
    Premiere and then import it into Flash and convert it to a Flash
    movie. I know I could do my idea in Premiere, while I wouldn't be
    able to do it in Flash. If it's not possible, I will have to hire a
    Flash designer to do it for me.
    1) If it's possible, could I do that with Flash MX version
    6.0, or do I need to upgrade?
    2) Should I make the Premiere clip as an AVI file, or would
    you recommend that I save it in a different file format and export
    to Flash?
    3) Would this result in a Flash movie that would have a
    really large file size, or could it be a reasonally sized file? I'm
    thinking of having less than a minute's worth of video and audio
    clips spliced together. There would be maybe three audio clips and
    possibly 30-40 very short video snippets.
    4) Are there any instructions out there on how to do
    something like this?
    Thanks for reading. I'm sorry if it's a stupid
    question.

    also - go to the adobe design center/devnet site or google
    and search for "flash video" - tons of
    articles and resources.
    --> **Adobe Certified Expert**
    --> www.mudbubble.com
    --> www.keyframer.com
    Nickels55 wrote:
    > There arne't stupid questions, just stupid people.
    Really if you asked about
    > Active X then yes it would be stupid. This is a valid
    question...
    >
    > Export your movie from Premiere as a DV-AVI file, it
    will be a huge file. You
    > then need to convert that AVI file to FLV format. If you
    get Flash 8 Pro it
    > comes with a Flash Movie Encoder. You can then import
    the FLV into Flash for
    > displaying it on the web.
    >
    > The step by step techniques are a little advanced. Here
    is a good place to
    > start:
    >
    http://www.gotoandlearn.com
    >
    > Lee has a bunch of tutorials for putting video on the
    web on that site.
    >
    > I would recommend getting Flash 8 pro, as it has been
    was upgraded with video
    > streaming as the main priority. Anything less then Flash
    MX 2004 will not work
    > well at all.
    >

  • Getting Big Headache, What is difference between Flash Lite 3.1 and Flash Player 7

    Hello, I am asking questions about the two similar yet different programs for Pocket PC version only:
    1) Which came first, Flash Lite 3.1 or Flash Player 7?
    2) If I have both in my Pocket PC, will there be product incompatibility?
    3) What is the difference between Flash Lite 3.1 and Flash Player 7.
    4) I have a Flash Lite 3.1 but uninstall information says "Flash Lite 3.1 for Opera Mobile", did you releaase this? Is this an illegal copy? A developer's copy?
    *I don't know exactly where I got it, but I got it from the HTC developer's forum: XDA-developers.com
    *I also use Opera mobile, a web browser for Pocket PC's.
    5) What is difference between Flash Lite 3.1 and Flash Lite 3.1 for Opera? Is the only difference is that Flash Lite Supports everything flash related, while Flash Lite Opera supports only flash in opera?
    Hi, I don't expect all answers, but I hope someone or someone from adobe support can clear some things up for me.

    The program under my "remove programs" list is specifically called "Adobe Flash Lite for Opera". The XDA forums people said along time ago that it was Flash Lite, and kept calling it Flash Lite, and not Flash Player 7.
    Now what about this:
    http://www.adobe.com/products/flashlite/version/
    The table shows the differences between FP 7 SDK, FL 2.1, and FL 3.1. And it's quite obvious that FL 3.1 has way more features than Flash Player 7. What does SDK mean? And why are you telling me FP 7 has more features?
    With this information, can you or anyone else provide any more details and clarification?

  • Trying to reduce file size of my opening page in a flash site

    I'm using the Flash CS4 IDE, and the first page of my site takes a lot longer to load than I want it to.  So I wanted to go through the varied images / symbols / movie clips / sounds and so on to see where all the memory is being chewed up.
    When I go into my library, however, I can see the Name, LInkage, usecound and Type of my elements, but no mention of file size and I can't seem to find any right click menu that lets me add file size to the list of details being displayed.
    Is there a way to make it show file size?  Or some workaround?
    And are there any best practices to reduce file size aside from using symbols for anything that's used more than once and reducing image and sound quality?
    Thanks

    I was actually using the term pretty loosely.  I'm building a Gaia site which works by loading an Index page, then a Nav (navigation) page on top of that, and then lets you load and unload pages as necessary on top of those.
    Since the Nav page never gets unloaded it's a good place to park certain content.  So it's actually my Nav page that's gotten too bloated.  And the coding is handled through a separate Nav.as file (so it's not the first frame of my nav.swf, it's all the varied movie clips I had to incorporate into my Nav.fla
    I'm just looking for a way to identify which MovieClips &  sound files (only have a couple of short ones) and other assets are taking up the most memory so I can see if I can cut those down.
    Also, do unused symbols use up memory or is it only the assets you actually end up adding that count toward file size?
    Thanks

  • I'm getting error messages when I download updates for lightroom and flash for the mac. can't figure out how to trouble shoot.

    I'm getting error messages when I download updates for lightroom and flash for the mac. can't figure out how to trouble shoot.

    It sounds as if your browser and some of your apps are not color-managed.  This is pretty typical.  Even IE9 is only partially color-managed.
    You can expect color-managed and non-color-managed applications to show you different things with the same images.  How different will depend upon how different your monitor color profile is from the image's color profile.
    For web publication and most general use, experts usually advise saving images with the sRGB profile.  If such images, saved through the Save for Web & Devices function, look different to you than you expect, it may be that your input images have previously been saved in another color space.
    You should really try to get your head around color-management by reading more on it.  It can seem baffling and it's difficult to understand without some background.  A quick web search turns up many overviews.  Beware, though, even people writing articles sometimes don't fully understand it.
    -Noel

Maybe you are looking for