get page of object in InDesign (CS3)

How do I get the page that a story would start on?

I have a test document with one page that contains two stories that text flow into 3 text frames (for each story, so 6 total text frames).

If I use this code:


tell application "Adobe InDesign CS3"
	tell front document
		
		--set myStory to contents of story id 276
		set storyList to every story
		
		repeat with i from 1 to count of every item of storyList
			set thisStory to item i of storyList
			set thisStoryID to id of thisStory
			set thisStoryContents to properties of story id thisStoryID
			-->get the page
			set myParent to parent of story id thisStoryID
			return class of myParent
			(*if class of myParent is not page then
				repeat until class of myParent is page
					set myParent to parent of myParent
				end repeat
			end if*)
		end repeat
	end tell
end tell


when I run this code the class of myParent is returned as document. I want to get the page # returned. Any help would be appreciated.

I figured it out, get the parent of the text frame, not the story, the parent of the story is the document…