Warning: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ..../includes/class_bbcode.php on line 2083
in need of simple pop up jpeg from button
Results 1 to 7 of 7

Thread: in need of simple pop up jpeg from button

  1. #1
    Junior Registered
    Join Date
    Apr 2007
    Posts
    3

    in need of simple pop up jpeg from button

    hello, new here, am finishing a simple website. studio mx
    I want to click on a button and have a jpeg open in another window the size of the jpeg, clean and simple, I don't know the correct verbage to find help on this in the many books that I have, can someone direct me on how to do the actionscript here?

  2. #2
    Is Still Alive! Johnny Gulag's Avatar
    Join Date
    Feb 2006
    Location
    North Texas
    Posts
    242
    Here is a tutorial that shows how to do this: http://visualintensity.com/flash-tut...004/jswindows/

    Hope it helps.

  3. #3
    Junior Registered
    Join Date
    Apr 2007
    Posts
    3
    thank you so much for finding me and giving me a response. I have done what is in the tutorial. where do I put the name of the jpeg? replace the word popup with it? I'm not yet getting a window to open after I edited the html page, I messing it up somewhere

  4. #4
    Is Still Alive! Johnny Gulag's Avatar
    Join Date
    Feb 2006
    Location
    North Texas
    Posts
    242
    The .jpg should be placed on newpage.html using the <img> tag
    Code:
    <img src="" alt="" width="" height="">
    The only thing you should have to alter in that javascript is the width and height of the new window.

  5. #5
    Junior Registered
    Join Date
    Apr 2007
    Posts
    3
    this is what the tutorial said to do:

    <head>
    <script language="javascript" type="text/javascript">
    function popUp() {

    /* begin configuration */
    var url = "newpage.html";
    var w = "1000";
    var h = "374";
    var menu = "no";
    var scroll = "no";
    var tool = "no";
    var location = "no";
    var resize = "no";
    /* end configuration */

    <title>cajohnson</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>


    where does: <img src="" alt="" width="" height=""> go?

  6. #6
    Is Still Alive! Johnny Gulag's Avatar
    Join Date
    Feb 2006
    Location
    North Texas
    Posts
    242
    Hello

    You need to create a .html file called newpage.html" and add the
    HTML Code:
    <img src="" alt="" width="" height="">
    tag to that, use .css to remove the margins and padding from the page by placing the following in the <head></head>:
    Code:
    <style type="text/css">
     body, html, img {margin:0;padding:0}
    </style>
    Then place this JavaScript...
    Code:
    function popUp() {
    
    /* begin configuration */
    var url = "newpage.html"; 
    var w = "500"; 
    var h = "300"; 
    var menu = "no"; 
    var scroll = "no"; 
    var tool = "no"; 
    var location = "no"; 
    var resize = "no";
    /* end configuration */
    
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winprops = 'width='+w+', height='+h+', top='+wint+', left='+winl+', menubar='+menu+', scrollbars='+scroll+', toolbar='+tool+', location='+location+', resizable='+resize+''
    window.open(url, 'popup', winprops);
    }
    ...in a new file save it as popup.js (or whatever you want to name it just use a .js extension) in the same folder as the .swf file. Adjust the width and height to match the image dimensions, then add this in the <head></head> of the page with the Flash embedded on it.
    Code:
    <script src="popup.js" type="text/javascript"></script>
    Hope it helps. If not post again, we will get it sorted

  7. #7
    Is Still Alive! Johnny Gulag's Avatar
    Join Date
    Feb 2006
    Location
    North Texas
    Posts
    242
    Oh, and add this to the button symbol in the flash file:
    Code:
    on (release) {
        getURL("javascript:popUp()");
    }

Similar Threads

  1. Free, simple online button maker?
    By richardevanslee in forum Graphics & Multimedia
    Replies: 11
    Last Post: 05-31-2006, 10:33 AM
  2. Simple Auto-Update Copyright Script
    By Sean in forum Website Programming & Databases
    Replies: 8
    Last Post: 11-24-2005, 08:25 PM
  3. Fairly simple scripting concept confusion
    By Spyder in forum Graphics & Multimedia
    Replies: 2
    Last Post: 11-24-2004, 02:22 AM
  4. Button Maker Software
    By ButtonMan in forum Graphics & Multimedia
    Replies: 0
    Last Post: 10-18-2004, 11:10 PM
  5. Simple noob Flash Question
    By Jaffro in forum Graphics & Multimedia
    Replies: 1
    Last Post: 05-05-2004, 07:08 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •