Target the _root timeline with ' if ' statement


I am trying to target the stage of the sub loaded movie from the main timeline but with '** if** ’ statement:

For example:

  1. I am inside swf file called market.swf and the length of the _root timeline is only 10 frames

  2. I am on the frame 1 of the _root stage inside market.swf

  3. I have a movie clip holder,

  4. on this holder i load a another swf file called sales.swf

  5. I am trying to control the _root timeline of the sales.swf from market.swf but depending on the current frame position of the _root stage (market.swf)

for example: if the current frame of my _root (market.swf) is frame 8 then the _root of sales.swf should stop on frame 4

this is really easy task to do, i mean i could easily achieve this by giving an instance name to the holder mc and target that mc with gotoAndStop

but what i really need to do is exactly this but with if statement

please anyone good with actionscript?