Results 1 to 5 of 5

Thread: open links from swf in same window

  1. #1
    Join Date
    Aug 2006
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question open links from swf in same window

    Hello,

    I have a map with hotspots as an swf file. I used snagit to make this file, this program let me only ad the url but the < _self > code. to open in the same window. Anybody has an idea or is there a script around for a swf file to force the clicked links to open in the same window

    Thanks

  2. #2
    Join Date
    May 2007
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    This is one trivial task, but I don't really get in what editor your working. Maybe if you could upload your *.fla file I could look into it.
    Anyway flash absolutely has a choice availiable for the link target and even the self one


    example of a button function in flash:

    Code:
    on (release) {
    getURL("http://www.exampleurl.com/", "_self");
    }
    hmm I hope this helps, if no, pls provide more info or the file itself

  3. #3
    Join Date
    Aug 2006
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for you answer. I am using SnagIt which only produce a swf. file as output but not a fla. file. I even got in touch with support form SnagIt. there is not option.
    However I was able to decompile the swf file. In the action script producet by SnagIT the links look like
    Code:
    HotspotXML = "<movie width=\"321\" height=\"426\"><hotspot shape=\'rect\' x=\'104\' y=\'36\' width=\'73\' height=\'91\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=40&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'100\' popy=\'131\' popid=\'h1\'></hotspot><hotspot shape=\'rect\' x=\'92\' y=\'132\' width=\'80\' height=\'45\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=23&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'89\' popy=\'97\' popid=\'h2\'></hotspot><hotspot shape=\'rect\' x=\'174\' y=\'82\' width=\'64\' height=\'83\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=22&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'173\' popy=\'47\' popid=\'h3\'></hotspot><hotspot shape=\'rect\' x=\'228\' y=\'112\' width=\'64\' height=\'66\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=24&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'225\' popy=\'62\' popid=\'h4\'></hotspot><hotspot shape=\'rect\' x=\'247\' y=\'58\' width=\'66\' height=\'75\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=21&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'249\' popy=\'8\' popid=\'h5\'></hotspot><hotspot shape=\'rect\' x=\'220\' y=\'171\' width=\'70\' height=\'74\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=25&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'223\' popy=\'151\' popid=\'h6\'></hotspot><hotspot shape=\'rect\' x=\'161\' y=\'165\' width=\'56\' height=\'65\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=42&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'144\' popy=\'145\' popid=\'h7\'></hotspot><hotspot shape=\'rect\' x=\'61\' y=\'157\' width=\'50\' height=\'64\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=26&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'56\' popy=\'122\' popid=\'h8\'></hotspot><hotspot shape=\'rect\' x=\'105\' y=\'219\' width=\'87\' height=\'53\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=98&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'105\' popy=\'199\' popid=\'h9\'></hotspot><hotspot shape=\'rect\' x=\'153\' y=\'243\' width=\'105\' height=\'56\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=30&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'170\' popy=\'208\' popid=\'h10\'></hotspot><hotspot shape=\'rect\' x=\'118\' y=\'288\' width=\'53\' height=\'28\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=35&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'110\' popy=\'268\' popid=\'h11\'></hotspot><hotspot shape=\'rect\' x=\'-1\' y=\'252\' width=\'65\' height=\'46\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=31&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'0\' popy=\'217\' popid=\'h12\'></hotspot><hotspot shape=\'rect\' x=\'53\' y=\'280\' width=\'28\' height=\'35\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=32&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'34\' popy=\'260\' popid=\'h13\'></hotspot><hotspot shape=\'rect\' x=\'204\' y=\'64\' width=\'25\' height=\'17\' href=\'http://www.immoportal.de/regional/hessen/kassel\' color=\'\' alpha=\'0\'></hotspot><hotspot shape=\'rect\' x=\'80\' y=\'275\' width=\'26\' height=\'34\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=33&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'55\' popy=\'240\' popid=\'h14\'></hotspot><hotspot shape=\'rect\' x=\'71\' y=\'303\' width=\'38\' height=\'51\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=36&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'52\' popy=\'268\' popid=\'h15\'></hotspot><hotspot shape=\'rect\' x=\'124\' y=\'285\' width=\'16\' height=\'19\' href=\'http://www.immoportal.de/regional/hessen/offenbach\' color=\'\' alpha=\'0\'></hotspot><hotspot shape=\'rect\' x=\'106\' y=\'269\' width=\'29\' height=\'38\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=34&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'88\' popy=\'234\' popid=\'h16\'></hotspot><hotspot shape=\'rect\' x=\'77\' y=\'357\' width=\'70\' height=\'64\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=39&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'79\' popy=\'322\' popid=\'h17\'></hotspot><hotspot shape=\'rect\' x=\'104\' y=\'319\' width=\'23\' height=\'30\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=37&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'81\' popy=\'299\' popid=\'h18\'></hotspot><hotspot shape=\'rect\' x=\'83\' y=\'234\' width=\'36\' height=\'48\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=29&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'66\' popy=\'199\' popid=\'h19\'></hotspot><hotspot shape=\'rect\' x=\'132\' y=\'342\' width=\'43\' height=\'67\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=41&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'118\' popy=\'307\' popid=\'h20\'></hotspot><hotspot shape=\'rect\' x=\'125\' y=\'315\' width=\'63\' height=\'36\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=38&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'121\' popy=\'265\' popid=\'h21\'></hotspot><hotspot shape=\'rect\' x=\'40\' y=\'207\' width=\'57\' height=\'45\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=28&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'28\' popy=\'172\' popid=\'h22\'></hotspot><hotspot shape=\'rect\' x=\'176\' y=\'12\' width=\'71\' height=\'74\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=19&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'181\' popy=\'90\' popid=\'h23\'></hotspot><hotspot shape=\'rect\' x=\'113\' y=\'181\' width=\'60\' height=\'48\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=27&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'113\' popy=\'146\' popid=\'h24\'></hotspot></movie>";
    function onResize()
    as you can see now I have a href I can edit but I am still not sure how and where this" _self code" needs to go. Would be great somebody can show me it on one example

    Thank you
    Last edited by stefaneh; 09-12-2007 at 08:49 PM. Reason: new findings

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    See what happens if you add target="_self" to the tag.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Aug 2006
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No luck so fare I have tried a few option but no luck. Just in case here is the code of the whole action script.
    Code:
    SnagItWidth = 321;
    SnagItHeight = 426;
    HotspotXML = "<movie width=\"321\" height=\"426\"><hotspot shape=\'rect\' x=\'104\' y=\'36\' width=\'73\' height=\'91\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=40&amp;Itemid=27\"_self"' color=\'\' alpha=\'0\' popx=\'100\' popy=\'131\' popid=\'h1\'></hotspot><hotspot shape=\'rect\' x=\'92\' y=\'132\' width=\'80\' height=\'45\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=23&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'89\' copy=\'97\' popid=\'h2\'></hotspot><hotspot shape=\'rect\' x=\'174\' y=\'82\' width=\'64\' height=\'83\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=22&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'173\' popy=\'47\' popid=\'h3\'></hotspot><hotspot shape=\'rect\' x=\'228\' y=\'112\' width=\'64\' height=\'66\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=24&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'225\' popy=\'62\' popid=\'h4\'></hotspot><hotspot shape=\'rect\' x=\'247\' y=\'58\' width=\'66\' height=\'75\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=21&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'249\' popy=\'8\' popid=\'h5\'></hotspot><hotspot shape=\'rect\' x=\'220\' y=\'171\' width=\'70\' height=\'74\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=25&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'223\' popy=\'151\' popid=\'h6\'></hotspot><hotspot shape=\'rect\' x=\'161\' y=\'165\' width=\'56\' height=\'65\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=42&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'144\' popy=\'145\' popid=\'h7\'></hotspot><hotspot shape=\'rect\' x=\'61\' y=\'157\' width=\'50\' height=\'64\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=26&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'56\' popy=\'122\' popid=\'h8\'></hotspot><hotspot shape=\'rect\' x=\'105\' y=\'219\' width=\'87\' height=\'53\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=98&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'105\' popy=\'199\' popid=\'h9\'></hotspot><hotspot shape=\'rect\' x=\'153\' y=\'243\' width=\'105\' height=\'56\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=30&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'170\' popy=\'208\' popid=\'h10\'></hotspot><hotspot shape=\'rect\' x=\'118\' y=\'288\' width=\'53\' height=\'28\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=35&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'110\' popy=\'268\' popid=\'h11\'></hotspot><hotspot shape=\'rect\' x=\'-1\' y=\'252\' width=\'65\' height=\'46\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=31&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'0\' popy=\'217\' popid=\'h12\'></hotspot><hotspot shape=\'rect\' x=\'53\' y=\'280\' width=\'28\' height=\'35\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=32&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'34\' popy=\'260\' popid=\'h13\'></hotspot><hotspot shape=\'rect\' x=\'204\' y=\'64\' width=\'25\' height=\'17\' href=\'http://www.immoportal.de/regional/hessen/kassel\' color=\'\' alpha=\'0\'></hotspot><hotspot shape=\'rect\' x=\'80\' y=\'275\' width=\'26\' height=\'34\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=33&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'55\' popy=\'240\' popid=\'h14\'></hotspot><hotspot shape=\'rect\' x=\'71\' y=\'303\' width=\'38\' height=\'51\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=36&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'52\' popy=\'268\' popid=\'h15\'></hotspot><hotspot shape=\'rect\' x=\'124\' y=\'285\' width=\'16\' height=\'19\' href=\'http://www.immoportal.de/regional/hessen/offenbach\' color=\'\' alpha=\'0\'></hotspot><hotspot shape=\'rect\' x=\'106\' y=\'269\' width=\'29\' height=\'38\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=34&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'88\' popy=\'234\' popid=\'h16\'></hotspot><hotspot shape=\'rect\' x=\'77\' y=\'357\' width=\'70\' height=\'64\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=39&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'79\' popy=\'322\' popid=\'h17\'></hotspot><hotspot shape=\'rect\' x=\'104\' y=\'319\' width=\'23\' height=\'30\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=37&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'81\' popy=\'299\' popid=\'h18\'></hotspot><hotspot shape=\'rect\' x=\'83\' y=\'234\' width=\'36\' height=\'48\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=29&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'66\' popy=\'199\' popid=\'h19\'></hotspot><hotspot shape=\'rect\' x=\'132\' y=\'342\' width=\'43\' height=\'67\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=41&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'118\' popy=\'307\' popid=\'h20\'></hotspot><hotspot shape=\'rect\' x=\'125\' y=\'315\' width=\'63\' height=\'36\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=38&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'121\' popy=\'265\' popid=\'h21\'></hotspot><hotspot shape=\'rect\' x=\'40\' y=\'207\' width=\'57\' height=\'45\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=28&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'28\' popy=\'172\' popid=\'h22\'></hotspot><hotspot shape=\'rect\' x=\'176\' y=\'12\' width=\'71\' height=\'74\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=19&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'181\' popy=\'90\' popid=\'h23\'></hotspot><hotspot shape=\'rect\' x=\'113\' y=\'181\' width=\'60\' height=\'48\' href=\'http://www.fahrradnotdienst.de/index.php?option=com_sobi2&amp;catid=27&amp;Itemid=27\' color=\'\' alpha=\'0\' popx=\'113\' popy=\'146\' popid=\'h24\'></hotspot></movie>";
    function onResize()
    {
        scrollPane.setSize(Stage.width, Stage.height);
    } // End of the function
    setProperty("", _quality, "BEST");
    var si_xml = new XML(this.HotSpotXML);
    si_xml.ignoreWhite = true;
    var hsArr = new Array();
    var l = si_xml.firstChild.childNodes.length;
    var i = 0;
    while (i < l)
    {
        var item = si_xml.firstChild.childNodes[i].attributes;
        var ll = si_xml.firstChild.childNodes[i].childNodes.length;
        var pointsArr;
        if (ll > 0)
        {
            pointsArr = new Array();
        } // end if
        var j = 0;
        while (j < ll)
        {
            pointsArr[j] = si_xml.firstChild.childNodes[i].childNodes[j].attributes;
            ++j;
        } // end while
        item.points = pointsArr;
        hsArr[i] = item;
        ++i;
    } // end while
    var scrollPane = this.attachMovie("ts_scrollPane", "scrollPane", 1);
    scrollPane.init(hsArr);
    Stage.addListener(this);
    Stage.showMenu = false;
    Stage.scaleMode = "noScale";
    Stage.align = "TL";
    scrollPane.setSize(Stage.width, Stage.height);
    delete hsArr;
    delete si_xml;
    delete this.HotspotXML;
    getURL();
    I attach 2 files. The first (hessen.zip) is the file (swf) which the program SnagIT produce. The second is a fla file I created with a Decomplier.

    I really like to use SnagIT to make the files as I have to lot map like that to do and except the _self problem is great and fast to use.

    Any help would be fantastic


    Attachment 1263
    Attachment 1264

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
  •