Full screen image gallery

I’ve been playing with this full screen image idea, and for the most part ive got a really good working example.

The problem im running into here is i’d like to preload all those images (say 5) and have a simple navigation to view each of those images.

A good example of what im looking for is www.byhook.com

i found some code that works great(for one image) but i’d like to add images and buttons and load ALL of them BEFORE the first image shows up, then be able to navigate them

stop();
#include "mc_tween2.as"
Stage.scaleMode ="noScale";
Stage.align = "LT";


import flash.display.*;

function loadBitmapSmoothed(url:String, target:MovieClip) {

    var bmc:MovieClip = target.createEmptyMovieClip(
        "bmc",
        target.getNextHighestDepth()
    );
    
    var listener:Object = new Object();
    listener.tmc = target;
    
    listener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
        percent = Math.round((bytesLoaded/bytesTotal)*100);
        pText.text = percent+"%";
        if (bytesLoaded >= bytesTotal) {
    gotoAndStop(2);

} 
    }
    
    listener.onLoadInit = function(mc:MovieClip) {
        mc._visible = false;

        var bitmap:BitmapData = new BitmapData(
               mc._width,
            mc._height,
            true
        );

         this.tmc.attachBitmap(
            bitmap, 
            this.tmc.getNextHighestDepth(),
            "auto", 
            true
        );
         bitmap.draw(mc);        
         
        // set size and position on load
        if(Stage.height/Stage.width > target._height/target._width) {
            img_prop = target._width/target._height;
            target._height = Stage.height;
            target._width = Stage.height*img_prop;
            target._y = (Stage.height/2)-(target._height/2);
            target._x = (Stage.width/2)-(target._width/2);
        } else {
            img_prop = target._height/target._width;
            target._width = Stage.width;
            target._height = Stage.width*img_prop;
            target._y = (Stage.height/2)-(target._height/2);
            target._x = (Stage.width/2)-(target._width/2);
        }
    };
 
    var loader:MovieClipLoader = new MovieClipLoader();
    loader.addListener(listener);
    loader.loadClip(url, bmc);
}


loadBitmapSmoothed("images/bg.jpg", bg_con);



// set size and position on resize

var stage_listener:Object = new Object();

stage_listener.onResize = function():Void {
        if(Stage.height/Stage.width > bg_con._height/bg_con._width) {
            img_prop = bg_con._width/bg_con._height;
            bg_con._height = Stage.height;
            bg_con._width = Stage.height*img_prop;
            bg_con._y = (Stage.height/2)-(bg_con._height/2);
            bg_con._x = (Stage.width/2)-(bg_con._width/2);
        } else {
            img_prop = bg_con._height/bg_con._width;
            bg_con._width = Stage.width;
            bg_con._height = Stage.width*img_prop;
            bg_con._y = (Stage.height/2)-(bg_con._height/2);
            bg_con._x = (Stage.width/2)-(bg_con._width/2);
        }
}

Stage.addListener(stage_listener);

anyone have an idea of how i can do this?

Obviously not…The help in here in sh*thouse!!!..I’ve been waiting 2 days for an answer on a simple Animated speaker button!

I’ve been a contributor here for a couple of years now. Adding what I might be able to about Flash to various people’s questions. I have, through this site, also been fortunate enough to learn much as well as to have made some friends - through the Kirupa site - with whom I now communicate with outside of kirupa.

I have come here at times with my own questions. Some times they get answered and some times they do not.

That all said, pulling some sort of “attitude” here just because you do not get a response to your question is pretty childish to begin with. Second, no one here who is involved on this site “owes” anybody else anything in terms of providing anybody with the answers they need. But certainly coming off with some “attitude” (i.e., “I’ve been waiting 2 days”) would not want to make me dive in with some stranger (whom I probably will never meet) to try to help.

It is not just the comments that were posted on this thread. There have been others who seem to think they are like owed the answers to their questions just because they need the information.

