any clues where i can find...

  • Started
  • Last post
  • 25 Responses
  • dddc

    http://www.yangtan.com

    a source code of something that works like that with the -/+ navigation of the images

    that one on the site seems so flawless and smooth

    unfittoprint to the rescue?

  • ********
    0

    looked for it too a while back..
    gave up, and was too lazy to figure it out myself..

  • dddc0

    so lets join our pv-an forces to enforce finding a solution
    ok?

  • ********
    0

    deal!

  • Nematoth0

    check your email dude... I have sent the full source code.. you can wade your way through that..

  • ********
    0

    HEY!! I join forces with him..
    what about me dude..

  • Nematoth0

    oh shit man.. sorry :-)

    mailed to you also....

  • Nematoth0

    I used your email addresses from your profile...

  • dddc0

    he sent me a .txt file only
    and i'm going to paste exactly whats in it
    i have no idea what to do with all this text :(

    -----------------------

    // Action script...

    // [Action in Frame 1]
    function initNavigation()
    {
    navPoints = "Archive"], ["Contact"]];
    menuPointsList = imgSeriesList.concat(navPoints);
    } // End of the function
    function hideAll()
    {
    logo._alpha = 0;
    img._alpha = 0;
    navImg._alpha = 0;
    navOthers._alpha = 0;
    nums._alpha = 0;
    contact._visible = 0;
    } // End of the function
    function placeNavigation()
    {
    this.createEmptyMovieClip("navIm... 10);
    navImg._x = logo._x + 2;
    navImg._y = logo._y + 25;
    navImg._alpha = 0;
    for (i = 0; i < menuPointsList.length; i++)
    {
    navImg.attachMovie("menuPoint", "menuPoint" + i, i);
    navImg["menuPoint" + i].index = i;
    } // end of for
    img._y = yImgPositionRegular = navImg._y + maxCurrentRows * 14 + 20 + 30;
    activeNavArea._height = yImgPositionRegular - 20;
    contact._y = navImg._y + maxCurrentRows * 14 + 20 + 6 + 14;
    } // End of the function
    function placeArchive()
    {
    archiveRowCount = 0;
    this.createEmptyMovieClip("navArchive", 1000);
    navArchive._x = logo._x + 2;
    navArchive._y = navImg._y + maxCurrentRows * 14 + 20 + 6;
    navArchive._alpha = 0;
    for (i = 0; i < archiveSeriesList.length; i++)
    {
    navArchive.attachMovie("menuPointArchive", "menuPoint" + i, i);
    navArchive["menuPoint" + i].index = i;
    } // end of for
    imgFade(navArchive, 1, 100, imgFadeParameter);
    archiveLoaded = 1;
    } // End of the function
    function archiveFadeOut()
    {
    unloadMovie(_root.img);
    imgFade(navArchive, 0, 0, 5, clearArchive);
    } // End of the function
    function contactFadeOut()
    {
    imgFade(contact, 0, 0, 5, clearContact);
    } // End of the function
    function clearContact()
    {
    contactLoaded = 0;
    contact._visible = 0;
    if (activeMenu[0] == "Archive")
    {
    placeArchive();
    }
    else
    {
    loadMovie("current.swf", _root.img);
    } // end if
    } // End of the function
    function clearArchive()
    {
    activeSubMenu = 0;
    archiveLoaded = 0;
    unloadMovie("navArchive");
    img._y = yImgPositionRegular;
    activeNavArea._height = yImgPositionRegular - 20;
    if (activeMenu[0] == "Contact")
    {
    contact._visible = 1;
    imgFade(contact, 1, 100, 5);
    contactLoaded = 1;
    }
    else
    {
    loadMovie("current.swf", _root.img);
    } // end if
    } // End of the function
    function loadContent()
    {
    if (activeMenu[0] == "Archive")
    {
    if (contactLoaded == 1)
    {
    contactFadeOut();
    }
    else
    {
    unloadMovie(_root.img);
    placeArchive();
    } // end if
    }
    else if (activeMenu[0] == "Contact")
    {
    if (archiveLoaded == 1)
    {
    archiveFadeOut();
    }
    else
    {
    unloadMovie(_root.img);
    contact._visible = 1;
    imgFade(contact, 1, 100, 5);
    contactLoaded = 1;
    } // end if
    }
    else if (archiveLoaded == 1)
    {
    archiveFadeOut();
    }
    else if (contactLoaded == 1)
    {
    contactFadeOut();
    }
    else
    {
    loadMovie("current.swf", _root.img);
    } // end if
    } // End of the function
    function loadContentArchive()
    {
    loadMovie("archive.swf", _root.img);
    } // End of the function
    function navFadeIn()
    {
    if (activeSubMenu == 0)
    {
    if (activeMenuNum != undefined && activeMenuNum != menuPointsList.length - 2)
    {
    for (i = 0; i < menuPointsList.length; i++)
    {
    if (i != activeMenuNum)
    {
    imgFade(navImg["menuPoint" + i], 1, 100, imgFadeParameter);
    } // end if
    } // end of for
    imgFade(logo, 1, 100, imgFadeParameter);
    } // end if
    }
    else
    {
    for (i = 0; i < menuPointsList.length; i++)
    {
    if (i != activeMenuNum)
    {
    imgFade(navImg["menuPoint" + i], 1, 100, imgFadeParameter);
    } // end if
    } // end of for
    for (i = 0; i < archiveSeriesList.length; i++)
    {
    if (i != activeSubMenuNum)
    {
    imgFade(navArchive["menuPoint" + i], 1, 100, imgFadeParameter);
    } // end if
    } // end of for
    imgFade(logo, 1, 100, imgFadeParameter);
    } // end if
    } // End of the function
    function navFadeOut()
    {
    if (activeSubMenu == 0)
    {
    if (activeMenuNum != undefined && activeMenuNum != menuPointsList.length - 2)
    {
    for (i = 0; i < menuPointsList.length; i++)
    {
    if (i != activeMenuNum)
    {
    imgFade(navImg["menuPoint" + i], 0, 10, imgFadeParameter);
    } // end if
    } // end of for
    imgFade(logo, 0, 10, imgFadeParameter);
    } // end if
    }
    else
    {
    for (i = 0; i < menuPointsList.length; i++)
    {
    if (i != activeMenuNum)
    {
    imgFade(navImg["menuPoint" + i], 0, 10, imgFadeParameter);
    } // end if
    } // end of for
    for (i = 0; i < archiveSeriesList.length; i++)
    {
    if (i != activeSubMenuNum)
    {
    imgFade(navArchive["menuPoint" + i], 0, 10, imgFadeParameter);
    } // end if
    } // end of for
    imgFade(logo, 0, 10, imgFadeParameter);
    } // end if
    } // End of the function
    function logoIn()
    {
    imgFade(logo, 1, 100, imgFadeParameter, _root.navImgIn);
    } // End of the function
    function navImgIn()
    {
    imgFade(navImg, 1, 100, imgFadeParameter);
    } // End of the function
    function initAll()
    {
    initNavigation();
    this.onEnterFrame = function ()
    {
    if (!startImgLoaded)
    {
    img.createEmptyMovieClip("startImg", 1);
    startImgNum = Math.ceil(Math.random() * 5);
    loadMovie("works/startimages/" + startImgNum + ".jpg", img.startImg);
    img.startImg.onLoad = function ()
    {
    };
    startImgLoaded = 1;
    }
    else if (img.startImg.getBytesLoaded() != 0 && img.startImg.getBytesLoaded() == img.startImg.getBytesTotal())
    {
    placeNavigation();
    imgFade(img, 1, 100, imgFadeParameter, _root.logoIn);
    delete this["onEnterFrame"];
    } // end if
    trace("enter, Alles initialisiert");
    };
    } // End of the function
    stop();
    fscommand("fullscreen", "true");
    fscommand("allowscale", "false");
    var imgSeriesList = [];
    var archiveSeriesList = [];
    var navColorList = [11712439, 3093301, 5791843, 3093301];
    var activeMenu = [0, 0];
    var activeSubMenu = 0;
    var activeMenuNum;
    var activeSubMenuNum;
    var archiveLoaded = 0;
    var secondRowCount = 0;
    var currentRowCount = 0;
    var maxCurrentRows = 2;
    var archiveRowCount = 0;
    var maxArchiveRows = 4;
    var yImgPositionRegular;
    var yImgPositionArchive;
    var fadeInSpeed = 30;
    var imgFadeParameter = 5;
    yangTanVars = new XML();
    yangTanVars.ignoreWhite = true;
    yangTanVars.load("yangTanVars.xml");
    yangTanVars.onLoad = function (success)
    {
    if (success)
    {
    for (i = 0; i < yangTanVars.firstChild.childNodes.length; i++)
    {
    navigationWidth = yangTanVars.firstChild.childNodes[i].attributes.navigationWidth;
    imgToPreload = yangTanVars.firstChild.childNodes[i].attributes.ImagesToPreload;
    } // end of for
    yangTanCurrent.load("current.xml");
    }
    else
    {
    trace("yangTanVars not loaded");
    } // end if
    };
    yangTanCurrent = new XML();
    yangTanCurrent.ignoreWhite = true;
    yangTanCurrent.onLoad = function (success)
    {
    if (success)
    {
    for (i = 0; i < yangTanCurrent.firstChild.childNodes.length; i++)
    {
    _root.imgSeriesList.push([]);
    _root.imgSeriesList[i].push(yangTanCurrent.firstChild.childNodes[i].attributes.name);
    _root.imgSeriesList[i].push(yangTanCurrent.firstChild.childNodes[i].attributes.numberOfImages);
    _root.imgSeriesList[i].push(yangTanCurrent.firstChild.childNodes[i].attributes.folderName);
    if (yangTanCurrent.firstChild.childNodes[i].attributes.additionalInfo != undefined)
    {
    _root.imgSeriesList[i].push(yangTanCurrent.firstChild.childNodes[i].attributes.additionalInfo);
    } // end if
    } // end of for
    contentXML = "loaded";
    yangTanArchive.load("archive.xml");
    }
    else
    {
    trace("XML not loaded");
    } // end if
    };
    yangTanArchive = new XML();
    yangTanArchive.ignoreWhite = true;
    yangTanArchive.onLoad = function ()
    {
    for (i = 0; i < yangTanArchive.firstChild.childNodes.length; i++)
    {
    _root.archiveSeriesList.push([]);
    _root.archiveSeriesList[i].push(yangTanArchive.firstChild.childNodes[i].attributes.name);
    _root.archiveSeriesList[i].push(yangTanArchive.firstChild.childNodes[i].attributes.numberOfImages);
    _root.archiveSeriesList[i].push(yangTanArchive.firstChild.childNodes[i].attributes.folderName);
    if (yangTanArchive.firstChild.childNodes[i].attributes.additionalInfo != undefined)
    {
    _root.archiveSeriesList[i].push(yangTanArchive.firstChild.childNodes[i].attributes.additionalInfo);
    } // end if
    } // end of for
    archiveXML = "loaded";
    initAll();
    };
    activeNavArea.onMouseMove = function ()
    {
    if (this.hitTest(_xmouse, _ymouse, 0))
    {
    if (navVisible != 1)
    {
    navFadeIn();
    navVisible = 1;
    } // end if
    }
    else if (navVisible != 0)
    {
    navFadeOut();
    navVisible = 0;
    } // end if
    };
    hideAll();

    MenuClass = function ()
    {
    };
    Object.registerClass("menuPoint", MenuClass);
    MenuClass.prototype = new MovieClip();
    MenuClass.prototype.onLoad = function ()
    {
    this.txt.autoSize = "left";
    this.txt.text = this.indexName = this.mc_btn.btn.indexName = _root.menuPointsList[this.index][0];
    this.txt.textColor = _root.navColorList[0];
    this.mc_btn.btn.index = this.index;
    this.mc_btn._width = this.txt.textWidth;
    this.mc_btn.btn.onRollOver = function ()
    {
    this._parent._parent.txt.textColor = _root.navColorList[1];
    };
    this.mc_btn.btn.onRollOut = function ()
    {
    if (_root.activeMenu[0] != this.indexName)
    {
    this._parent._parent.txt.textColor = _root.navColorList[0];
    } // end if
    };
    this.mc_btn.btn.onPress = function ()
    {
    this._parent._parent.txt.textColor = _root.navColorList[2];
    };
    this.mc_btn.btn.onRelease = function ()
    {
    for (i = 0; i < _root.menuPointsList.length; i++)
    {
    _root.navImg["menuPoint" + i].mc_btn.btn._visible = 1;
    _root.navImg["menuPoint" + i].txt.textColor = _root.navColorList[0];
    } // end of for
    this._parent._parent.txt.textColor = _root.navColorList[3];
    _root.activeMenu = _root.menuPointsList[this.index];
    _root.activeMenuNum = this.index;
    this._visible = 0;
    loadContent();
    };
    this.mc_btn.btn.onReleaseOutside = function ()
    {
    this._parent._parent.txt.textColor = _root.navColorList[0];
    };
    if (this.index != 0)
    {
    if (this.index < _root.menuPointsList.length - 2)
    {
    if (currentRowCount < maxCurrentRows)
    {
    if (this._parent["menuPoint" + (this.index - 1)]._x + this._parent["menuPoint" + (this.index - 1)]._width + this._width < navigationWidth)
    {
    this._y = 14 * currentRowCount;
    this._x = this._parent["menuPoint" + (this.index - 1)]._x + this._parent["menuPoint" + (this.index - 1)]._width;
    }
    else
    {
    currentRowCount++;
    if (currentRowCount < maxCurrentRows)
    {
    this._y = 14 * currentRowCount;
    }
    else
    {
    unloadMovie(this);
    } // end if
    } // end if
    }
    else
    {
    trace("The " + this.index + ". current Menupoint of the " + maxArchiveRows + ". current row doesn\'t fit anymore!");
    unloadMovie(this);
    } // end if
    }
    else if (this.index == _root.menuPointsList.length - 2)
    {
    this._y = (maxCurrentRows - 1) * 14 + 20;
    }
    else
    {
    this._y = (maxCurrentRows - 1) * 14 + 20;
    this._x = this._parent["menuPoint" + (this.index - 1)]._x + this._parent["menuPoint" + (this.index - 1)]._width;
    } // end if
    } // end if
    };

    ArchiveClass = function ()
    {
    };
    Object.registerClass("menuPointArchive", ArchiveClass);
    ArchiveClass.prototype = new MovieClip();
    ArchiveClass.prototype.onLoad = function ()
    {
    this.txt.autoSize = "left";
    this.txt.text = this.indexName = this.mc_btn.btn.indexName = _root.archiveSeriesList[this.index][0];
    this.txt.textColor = _root.navColorList[0];
    this.mc_btn.btn.index = this.index;
    this.mc_btn._width = this.txt.textWidth;
    this.mc_btn.btn.onRollOver = function ()
    {
    this._parent._parent.txt.textColor = _root.navColorList[1];
    };
    this.mc_btn.btn.onRollOut = function ()
    {
    if (_root.activeSubMenu[0] != this.indexName)
    {
    this._parent._parent.txt.textColor = _root.navColorList[0];
    } // end if
    };
    this.mc_btn.btn.onPress = function ()
    {
    this._parent._parent.txt.textColor = _root.navColorList[2];
    };
    this.mc_btn.btn.onRelease = function ()
    {
    for (i = 0; i < _root.archiveSeriesList.length; i++)
    {
    _root.navArchive["menuPoint" + i].mc_btn.btn._visible = 1;
    _root.navArchive["menuPoint" + i].txt.textColor = _root.navColorList[0];
    } // end of for
    this._parent._parent.txt.textColor = _root.navColorList[3];
    _root.activeSubMenu = _root.archiveSeriesList[this.index];
    _root.activeSubMenuNum = this.index;
    this._visible = 0;
    loadContentArchive();
    };
    this.mc_btn.btn.onReleaseOutside = function ()
    {
    this._parent._parent.txt.textColor = _root.navColorList[0];
    };
    if (this.index != 0)
    {
    if (this.index < _root.archiveSeriesList.length)
    {
    if (archiveRowCount < maxArchiveRows)
    {
    if (this._parent["menuPoint" + (this.index - 1)]._x + this._parent["menuPoint" + (this.index - 1)]._width + this._width < navigationWidth)
    {
    this._y = 14 * archiveRowCount;
    this._x = this._parent["menuPoint" + (this.index - 1)]._x + this._parent["menuPoint" + (this.index - 1)]._width;
    }
    else
    {
    archiveRowCount++;
    if (archiveRowCount < maxArchiveRows)
    {
    this._y = 14 * archiveRowCount;
    }
    else
    {
    unloadMovie(this);
    } // end if
    } // end if
    }
    else
    {
    archiveDeleteCounter = this.index;
    trace("The " + archiveDeleteCounter + ". archive Menupoint of the " + maxArchiveRows + ". archive row doesn\'t fit anymore!");
    unloadMovie(this);
    } // end if
    } // end if
    img._y = yImgPositionArchive = navArchive._y + (archiveRowCount == 0 ? (1) : (archiveRowCount + 1)) * 14 + 30;
    activeNavArea._height = yImgPositionArchive - 20;
    } // end if
    };

    function imgFade(clip, fadeIn, maxMin, zunahme, doFunction)
    {
    if (fadeIn)
    {
    clip.onEnterFrame = function ()
    {
    if (this._alpha < maxMin)
    {
    this._alpha = this._alpha + zunahme;
    }
    else
    {
    this._alpha = maxMin;
    delete this["onEnterFrame"];
    doFunction();
    } // end if
    };
    }
    else
    {
    clip.onEnterFrame = function ()
    {
    if (this._alpha > maxMin)
    {
    this._alpha = this._alpha - zunahme;
    }
    else
    {
    this._alpha = maxMin;
    delete this["onEnterFrame"];
    doFunction();
    } // end if
    };
    } // end if
    } // End of the function

  • dddc0

    but thank you of course.

    what exactly did you send me and how?

  • ********
    0

    ehh.. that code makes sense..

    (thank Nematoth)

  • Nematoth0

    I just sent you the main movie actionsscript from the swf file..

    Using a cunning little app called Sothink swfDecompiler MX 2005

    Very handy app...
    http://www.sothink.com/flashdeco…

    And only $79.99...

  • dddc0

    so you could build everything on that site with that actionscript alone like that in text?

  • ********
    0

    *SMACK

    that's so rude to do..
    thanks again by the way :)

  • Nematoth0

    dude.. anything anywhere in the public domain is there to be copied if you want to.. I don't think its rude.. It's not like you are gonna copy the site. . you're just gonna look through the actionscript and apply to your design ain't ya? That's wha I think anyways.. and I'm sticking by it.. :P

    And no.. ddd you can't just stick the AS code and everything will work.. you've got to pick out the bits you need and then use that in your site.. now that would be blatant copying if you were to do that! ;-)

  • ********
    0

    just playing around Nema..

  • Nematoth0

    nae worries pal..

    That slap was kinda sore tho..

    ;-)

  • JamesEngage0

    If you need help with that you need help full stop :)

    And if you're only taking elements of it, but not copying it, would be interested in seeing the finished results... as there is not a great deal to copy in the first place. Other than the whole essence of the site.

  • normal0

    and besides, you will inevitably learn something by trying to implement that code. I recommend perhaps picking up an actionscript book to go with it though. It's not a horribly difficult one to deconstruct either.

    Good luck.

  • unfittoprint0

    don't use decompilers.

    that's stealing.

  • fate0

    No wonder Flash jobs are in such high demand. Too many people that don't know what they are doing.