"as" function for converting to a different interactive type