Now: Tutorial for Web and Software Design > Flash > Action Script > Flash Content
> Popup a PDF file From Flash [Bookmark it]
Popup a PDF file From Flash

This tutorial was written for the Flash Designer software, which allows you to create flash animations in a much easier way than by using Macromedia Flash. You may get Flash Designer here.

Display Adobe PDF file in a new window by clicking a link in a Flash movie.

1. Launch Flash Designer and choose "Blank".

2. Copy and paste this icon into Flash Designer document. (Right click on the image and choose "Copy", in Flash Designer choose "Edit" > "Paste")

image 1

3. Choose "Item" > "Actions" > ""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.

image 2

4. Click OK and hit F9 to test the movie. Click the link to open the PDF in a new window. Hit Esc to quit the preview.

Download source projects t1047.zip (2 kb)

Version with a sprite

Play a sprite when the user moves the mouse over the icon.

1. 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)

2. Choose "Item" > "Placement Properties", rename the rectangle to "Rectangle3" and check "ActionScript Target".

image 3

3. Choose "Item" > "Sprite Animation" to create a loop

4. Choose "Item" > "Outro" > "Outro Animation" and choose "Zoom", "Fade" and 2 seconds.

image 4

5. Put the rectangle behind with "Edit" > "Send to Back" command.

6. Hit F9 to test the movie.

Now it's time to add some scripts

1. Choose "Frame" > "ActionScript" and type:

Rectangle3.stop();

it will make the sprite not playing initially

2. Select the icon image and choose "Item" > "Actions" > "On Over". Select "ActionScript" and type:

Rectangle3.play();

it will start the sprite after the mouse enters the icon

3. Select the icon image and choose "Item" > "Actions" > "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.

Download source project t1047.zip (5 kb)


[Bookmark][Print] [Close][To Top]
  • Prev Article-Flash:

  • Next Article-Flash:
  • Related Materias
    Generating and Publishing 
    Drop-Down Menu
    Dynamically Attaching Comp
    Drop-down Menu for MX
    Opposeable Mouse Effect
    How to Convert PowerPoint 
    Use Poly-line Tool to Crea
    Read _droptarget Property 
    startDrag and stopDrag in 
    Import and Play MP3 Sounds
    Topics
    Photoshop Tutorial
     

    Special Effect

      3D Effect
      Photoshop Articles
    Programming Tutorial
     

    C/C++ Tutorial

      Visual Basic
      C# Tutorial
    Database Tutorial
     

    MySQL Tutorial

      MS SQL Tutorial
      Oracle Tutorial
    Graphic Design Tutorial
     

    Coreldraw Tutorial

      Illustrator Tutorial
      3D Graphics Articles
    Webmaster Articles
     

    Domain Service

      Web Hosting
      Site Promotion
    Java Tutorial&Articles
     

    Java Servlets

      JavaEE Tutorial
     

    JavaBeans Tutorial

    XML Tutorial&Articles
     

    XML Style Tutorial

      AJAX Tutorial
      XML Mobile
    Flash Tutorial&Articles
     

    Flash Video

      Action Script
      Flash Articles
    OS Tutorial&Articles
     

    Linux Tutorial

      Symbian Tutorial
      MacOS Tutorial