# \[Flash8\] Convert a read-only property to a number

**URL:** https://forum.kirupa.com/t/flash8-convert-a-read-only-property-to-a-number/230757
**Category:** flash
**Created:** [June 28, 2007, 6:53pm UTC](https://forum.kirupa.com/t/flash8-convert-a-read-only-property-to-a-number/230757 "2007-06-28T18:53:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![housailorr](https://avatars.discourse-cdn.com/v4/letter/h/439d5e/32.png) [@housailorr](https://forum.kirupa.com/u/housailorr)
#### Post date: [June 28, 2007, 6:53pm UTC](https://forum.kirupa.com/t/flash8-convert-a-read-only-property-to-a-number/230757/1 "2007-06-28T18:53:09Z")

</div>

Hi,

I know I am missing something very basic, but I don’t know what it is so perhaps this forum can put me on course…

I have an FLV player that provides a read-only property called myPlayer.timecode and it displays the time in seconds as a String (xx.xxx). I am trying to assign that value to a variable so I can convert it to a number to use in some calculations, comparisons, etc.

I can assign this property to a dynamic text box and display it on the screen, but I cannot assign it to a variable and have the variable value show correctly on the screen. What do I need to do?

Ex: myPlayer.timecode value is 10.000 and shows as 10.000 in the dynamic text box called myTime1. (I entered the property into the Var: input box).  
Created a String variable called timePlayed, and assigned it to a dynamic text box called myTime2. However, I cannot find a way to assign the property myPlayer.timecode to this variable. I can only display a value of “undefined” or “NaN” in the text box myTime2.

Arrrgh! Help, please.
