I must have misunderstood something there, because I was under the
impression I would get the originally published swf size with the
tgetproperty function. I need the published size not the one it's
currently rendered at.

Is it at all posible to get the published size?


On 5 mei, 02:47, "Aran Rhee" <[email protected]> wrote:
> I think you need to wait until the Flash file actually exists before you try
> to grab properties. Running the width/height code on .onload should work.
>
> I'd suggest also that you get it working in a static page (no XSL etc) to
> ensure you are working with the correct DOM ids etc.
>
> There is a good tut on TGetProperty here (which is the same concepts you are
> using - it always helps to have a fully working example 
> :)http://blog.codefidelity.com/?p=14
>
> Also note
>
> 1) The get property call is going to return you the CUREENT width/height, so
> you will not get the originally published swf size, but whatever it rendered
> on the page through your embedSWF() and CSS values.
>
> 2) according to the tut, it only works when you are testing on a live
> server, not off of a file:// reference (ie testing on your desktop or local
> machine)
>
> Aran
>
>
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On
>
> Behalf Of bzuidgeest
> Sent: Monday, 4 May 2009 10:36 PM
> To: SWFObject
> Subject: getting flash object movie height
>
> In my xsl sheet I have the following code to load the flash object.
> After loading the object (which works and play's), I want to correct
> the height of the flash object. the flash objects are placed by site
> managers in library's so I don't know their properties beforehand and
> to determine them at loading time. So the documentation tells me to
> use TGetProperty on the flash movie object. But doing this does not
> work. The alert line produces nothing. When I put an string in the
> alert line is show an alert. So there's something with the code that
> retrieves the height.
>
> Any ideas.....
>
> // straight from xsl
>
>         <div id="{$name}con" width="156px">
>                         <div id="{$name}">Als u deze tekst ziet heeft u geen
> flash player.</
> div>
>                         </div>
>                         <script type="text/javascript">
>                         var flashvars = {};
>                         var params = {};
>                         params.allowscriptaccess = "always";
>                         params.menu = "false";
>                         params.quality = "low";
>                         var attributes = {};
>                         swfobject.embedSWF("<xsl:value-of
> select="$SafeLinkUrl" />",
>                         "<xsl:value-of select="$name" />", "100%", "100%",
>                         "9.0.0", false, flashvars, params, attributes);
>
>                         alert(document.getElementById("<xsl:value-of
> select="$name" /
> >").TGetProperty("/", 8) + ''); //.TGetProperty("/", 9);
>                         //document.getElementById("<xsl:value-of
> select="$name" /
> >con").style.height  = document.getElementById("<xsl:value-of
> select="$name" />").TGetProperty("/", 9);
>                         </script>
>
> // example output to browser
>
> <div id="moviecon" width="156px">
>                         <div id="movie">Als u deze tekst ziet heeft u geen
> flash player.</
> div>
>                         </div>
>                         <script type="text/javascript">
>                         var flashvars = {};
>                         var params = {};
>                         params.allowscriptaccess = "always";
>                         params.menu = "false";
>                         params.quality = "low";
>                         var attributes = {};
>                         swfobject.embedSWF("/movie.swf",
>                         "<xsl:value-of select="movie" />", "100%", "100%",
>                         "9.0.0", false, flashvars, params, attributes);
>
> alert(document.getElementById("movie").TGetProperty("/", 8) +
> ''); //.TGetProperty("/", 9);
>                         //document.getElementById("moviecon").style.height
> =
> document.getElementById("movie").TGetProperty("/", 9);
>                         </script>- Tekst uit oorspronkelijk bericht niet 
> weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to