There are plenty of other Flash sites out there. There are plenty of other free tutorials out there. Rather than *****ing about not getting your answers here, look elsewhere. And if that does not work, then learn enough about Flash to try to figure it out for yourself. (In other words, think and play around with it using what you do know about Flash.) And if all of that does not work, maybe your brilliant, creative idea is just not possible in Flash. Flash can do a lot of things. But it is technology and technology is not perfect.

Sorry moderators if I have gotten carried away here. It just seems (not a lot, but just often enough) that a lot of complaining goes on about “why won’t you people answer my questions” type of nonsense.

[QUOTE=DC_Creative;2347592]Obviously not…The help in here in sh*thouse!!!..I’ve been waiting 2 days for an answer on a simple Animated speaker button![/QUOTE]

I realise that “nobody owes” me anything, but I myself actually enjoy providing answers to peoples problems if I can help…As I assumed these type of forums were setup for…For people who are more knowledgeable than the average person, and gain personal satisfaction out of being able to provide solutions to the problems being posted. I also realise that there are other sites and tutorials are out there, and would be willing to try other them (other than flash-kit.com: Information overload!) if you were willing to suggest a couple?

The problem I posted should have a very simple solution, and yes, I also know that it is possible, because I’ve seen the same button on other sites before. I have looked around for answers on this problem, but am yet to find a solution, so therefore am quite frustrated about having to wait almost 4 days nows for any type of usable suggestion/solution.

As far as I’m aware, sites/forums like these usually have “moderators” who provide the majority of answers to questions posted, but unfortunately it appears that this isn’t the case here…I say unfortunately, because yes, although YOU or any other members don’t owe me or other posters anything personally, this site risks losing members to competition because questions are going unanswered…Ultimately, that means less growth, less hits, and less pay-per-click advertising dollars. :slight_smile:

I for one would be happy to help you any way I can with AS3.

I am in sympathy with you on the point of being frustrated. Someone (i.e., any any of us) is in the middle of a project and a roadblock is hit. Then suddenly the scramble is on for “the” answer.

I have seen you give some answers/encouragement here so you know this process from both sides. It is a give and take. But, alas, sometimes the “take” part is not always there if the answer to our question is not always there. (Hence the frustration part.)

But I think the venting of frustrations ultimately does not serve the designer who is doing the venting. There are a lot of folks here whose Flash knowledge is far better than my own. It seems to me that those folks do go out of their way to offer advice/suggestions when they have them to offer. If an answer to a specific question does not come forth - especially from the members who really know their Flash inside and out - then (maybe) - at least on this forum - the answer is not here.

But getting upset about it, through venting (where is the answer to my question???), is (a) probably not going to make the answer come any faster and (b) is a waste of time and energy on the part of the designer doing the venting.

[QUOTE=DC_Creative;2348079]I realise that “nobody owes” me anything, but I myself actually enjoy providing answers to peoples problems if I can help…As I assumed these type of forums were setup for…For people who are more knowledgeable than the average person, and gain personal satisfaction out of being able to provide solutions to the problems being posted. I also realise that there are other sites and tutorials are out there, and would be willing to try other them (other than flash-kit.com: Information overload!) if you were willing to suggest a couple?

The problem I posted should have a very simple solution, and yes, I also know that it is possible, because I’ve seen the same button on other sites before. I have looked around for answers on this problem, but am yet to find a solution, so therefore am quite frustrated about having to wait almost 4 days nows for any type of usable suggestion/solution.

As far as I’m aware, sites/forums like these usually have “moderators” who provide the majority of answers to questions posted, but unfortunately it appears that this isn’t the case here…I say unfortunately, because yes, although YOU or any other members don’t owe me or other posters anything personally, this site risks losing members to competition because questions are going unanswered…Ultimately, that means less growth, less hits, and less pay-per-click advertising dollars. :)[/QUOTE]

can we stay on task here gentlemen :rambo:

ive been messing with this for days, and quite honestly i am just looking to get this “working” with more than one image rather than “perfected”…

loadBitmapSmoothed(“images/bg.jpg”, bg_con);

that is the key i believe. I somehow need to be able to tell it to load whatever image i say at any given point in the timeline. Any thoughts?