Quantcast
Channel: Adobe Community : All Content - Adobe Captivate
Viewing all articles
Browse latest Browse all 30250

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

$
0
0

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?

 

 

CaptivateSizeIssue.png


Viewing all articles
Browse latest Browse all 30250

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>