Advanced Search

Page 6 of 6 FirstFirst ... 456
Results 51 to 55 of 55

Thread: Call lightbox from a flash file with buttons?

  1. #51
    Join Date
    Jul 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default What if the buttons were controled by xml file?

    The menu is controlled by the menu.xml and some of the code appears like this:

    <?xml version="1.0" encoding="utf-8" ?>
    <items>
    <item>
    <text>HOME</text>
    <url>home.swf</url>
    </item>

    <item>
    <text>ABOUT US</text>
    <url>about.swf</url>
    </item>

    can a javascript window/ or any window be called from the xml file executed by the swf file? Or do I need to put the javascript from earlier posts in the fla file, Thanks, Cyn
    Last edited by Cyn; 05-05-2010 at 04:37 PM.

  2. #52
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    inside the FLA will help prevent problems.

    In the future please start a new thread. Reviving old dead threads is confusing to many people just browsing for help.
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #53
    Join Date
    May 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I'm confused. How would you change code for AS 3?
    Last edited by rdub; 05-25-2010 at 06:46 PM.

  4. #54
    Join Date
    Aug 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Medyman View Post
    The link above is incorrect. My apologies.

    The correct URI is http://www.visualbinary.net/files/tu...box/flash/as2/.

    I will update the source files on the page to include all the files, including Lightbox++ as soon as I can.
    Is there a link somewhere to upload the files ?!
    Thanx a lot, I was looking for something to help me for a long time !

  5. #55
    Join Date
    Apr 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    yeah, i did it, but on my Linux server when i run this an error occured that

    "
    Message: 'Lightbox' is undefined
    Line: 24
    Char: 3
    Code: 0
    "
    Please help me out! why it's happend?




    Quote Originally Posted by Medyman View Post
    It's not impossible...it's quite possibe actually.

    In fact, I'm planning to add a lightbox 2.0 and flash interaction on my website (i'm in the process or redesigning it and I keep changing the design every other day).

    I'm going to assume that you have Lightbox setup in your document per the Lightbox documentation.

    1) Insert the following "Delegate" somewhere between the head tags of your document:
    Code:
    <script type="text/javascript">
    function LightboxDelegate(url,caption) {
    var objLink = document.createElement('a');
    objLink.setAttribute('href',url);
    objLink.setAttribute('rel','lightbox');
    objLink.setAttribute('title',caption);
    Lightbox.prototype.start(objLink);
    }
    </script>
    2) Add the correspoding linkage in your actionscript

    Code:
    PictureMC.onRelease = function() {
       getURL("javascript:LightboxDelegate(image1.jpg','caption1')")
    }

    Disclaimer: I'm typing this directly into the forum so there might be sytax errors but it should work. Post back if you have any issues.

    HTH

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
  •