What is the correct way to determine the width and height of a captivate movie at runtime in AS3?

I have an entire layout framework built and one of the controls is a GUIControlWrapper with every conceivable option for wrapping and aligning (uniform scale, stretch, stretchwidthonly_aligntop/middle/bottom, stretchheightonly_alignleft/center/right, etc.) non-framework controls (i.e. controls that are display objects, but do not inherit from my layout framework's base GUIControl display class).
Generally this wrapper obtains the object size by calling wrapped_control.getRect( wrapped_control ), to obtain the object's rectangle in its own coordinate system (i.e. its unscaled or original size), and it clips this rectangle to the origin by setting the left and top properties to zero.
The problem I'm encountering only affects captivate movies.  When I used my framework's uniform scale option, there ends up being a gap at the bottom exactly the size of the captivate movie's playbar (which is visible), which indicates to me that the captivate movie's getRect and height properties are overreporting the height.
If I use the captivate movie's "cpMovieWidth" and "cpMovieHeight" properties instead, then the uniform scale results in perfect alignment.  The captivate movies "contentHeight" variable is 38px smaller than "cpMovieHeight", and the playbar height is 40, which is about that 38px difference.
So my question is, why do captivate movies' getRect and height methods report the wrong height for the movie, such that if you actually scaled the clip based on that height to fit the stage size, there is a gap about the size of the playbar?

I'm sure it's because the movie controls are a seperate swf. CP supplies you with the variable that works as you've found.

Similar Messages

  • What is the correct way to determine the install location of Acrobat/Reader to install plugins?

    We were previously using the following registry key to determine where we need to install our Acrobat/Reader plugin.
    HKEY_LOCAL_MACHINE\Software\Adobe\Adobe Acrobat\%d\InstallPath  
    HKEY_LOCAL_MACHINE\Software\Adobe\Acrobat Reader\%d\InstallPath  
    (and append \plugin_ins to that result)
    With Acrobat DC, I no longer see that registry key.
    I was planning on changing our code to instead look here to determine the install paths:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Acrobat.exe\Path
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AcroRd32.exe\Path
    Is this the recommended way of determining where to install plugins? I would rather not have our installation break when they update Acrobat/Reader the next time (for example maybe in the future they decide to change the executable name...)

    Enterprise Guide can be found at http://www.adobe.com/devnet-docs/acrobatetk/tools/AdminGuide/index.html   (came right up on a web search for me).  You want the information about product tracks and installer bit locations.
    SDK releases are usually within 30 days of the product release.

  • What is the correct way to format file paths and names in the structapp file?

    I am trying to create a structured application to export fm files as xml, and probably read the xml back to fm.
    In the structured application file (structapp), I need to specify the locations of the various files (DTD, read/write, template, etc). I would like to place these files on a shared server so others can use the same structapp file (that is, a cop of it). What is the correct way to format the file paths and names? Can folders folder names and file names have spaces in them? I tried the following, for example:
    \\serverName\shareName\folder 1\folder 2\file name.dtd
    I use the same format for the template file and the read/write rules file.
    When I try to save an fm file to xml, FrameMaker says that it cannot read the DTD; however, the resulting xml file appears to be well-formed. The DOCTYPE element in the resulting xml is formatted with forward slashes and spaces replaced with %20.
    I tried using forward slashes and replacing spaces with %20, but then I get an error about reading the read/write rules.
    NOTE: I have another structured application to read xml into fm. This application does not have a DTD file. The template and read/write rules files are specified as above. Except for complaining about a lack of a DTD, the application works fine; it even applies an XSLT in the process. Again, when I DO add a DTD to this latter application, I get the same complaint about not being able to read the DTD.
    I am using fully patched FrameMaker 9 in Windows XP.
    Thanks,
    Van

    Hi Van,
    The XML parser and FrameMaker are not the same thing. The Error Log says which component created which message. The XSL processor is another option that can throw messages. The "\\server\path\some.dtd" syntax in structapps.fm seems to be fine for some tools, as Internet Explorer with XML tools successfully finds the DTD which appears as "//server/path/some.dtd" in the XML. But apparently Xerxes, the XML parser bundled with FrameMaker, does not like this notation.
    If you have a path with a drive letter, "H:\path\some.dtd", FrameMaker turns that into "file:///H:/path/some.dtd". It seems, Xerces would like to see "file:/" in front of absolute paths.
    This is what I have in structapps.fm:
    Template: \\server\path\projecttemplate.fm
    DTD: some.dtd
    Read/write rules: \\server\path\projectrules.txt
    DOCTYPE: …
    Entity locations
      Entity search paths
        1: \\server\path\
    In the structapps.fm I have the DTD without path information. The resulting XML (without XSL postprocessing) then contains just the file name with a relative path back to the book folder (when saving a book as XML). It therefore requires the DTD to be available at this place. I handle this using an event script that fires for NotePreSaveXml and copies the DTD to the folder of the original document.
    As I always use XSL postprocessing and using XSLT1 it is not possible to have the doctype-system as a parameter I have this in my XSL stylesheet:
    <xsl:output doctype-system="some.dtd" />
    For the resulting XML the DTD is expected to be in the same folder as the XML file. This is handled by the same event script as above, it therefore copies the DTD to the source and the target folder.
    Bottom line: If you want/have to use UNC paths, you have to do some programming to work around a FrameMaker bug.
    - Michael

  • Some questions about the correct way to recharge the zen micro batt

    Ok..i don't think this is convered in the FAQs.
    I copied this from the FAQ----At the present moment, the only possible way to avoid the standby loss is removing the battery after you finish listening to music. Gi'ven the wear and tear resulting, this is not really an option. It will help, though, if you prime your battery correctly, recharge it often (topping it up, not only resorting to full recharges),
    Ok...my question--
    ) to preserve battery life span, shouldn't we wait for the player to die off complete, for example when it starts to display "low battery" before we recharge it's Does this post mean that we shouldn't actually wait for the battery to be complete;y drained off before a recharge? Does it mean we should always recharge, say when there's one bar left?
    2) Before doing any music transfer using the computer, should we always make sure the zen micro was fully charged first before the transfer since USB port also serves as a charger. I tried using a completely drained player before music transfer and the player stops charging after 3 hours, which shouldn't be the case because USB always take a longer time to charge (i was told twice as much) and true enough, after deplugging from the USB port, the player starts charging again. Note that this always happen, meaning i can never get a complete 5 hours charge using the USB. What is wrong? And after such charge from USB, i noticed that the battery life the next day is like one third of what it usually last when i charged it through a charger...
    I know this is a long post but can someone tell me the correct way of charging?
    Thanxs!

    immunophilic wrote:
    Ok..i don't think this is convered in the FAQs.
    I copied this from the FAQ----At the present moment, the only possible way to avoid the standby loss is removing the battery after you finish listening to music. Gi'ven the wear and tear resulting, this is not really an option. It will help, though, if you prime your battery correctly, recharge it often (topping it up, not only resorting to full recharges),
    This is from JazzMC's FAQ right? (I added a link to this a day or two ago from the main FAQ post) I hadn't spotted this before and I don't agree with most of this. The wear and tear is minimal, but it's more a case of practicality that removing the battery is a pain. Also priming is not really that important with Lithium Ion, and topping up won't make any difference to the battery drain.
    ) to preserve battery life span, shouldn't we wait for the player to die off complete, for example when it starts to display "low battery" before we recharge it's Does this post mean that we shouldn't actually wait for the battery to be complete;y drained off before a recharge? Does it mean we should always recharge, say when there's one bar left?
    Look in my Nomad Primer, which is essentially a distilled version of the information from BatteryUni'versity.com. Top-up charges prolong the life of a Lithium Ion battery. These are all reference in the FAQ.
    2) Before doing any music transfer using the computer, should we always make sure the zen micro was fully charged first before the transfer since USB port also serves as a charger. I tried using a completely drained player before music transfer and the player stops charging after 3 hours, which shouldn't be the case because USB always take a longer time to charge (i was told twice as much) and true enough, after deplugging from the USB port, the player starts charging again. Note that this always happen, meaning i can never get a complete 5 hours charge using the USB. What is wrong? And after such charge from USB, i noticed that the battery life the next day is like one third of what it usually last when i charged it through a charger...
    Because of the Micro's design there will always be a difference in the amount of power it can pull via USB vs. the drain when copying files to it. USB is slower to charge than the mains adapter, but it should charge fully given time (which could be twice as much as using the mains adapter).
    There is a known issue with the battery draining on the Micro, but you should know this having read JazzMC's page. This is the reason the battery is so low the next day.

  • Is there any way to make column width and height 0 by using formula?

    Eg:
    =If (column = value) then Column width = 0px and height = 0px

    Hi Riaz,
    Instead of kepping column width and height as 0, you can just hide the particular column by using the same function that you mentioned above, (if column = value) in hide..
    You can just right click on the column->hide->hide if->dimension=value.

  • What is the correct way to inform the controller of an exception in MVC?

    Hi this question has been on my mind for a while.
    Imagine you have a an application based on MVC (mode, view controller) design pattern.
    If a non-fatel exception is thrown in the model (e.g. a number format exception) what is the standard way to of informing the controller so that it can do something useful like display an error pop-up or 'gracefully' shut-down the application.
    The two ideas I came up with are:
    -Return -1 or some other variable in the 'catch' of the try/catch.
    Could be messy, every time you called a risky method you would have to wrap it in an if statement.
    -Declare the model as throwing the exception - that way the controller can 'catch' it and do something useful.
    Possibly makes the controller less cohesive.
    -Handle the error directly from the model by having it display a pop-up error message or forward to an error page etc.
    This would make the model less cohesive.
    The controller should still be informed for the exception so it can decide what to do next - if the exception occurred during form validation shouldnt the controller e responsible for redisplaying the form with an error message?
    Is there a 'best practice' of handling exceptions?
    Thanks
    Edited by: vijizzle on May 12, 2010 8:25 PM

    Just have it throw an Exception and let the Controller deal with it.
    Using a pop-up in the Model makes no sense to me. User interface is the View's job. Ultimately, an error pop-up may be presented, but the problem will be passed back to the View before that happens.

  • What is the correct way to restore the catalog after a disk failure?

    I am running the latest Itunes on Vista. The disk failed on my old computer and I have a backup of the catalog file. The music files are on external storage (NAS). I've been searching for instructions on how to restore Itunes.
    The catalog is about 1 week out of sync with the music files because I added some music in between backups of the catalog file and the disk failure.
    In a perfect world, I'd like to restore the catalog with playlists and the album art.
    Are there instructions to accomplish this or do I need to rebuild the catalog from the music files and recode my playlists?

    Firstly I don’t have a NAS drive so what I say applies to and external HD, but it should be similar.
    When you say catalogue file, I guess you mean the iTunes database files – iTunes Library.itl and iTunes Music Library.xml. The xml file is just used to allow other programs access to the library but can be useful because you can rebuild the itl file from it.
    If you want your art work, you need a folder in the iTunes folder called Album Artwork.
    So ideally you would like to be able to recover your old iTunes folder from backup.
    If I understand you correctly, you had all your music on a NAS drive and the library files on your internal drive. Were all the music files/folders located the iTunes Music folder on the NAS drive? I will assume you have, it is much harder to get things working if they were not.
    I guess you now have your NAS drive mapped into your new computer so you can see it as a drive letter.
    So I hope this will work for you…
    With iTunes closed, drag the iTunes folder from it’s current location to your desktop. I think the iTunes folder is in Music in Vista.
    Now copy your backup iTunes folder into Music.
    Now start iTunes and got to Edit>Preferences>Advanced>General and set the location of your iTunes Music folder to your folder on the NAS drive.
    If you can see your music as it was when you did the backup, you can use Add Folder to Library to add the folder containing your music. Don’t worry, this shouldn’t create duplicates but it will add any tracks not currently in your library.
    If you don’t have the iTunes folder, the procedure is similar except that instead of dragging the whole iTunes folder out to the desk top, just drag iTunes Library.itl and replace it with the backup. You won’t get your artwork if you just do this.

  • What is the easiest way to determine the problem?

    okeee
    my machine has begun behaving deviantly
    frequent freezes requiring a forced restart (control--command--power button)
    sometimes upon restarting the machine will get stuck on the gray apple screen.
    i've done a bit of reading and the most likely culprit is the logic board. my question is how do i determine if it is the logic board?
    things i've tried already. . .
    starting up from the tiger install dvd and repairing the hard disk
    repairing permissions on the hard disk
    running tech tool (which came with applecare)
    first time i tried to run tech tool the machine froze during the process and i had to restart. next time it ran just fine and didn't find any problems.
    my applecare warranty expires in february 07!
    i can just imagine taking my machine in to the genius bar and trying to recreate a freeze.
    best course of action?

    i can just imagine taking my machine in to the genius bar and trying to recreate a freeze.
    That's what you need to do if you want to get it repaired. Unless the Genius sees it happen or the repair tech can cause it to happen it won't get repaired.
    When mine had the same problem, pressure along the left edge near the headphone jack would cause it to freeze. Picking it up along the left edge may do it. Experiment until you can duplicate it and then take it to the Genius Bar.
    John

  • What's the correct way to do the update of AddOn

    Hi,
    Let's say I install the Add-On on server and pushed to each client, if I have to change something in AddOn, do I need to unstall this Add-ON and wait till all clients uninstall current AddOn and then i deploy new version to server and each client has to install the new AddOn again? Is this usual way to do the update of AddOn ?
    Thanks!
    Lan

    Hi Gordon,
    Ok, Thanks!
    P.S. But why SAP B1 doesn't check each Add-On ver # in server side when each time it is launched on client side, If the AddOn has new version, then download it and reinstall it. That's more smart!
    Lan

  • Could someone show me the correct way to use the Vector in the code below?

    Would someone mind explaining to me why I am getting a NullPointerException when I run the code below? I initialized the vector in the constructor so it should follow through the whole class right? What would be the right way to do it?
    import java.util.Vector;
    public class AlumniDirectory
        private String faculty;
        private static Vector alumni;
        /** Constructor reads faculty Name and inits new vector **/
        public AlumniDirectory(String facultyIn)
            Vector alumni = new Vector();      
            faculty = facultyIn;      
        /** Method adds a new Alumni to the list **/
        public void addAlumnus(Object o)
            alumni.addElement(o);
        /** Method removes a Alumni from the list **/
        public void removeAlumnus(Object o)
            alumni.removeElement(o);      
        /** Method searches for Alumni by last name and graduation year **/
        public void searchAlumnus(String lastNameIn, int years)
          // Code will go here eventually  
        }

    And probably you want a list of Alumni not a vector of Objects. So try this:
    import java.util.List;
    import java.util.ArrayList;
    public class AlumniDirectory{
        private final String faculty;
        private final List<Alumnus> alumni = new ArrayList<Alumnus>();
        /** Constructor reads faculty Name and inits new vector **/
        public AlumniDirectory(String facultyIn)
            faculty = facultyIn;      
        /** Method adds a new Alumni to the list **/
        public void addAlumnus(Alumnus alumnus)
            alumni.add(alumnus));
        /** Method removes a Alumni from the list **/
        public void removeAlumnus(Alumnus alumnus)
            alumni.remove(alumnus);      
        /** Method searches for Alumni by last name and graduation year **/
        public void searchAlumnus(String lastNameIn, int years)
          // Code will go here eventually  
        }-Puce
    Edited by: Puce on Oct 23, 2007 7:43 PM
    Edited by: Puce on Oct 23, 2007 7:46 PM

  • Sapinst - what is the correct way to startup sapinst

    I am starting install of NW04 on unix. The install manual states that once env paramters are set then do the following:
    cd /SAP_MASTER_DVD/IM2/SAPINST/UNIX/SUN...
    then run ./sapinst
    however run I run it it just waits.....
    I then go back in another session and run startInstGui.sh
    and the sapinst install screen successfully appears?
    Is this the correct way to run the install?
    What is the correct way to run sapinst?
    Thank
    John Ryan

    Figured it out...
    sudo su root not - root
    and it works

  • Correct Way to Obtain The Most Negative Double

    Is this the correct way to obtain the most negative double in Java?
    double v = -Double.MAX_VALUE;As Max positive byte is 127, but Max negative byte is -128, not -127
            byte c = 127;
            byte nc = (byte)(c + 1);
            if (nc > c) {
                System.out.println("+ve");
            else {
                // Come here.
                System.out.println("-ve");
            }However, how about double
    double v =Double.MAX_VALUE + 1;
    Is this makes sense? As, 1 is not the smallest increment unit for double.

    yccheok wrote:
    Is this the correct way to obtain the most negative double in Java?
    double v = -Double.MAX_VALUE;
    Double.MIN_VALUE;
    However, how about double
    double v =Double.MAX_VALUE + 1;
    Is this makes sense? As, 1 is not the smallest increment unit for double.No, 1 is not the smallest unit to increment a double with, the smallest unit of course would be negative infinity. Remember double has a fixed precision, so even if negative infinity existed, it would not be accurately represented by a double.
    Mel

  • I have a macbook air late 2010 and keep getting a warning that my hard drive is full and to delete things so I purchased a external hard drive (1TB) but I'm just not sure what the correct way to transfer and store files to the external drive is. First MAC

    I purchased a macbook air about 5 months ago and lately i keep recieving a warning that the hard drive or disk is full and that I will need to move items to trash in order to free up space on it. I purchased a external hard drive 1 TB but I'm very new to mac and ios and unsure as to how I'm suppose to transfer my files (video, pics, music etc.) from my mac over to the external hard drive in the correct way so I won't end up deleting them permenately or screwing anything up with my mac as far as the applications and programs being able to run. Am I supposed to just copy to the external hard drive and then move to and empty the trash? That's pretty much all I could come up with, but then what if i need or want to access that file again at a later time. Also, I have an i Phone and i pad so with i cloud it automatically syncs all my purcheses and if i delete something from itunes on my mac it deletes from my ipad.
    I'd appreciate any kind of input i think im just a little lost here. I have to say i love my Mac and wouldn't trade it for anything (except maybe a macbook pro w/more memory)... Is there something I'm missing???

    To free up hard drive space the best bet is to move data files that you don't need access to all the time. Likely candidates are music, video, and photos. Things like word processing and spreadsheet files can also be moved but they tend not to be very large and so don't free up much space. The problem with moving the above mentioned files is that iTunes and iPhoto need to know where the files are stored.
    Here's an article explaining how to move the iTunes folder. You can move the iPhoto library using the Finder but there is a slight complication. Start iPhoto, open the Preferences and click on the Advanced tab. The first option is "Copy items to the iPhoto Library". If this option is checked, copy the iPhoto library to your external folder (drag it from the Pictures folder to your external drive) and then delete it from your Picture folder. If this option is not checked, it is a bit more complicated and we'll need to talk a bit.

  • What is the correct way to add styling to drag-and-drop created calendars?

    I have a working instance of a rich client calendar. I generated the view with the required fields (start, stop, provider, ...), put it into the App Module, and dragged it onto a JSF page to create a calendar.
    Next I created an activityScope object in a class called CalendarBean (no inheritance)
    Class CalendarBean()
    private HashMap<Set<String>, InstanceStyles> activityColorMap;
    +..+
    +public CalendarBean() {+
    super();
    activityColorMap = new HashMap<Set<String>, InstanceStyles>();
    HashSet setEd = new HashSet<String>();
    HashSet setLen = new HashSet<String>();
    setEd.add("Work");
    setLen.add("Home");
    activityColorMap.put(setEd, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.ORANGE));
    activityColorMap.put(setLen, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.RED));
    +}+
    +}+
    Next, I linked this up as a backing bean and associated the ActivityStyles of CalendarBean to it:
    +#{backingBeanScope.calendarBean.activityColorMap}+
    I populated some records in the database with properties "Work" and "Ed', but they show default blue.
    As I understand it, I need to do something with the getTags() method of the underlying CalendarActivity class, but I'm not quite sure how to do that.
    Took a stab at creating a class, CalendarActivityBean, that extended CalendarActivity, and pointed all the CalendarActivity references I had to the new class, but it didn't seem to fire (in debug), and I got into trouble, when inserting records, with
    public void calendarActivityListener(CalendarActivityEvent calendarActivityEvent) {
    currActivity = (CalendarActivityBean) calendarActivityEvent.getCalendarActivity();
    being an illegal cast
    What is the correct way to add provider-based styling to drag-and-drop create calendars?
    Ed Schechter

    A colleague of mine was kind enough to solve this:
    The calendar has ActivityStyles property = #{calendarBean.activityStyles}
    CalendarBean looks something like this:
    package com.hub.appointmentscheduler.ui.schedule;
    import java.util.HashMap;
    import java.util.HashSet;
    import java.util.Set;
    import oracle.adf.view.rich.util.CalendarActivityRamp;
    import oracle.adf.view.rich.util.InstanceStyles;
    +public class CalendarBean {+
    private HashMap activityStyles;
    private String dummy;
    +public CalendarBean() {+
    +// Define colors+
    activityStyles = new HashMap<Set<String>, InstanceStyles>();
    HashSet setPending = new HashSet<String>();
    HashSet setArrived = new HashSet<String>();
    HashSet setApproved = new HashSet<String>();
    HashSet setCompleted = new HashSet<String>();
    setApproved.add("APPROVED");
    setPending.add("PENDING");
    setArrived.add("ARRIVED");
    setCompleted.add("COMPLETED");
    activityStyles.put(setApproved, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.GREEN));
    activityStyles.put(setPending, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.ORANGE));
    activityStyles.put(setArrived, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.PLUM));
    activityStyles.put(setCompleted, CalendarActivityRamp.getActivityRamp(CalendarActivityRamp.RampKey.LAVENDAR));
    +}+
    +public void setactivityStyles(HashMap activityStyles) {+
    this.activityStyles = activityStyles;
    +}+
    +public HashMap getactivityStyles() {+
    return activityStyles;
    +}+
    +}+
    Now, go into the Bindings tab on the calendar page, double click the calendar binding, and specify the column you've defined as the calendar's Provider in the Tags dropdown.
    Should show colors.

  • 1.4.2 - What is the correct way to format output in the java.io.PrintStream

    With Java 1.4.2:
    What is the correct way to format output in the java.io.PrintStream?
    The following is incorrect, even though it is still used in the The JavaTM Tutorial at: http://java.sun.com/docs/books/tutorial/essential/
    System.out.formatThis returns "cannot resolve the method 'format'"
    Any detailed suggestions or information is greatly appreciated.

    The following is incorrect, even though it is still
    used in the The JavaTM Tutorial at:
    http://java.sun.com/docs/books/tutorial/essential/
    The whole format thing has been introduced in 1.5. The tutorial also states it's been "updated to 1.5.".
    That's all I've got to say for I don't know how you can format a PrintWriter, let alone a PrintStream, prior to 1.5. I'm not really sure there is any way. Any "legacy way", that is. There almost certainly are third-party API which achieve similar results.

