I am actually making a document viewer using Flash CS3 and Actionscript 3. I am having trouble actually being able to control the document, which is an external .swf. I have the document loaded into the scrollpane, but am unable to stop the swf or do anything to it. How would I access the scrollpane and use functions such as gotoAndStop(), stop(), etc?![]()
The SWF:
The external swf file that is being loaded into the document viewer was a .pdf file that was converted to swf. In short, it is actually a sequence of images of each page. Each page of the document is one frame and I would like to be able to control which frame is viewed at any one time.
My current Code:
This is what I have so far:
Code:import fl.containers.ScrollPane; var sp:ScrollPane = new ScrollPane(); sp.move(0,30); sp.setSize(500, 350); sp.source = "mydocument.swf"; addChild(sp);
I have tried controlling the .swf file by using the following command, but that doesn't seem to be the correct way to do it.
Code:sp.content.gotoAndStop(1);
I also tried loading the .swf into a movie clip and then controlling the movieclip, but that did not work either.
Thank you so much for your help!![]()


Reply With Quote