A Flash Developer Resource Site

Results 1 to 17 of 17

Thread: Gallery problem

  1. #1
    Member
    Join Date
    Sep 2010
    Posts
    43

    Gallery problem

    Hi, I have to modify this site...

    http://www.bilgizone.com/poletto/index.html

    They wanted me to make the gallery images full screen.. I have done this but this time the next and other buttons stays behind the big image when you enter the gallery (koleksion and showroom parts). Also the sliding menu stays behind this picture.. How can I fix this that the buttons and menu stays on the picture.. I can send all xml files if requested.

    Need urgent help pls..

  2. #2
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    No, there's nothing wrong with the XML files - the problem resides in the Flash file. What version of Actionscript do you use (AS2 or AS3) - if you're using AS2, please send the actionscript for, when clicking on an Image in the Gallery!
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  3. #3
    Member
    Join Date
    Sep 2010
    Posts
    43
    Its As2

    There are lots af fla files... gallery, index, menu_tree,

    This action layer of gallery.fla

    Actionscript Code:
    import templateGallery.mvcgallery.*;
    import templateGallery.Configuration;
    import templateLoader.mvctemplate.LoaderModel;
    import TextField.StyleSheet;

    ///_quality="BEST"

    //////////////////////////////////////////////////////////////////////////

    function onResize() {
        var model_loader = LoaderModel.getInstance();
        var w = model_loader.widthContent
        var h = model_loader.heightContent;
        m.width = (w) ? w : Stage.width;
        m.height = (h) ? h : Stage.height;
    }

    //////////////////////////////////////////////////////////////////////////////

    var default_date:String = "xml/gallery3.xml";

    //////////////////////////////////////////////////////////////////////////////////
    if (_root == this) {
        Stage.addListener(this);
        var url = (_level0.url_date.length) ? _level0.url_date : default_date
        loadDate(url);
    }
    ///////////////////////////////////////////////////////////////////////////

    function onExitStart(){
        m.__target.__desc._visible=false
        m.Stop()
    }

    //////////////////////////////////////////////////////////////////////////

    function ini(xml_:XML, config_:XML) {
        Configuration.setXml(config_);
       
        if(_root==this){
        __styleSheet = new StyleSheet();
        __styleSheet.onLoad = function(succes) {
            if (succes) {
                ini2(xml_, config_, this);
            }
        };
        __styleSheet.load("css/global_styles.css");
        }else{
            var _css=LoaderModel.getInstance().getCss()
            ini2(xml_,config_,_css)
           
        }
    }

    //////////////////////////////////////////////////////////////////////


    function getModel():GalleryModel{
        return  m;
    }

    //////////////////////////////////////////////////////////////////////

    function ini2(xml_:XML, config_:XML, css_:StyleSheet) {
        Configuration.CSS_STYLE = css_;
        first_ = xml_.firstChild;
        mc = this.createEmptyMovieClip("mc_container", 100);
        mc._x = 0;
        mc._y = 0;
        var gallery:Gallery = new Gallery(mc);
        m = gallery.__model;
        var array = XML_.getArrayObject(first_);
        array.unshift("");
       
        this.onEnterFrame=function(){
            if(m.__configurationFLV.loaded){
        m.setData(array);
        m.loadThumb();
        //m.loadImage(1)
        onResize();
        delete this.onEnterFrame
        }
        }
    }

    ///////////////////////////////////////////////////////////////////////

    function loadConfig(url_) {
        var url = url_;
        Configuration.load(url);
        this.onEnterFrame = function() {
            if (Configuration.loaded) {
                delete this.onEnterFrame;
                ini(date_form, Configuration.__data);
            }
        };
    }

    ///////////////////////////////////////////////////////////////////////////////

    function loadDate(url_) {
        date_form = new XML();
        date_form.ignoreWhite = true;
        date_form.onLoad = function() {
            loadConfig(this.firstChild.attributes.url_config);
        };
        date_form.load(url_);
    }

    ////////////////////////////////////////////////////////////////////////////

    and Happy Birthday Btw
    Last edited by bertman73; 07-15-2011 at 06:44 PM. Reason: happy b-day

  4. #4
    Member
    Join Date
    Sep 2010
    Posts
    43
    any helps pls?

  5. #5
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Thanks

    Sorry, but I don't see any error in that code. Maybe sending the FLA file + the XML file? Only the for the gallery - that would probably help me diagnose the problem. Make sure to save as CS4, if you're using CS5 or 5.5
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  6. #6
    Member
    Join Date
    Sep 2010
    Posts
    43
    They are saved as CS3.
    I uploaded the files here:

    http://www.speedyshare.com/files/294...tto_source.rar

  7. #7
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    WOW, it was a pain in the ass to find the correct actionscript file, which controlled the image size xD

    But, yeah, finally managed to find it, and resize it:

    In your folder, go inside classes/templateGallery/mvcgallery - and open ImageView.as

    In there, find this text:

    Actionscript Code:
    function onResize(){
          var m:GalleryModel = GalleryModel(this.getModel())
         
         
          this._x=m.width/2
          this._y = m.height/2//(m.height-m.__target.__network.getHeightNetwork())/2
         
          this._xscale = this._xscale/1.1;
          this._yscale = this._yscale/1.1;
         
          if (Configuration.POSITION_IMAGE_X != undefined) {
              this._x=Configuration.POSITION_IMAGE_X
          }
         
          if (Configuration.POSITION_IMAGE_Y != undefined) {
              this._y=Configuration.POSITION_IMAGE_Y
          }
         
         
         
          if(this.__visibility==true){
           m.dispatchExitStart()
         }
     }

    Right below where it says:

    this._x=m.width/2
    this._y = m.height/2//(m.height-m.__target.__network.getHeightNetwork())/2


    Type this:

    this._xscale = this._xscale/1.1;
    this._yscale = this._yscale/1.1;


    The image may be too small for your liking, so if you want it abit larger, replace 1.1 with anything from 1.05 to 1.09

    Hope this helps you
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  8. #8
    Member
    Join Date
    Sep 2010
    Posts
    43
    Hi Nig,
    Thanks so much for your help and resizing the pictures,
    but my problem is, when I click on a thumbnail in gallery;
    The big pictures comes full screen, but the next and previus buttons disappear,
    also the menu slider on the left side..



    In this picture you can see that the buttons, menu slider and mp3 player doesnt show up.

    I want to get the buttons and slider and the mp3 player at bottom "on" the picture so the users can click "next" or "previous" buttons without going back to thumbnail screen..

    Thanks

  9. #9
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    I KNEW IT!! swapDepths is the culprit - just wait a few more moments, and I'll locate them all and destroy them :P
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  10. #10
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    FINALLY!! I am really pissed off by this template, lol - did you buy it? Couldn't it be easier to edit these kinds of stuff xD

    After alot of searching for those swapDepths, I failed to find them all - at last, I gave up, and simply added custom swapDepths, and it hopefully worked

    So, open the files below, locate string (press CTRL+F and type the string provided below, and search for it), and add/remove accordingly:

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

    classes\templateLoader\mvctemplate\FooterView.as
    - LOCATE: this.swapDepths(currentDepths)
    - REMOVE: remove the located string

    - LOCATE: function onLoadMenuTree() {
    - ADD AFTER: this.swapDepths(132422543)

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

    classes\templateLoader\mvctempalte\MenuPrimaryView .as
    - LOCATE: private function hide_end() {
    - REMOVE AFTER: this.swapDepths(currentSwapDepth)

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

    classes\templateGallery\mvcgallery\ArrowNextView.a s
    - LOCATE: function onLoad(){
    - ADD AFTER: this.swapDepths(142422543)

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

    classes\templateGallery\mvcgallery\ArrowPrevView.a s
    - LOCATE: function onLoad(){
    - ADD AFTER: this.swapDepths(142422560)

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

    Now, simply Export your SWF file, and VOILA
    Also, just remove those lines I told you to add on my previous post, because this will solve all of your problems

    Hope this helps you - it really was a drag to find this solution - hate so many files :P
    Last edited by Nig 13; 07-17-2011 at 12:19 PM.
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  11. #11
    Member
    Join Date
    Sep 2010
    Posts
    43
    Hello again,

    Can you pls check if I did correct what you said because the big image still stays before everything

    http://www.speedyshare.com/files/294...l_tempload.rar

  12. #12
    Member
    Join Date
    Sep 2010
    Posts
    43
    Currently it looks like this,



    The big image goes to left top off screen (and looks like its small again not fullscreeen), mp3 player is gone to top and painted to red
    (the big picture is the background picture not the big image of a thumbnail)

  13. #13
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Okay, really strange :/

    Maybe you edited some of the files...

    Nonetheless, download my files HERE, and test them. If the problem persists, then ... I don't know :P
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  14. #14
    Member
    Join Date
    Sep 2010
    Posts
    43
    ok the gallery is fine (yippee)
    just the entering site looks a little starange now like its square, lol



    Its strange only at first enter, if you go to a gallery or contact form and then go back to homepage it looks fine...

    You rock!!! by the way

  15. #15
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Oh, GREAT

    I know, it's square at the beginning, but I thought it was only my computer xD

    Glad it worked - will try and fix that problem at the beginning

    Is it your site btw, looks awesome?
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  16. #16
    Member
    Join Date
    Sep 2010
    Posts
    43
    No mate It was a template which the firm bought it

  17. #17
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    No wonder it's so complicated xD

    Still trying to locate the background stretch code :P
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center