Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    May 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Opening new window for graphics

    Okay, I tried making a flash portfolio from a certain tutorial, that uses the loader component, but the only problem is, the loader window where all the graphics go to, once the user clicks a thumbnail stretches, or shrinks the image.

    It would help me more if that once you click the large loader area(main_mc), it would open up its own window for the specific graphics

    Code:
    comp1_btn.contentPath = "hsigAVY.jpg";
    comp2_btn.contentPath = "sigAVY.jpg";
    comp3_btn.contentPath = "haloAVY.jpg";
    comp4_btn.contentPath = "projAVY.jpg";
    comp5_btn.contentPath = "idesignAVY.jpg";
    comp6_btn.contentPath = "restrictions.jpg";
    comp7_btn.contentPath = "jesterAVY.jpg";
    comp8_btn.contentPath = "h2.jpg";
    comp9_btn.contentPath = "explosionAVY.jpg";
    comp10_btn.contentPath = "dieAVY.jpg";
    comp11_btn.contentPath = "bugAVY.jpg";
    function portfolioLoader (image) {
    main_mc.contentPath = image;
    }
    
    comp1_btn.onRelease = function (){
    portfolioLoader("halosig1.jpg");
    }
    comp2_btn.onRelease = function (){
    portfolioLoader("siggy.jpg");
    }
    comp3_btn.onRelease = function (){
    portfolioLoader("halofrosty.jpg");
    }
    comp4_btn.onRelease = function (){
    portfolioLoader("image4.jpg");
    }
    comp5_btn.onRelease = function (){
    portfolioLoader("image5.jpg");
    }
    comp6_btn.onRelease = function (){
    portfolioLoader("image6.jpg");
    }
    comp7_btn.onRelease = function (){
    portfolioLoader("image7.jpg");
    }
    comp8_btn.onRelease = function (){
    portfolioLoader("image8.jpg");
    }
    comp9_btn.onRelease = function (){
    portfolioLoader("image9.jpg");
    }
    comp10_btn.onRelease = function (){
    portfolioLoader("image10.jpg");
    }
    comp11_btn.onRelease = function (){
    portfolioLoader("image11.jpg");
    }

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    You can make a new variable which tracks the currently selected image. Then make another onRelease function for the main_mc which when clicked will use getURL(); to open a new window. You will need to figure out also how to pass that variable in the URL to the linked page in order to display the image in that page, using something like PHP to grab the variable from the URL and select it from the folder.

  • #3
    New to the CF scene
    Join Date
    May 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    And how would I do that?

  • #4
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Do you know any scripting language? I'll show you how to send a variable from Flash using the URL (GET method for PHP). From here you will need something like PHP to make the rest of it.
    Code:
    var currentImage = "hsigAVY.jpg";  // Set the variable globally
    comp1_btn.onRelease = function (){
    portfolioLoader("halosig1.jpg");
    currentImage = "halosig1.jpg"; // Change the variable
    }
    main_mc.onRelease = function (){
    getURL("opennewimage.php?img="+currentImage, "_blank"); // When main_mc is clicked it will open a new window and pass currentImage in URL
    }


  •  

    Posting Permissions

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