Maybe you are looking for

  • Adobe Exchange Manager stalls after installing update

    http://forums.adobe.com/message/5730540#5730540  I reference this post because my situation is similar.  I wanted to install an extension to DW and I was prompted to update the Exchange Manager, which I did.  The message I got was that the Exchange M

  • Asynchrono​us call of a re-entrant VI hangs

    I am trying to use the Start Asynchronous Call Node to open a re-entrant sub-VI in "fire and forget" mode.  To get the hang of it, I put together the attached test application.  Clicking "Add Channel" in the main VI launches the subVI, passing it a d

  • Vertical scroll bar for the table

    Hi, I have a table which will contain more than 100 rows. First Visible rows will be 10. i want a vertical scroll bar for the table, so that i can see all the rows using vertical scroll bar. While scrolling down, the header row, which contain names o

  • Update a subtype attribute in Oracle 11g

    Hi All, I am trying to update a subtype attribute of an object table, but getting error. If anybody can show me sample of it, I would be thankful. create or replace type supobj as object (a number) not final; create or replace type subobj under supob

  • IP Comment solution (How To Document) - not showing comments in column

    Hi there, I've just implemented the solution drescribed in the How To Paper "How To... Build a Fast and Flexible Comment Solution for BEx Web Applications" and so far, it works quite well, except of one crucial thing: the comments are NOT shown in th