How to Popup a PDF file from Flash
Popup a PDF file from Flash
Display Adobe PDF file in a new window by clicking a link in a Flash movie.
- Launch Flash Designer and choose “Blank”.
- Copy and paste this icon into Flash Designer document. (Right click on the image and choose “Copy”, in Flash Designer choose “Edit” > “Paste”)

- Choose “Action” > “”OnClick”, check “Get URL” and type the link to your PDF file. The link must be absolute (begin with http://) The PDF file must be available online. Select “_blank” as the target.
Click OK and hit F9 to test the movie. Click the link to open the PDF in a new window. Hit “Alt+F4″ to close preview.
Version with a sprite
Play a sprite when the user moves the mouse over the icon.
- Choose “Rectangle” tool and draw a small rectangle over the icon (the rectangle should be smaller than the icon so we can hide it beneath)
- Choose “Item” > “Sprite Animation” to create a loop
- Select “Zoom Out & Fade” and speed medium.
- Choose “Item” > “Placement Properties”, rename the item to “Rectangle3″ and check “ActionScript Target”.

- Put the rectangle behind with “Edit” > “Send to Back” command.
- Hit F9 to test the movie.
Now it’s time to add some scripts
- Choose “Frame” > “ActionScript” and type:Rectangle3.stop();it will make the sprite not playing initially
- Select the icon image (PDF icon) and choose “Action” > “On Over”. Select “ActionScript” and type:Rectangle3.play();it will start the sprite after the mouse enters the icon
- Select the icon image (PDF icon) and choose “Action” > “On Out”. Select “ActionScript” and type:Rectangle3.gotoAndStop(1);it will rewind the sprite after the mouse is out of the icon
- Hit F9 to test the movie.
Similar Posts:
- MouseOver in ActionScript
- How to Load JPEG or SWF file with loadMovie
- Mouse Over Effect
- How to create context menu for an item in Flash.
- onMouseMove, onMouseDown, onMouseUp in ActionScript.
- How to Read _droptarget property in ActionScript
- Create a flash scroll text
- How to Modify shape color with ActionScript
- Creating a link with getURL
- Mouse Over Effect 2

[...] How to Popup a PDF file from Flash | Flash tutorial | Flash video … [...]