Added onSetFrame event