A Flash Developer Resource Site

Results 1 to 17 of 17

Thread: is this a mask?

  1. #1
    Senior Member
    Join Date
    Mar 2004
    Location
    Boston, MA
    Posts
    479

    hmmmm not sure why this didnt post?

    take a look at this site (** slight nudity**) - WARNING http://www.federicafontana.it/home.html *the site has been on FK before, so i figured it was ok to post....

    go to the photos section and click a photo. i know how to do the resizing of the image etc, but how do they get the grey box to animate out and then have the loader show up? in most resizing FLA's ive seen, i tried altering one but trying to duplicate the animation on the site in the "border" - mc that is used when resizing an image. but when i do this, the size gets messed up and will not replay for anything else. i know this isnt the correct way but does anyone have an idea how that is done? or has anyone seen threads on this? i have search but everything i have found is resizing the border or image nothing including a mask or this type of animation....

    any help would be greatly appreciated, thanks

    Tracy

  2. #2
    did0bib chero's Avatar
    Join Date
    Jun 2004
    Location
    in a bar, under the sea
    Posts
    751
    My guess is they used attachMovie. I've uploaded a bit simpler version of that (it doesn't animate, just pops up, but has all the other treats like dragging & closing), but it's in MX2004 (this particular won't work in MX), so if you can't check it out, try searching for some tutorials on the subject.
    Attached Files Attached Files

  3. #3
    Senior Member
    Join Date
    Mar 2004
    Location
    Boston, MA
    Posts
    479
    hmm thanks for the FLA, its somewhat wut im looking for but i didnt need the drag or close, jsut curious on how the beginning animation is done...thanks i did try putting an animation before it and it somewhat worked but the picutre comes up before the animation stops... any idea where to fix that?

  4. #4
    did0bib chero's Avatar
    Join Date
    Jun 2004
    Location
    in a bar, under the sea
    Posts
    751
    The animation itself is simple - I've attached this really extremely-ugly-took-me-30-seconds animation, just drag it to the library & check 'replace' - should work, but god it looks ugly.
    It's the preloader that puzzles me - it suggests it's loaded externally (which would be a logical thing to do).
    My guess is it's loaded into the attached mc.
    Unfortunately I haven't the time to experiment today, but if I figure it out, I'll post it here.
    Still, if you figure it before I do, please do the same.
    Attached Files Attached Files

  5. #5
    Senior Member
    Join Date
    Mar 2004
    Location
    Boston, MA
    Posts
    479
    thanks for doing that, im gonna be working all day so i'll play around with it this weekend, im assuming if u made a preloader and when u click a button, it calls the preloader and the preloader is loading the MC?? or am i confused?

  6. #6
    did0bib chero's Avatar
    Join Date
    Jun 2004
    Location
    in a bar, under the sea
    Posts
    751
    No, my bad, I wasn't clear enough - I assume the whole image is placed within a separate .swf with its own preloader, and then loaded into the attached mc.
    So in theory:
    1. attached mc with its opening animation (one piece of the code - the one in my .fla)
    2. imports the .swf at the attached mc's last frame - into the container that's placed (and possibly masked) within the attached mc (another piece of the code, placed within mc's timeline)

    (half an hour later): Haha! It works (the happy dance)

    I'm sending in another truck to replace that old one + one small 'home.swf' so something can be loaded into it. I've placed two pieces of code - one stop() in the truck's timeline & the loading code in the container mc's timeline.

    Thanx for starting this thread, this little trick has some great possibilities.
    Attached Files Attached Files

  7. #7
    Senior Member
    Join Date
    Mar 2004
    Location
    Boston, MA
    Posts
    479
    wow sweet that works great. i tried figuring something else out. instead of loading a sep swf, i tried using an array so if i had 20images, i cant make 20swfs, i looked at another TUT for a photo gallery and i tried using the array that they used and picked it apart. here is the code, its on the first frame

    Code:
    stop();
    // array for your pictures
    picArray = new Array();
    picArray = ["dave1.jpg", "dave2.jpg", "dave3.jpg", "dave4.jpg"];
    
    // amount is nr of buttons
    var amount = 4;
    // loop for your buttons
    for (i=1; i<=amount; i++) {
    	but = this["bt"+i];
    	but.i = i;
    	but.onRelease = function() {
    		_root.a.container.loadPic(picArray[this.i-1]);
    		//added this line
    		setButtons(this.i);
    	};
    }
    // load the first picture in the array, change 0 if you want to start with another picture
    _root.a.container.loadPic(picArray[0]);
    im trying to understand this and i dont think im doing to good. with this script, once the container is loaded, the first pic should load but it doesnt. I tried removing this script and then writing this code and it loads the photo, but i thought using an array would make it easier instead of re-writing btn2, btn3, etc.,

    Code:
    bt1.onRelease = function(){
    	_root.a.container.loadMovie("dave1.jpg");
    }

  8. #8
    did0bib chero's Avatar
    Join Date
    Jun 2004
    Location
    in a bar, under the sea
    Posts
    751
    Hi, could you provide a link to that tute?

    Still, I would strongly suggest using premade swf's because of the possible issues:

    http://www.flashkit.com/board/showth...hreadid=609464

    (first 2 posts & the last)

  9. #9
    Senior Member
    Join Date
    Mar 2004
    Location
    Boston, MA
    Posts
    479
    here is the tut i followed

    http://www.kirupa.com/developer/mx/photogallery.htm

    i read that post on saturday i just dont understand, if i have over 20images, i have to make a swf for each?? i thought there would be a way to use an array or something to load them dynamically??

  10. #10
    did0bib chero's Avatar
    Join Date
    Jun 2004
    Location
    in a bar, under the sea
    Posts
    751
    You don't have to, I only suggested making swf's to take care of the possible quality loss, distortions... (that thread I linked & links in the final post).

    Off course you can use an array - I don't think there's any other (or at least no simpler) way to tell the next/previous buttons what to do in this case.

    But what I don't understand are those buttons - are you trying to generate thumbnails This tute is more suited for that:

    http://www.kirupa.com/web/xml/examples/portfolio.htm

    And if you're not, the previous & next buttons will work fine with that code from Kirupa.

  11. #11
    Senior Member
    Join Date
    Mar 2004
    Location
    Boston, MA
    Posts
    479
    no no, maybe i explained it the wrong way. im not doing the gallery in that tut. im trying to learn all these factors to make the gallery from the federica site. the FLA u came up with is wut i had in mind but instead of using sep swfs, i was asking if using an array is possible. i dont want next/prev buttons the only reason why i used that link/tut is b/c in the beginning AS, it used an array so i was trying to follow that code. maybe it didnt work but now im lost

  12. #12
    did0bib chero's Avatar
    Join Date
    Jun 2004
    Location
    in a bar, under the sea
    Posts
    751
    Ok, I hear you, I'll try to work it out in a couple of days - I'm too wasted right now & tomorrow's my birthday , so I'll get back to it after that.

  13. #13
    Senior Member
    Join Date
    Mar 2004
    Location
    Boston, MA
    Posts
    479
    happy birthday

  14. #14
    did0bib chero's Avatar
    Join Date
    Jun 2004
    Location
    in a bar, under the sea
    Posts
    751
    Thanx.

  15. #15
    I'll Set You On FIRE
    Join Date
    Dec 2004
    Location
    Earth
    Posts
    15

    happy bday

    lookin thru random paosts and saew 2day was ure bday... have a goood one!

    Don't Get Deported,
    Eric
    -=*MY FOOTER IS NOT TOO DAMN BIG*=-
    If a tree falls, and no one is there to hear it, does anyone care?
    My cat could kick your dog's ass!

  16. #16
    did0bib chero's Avatar
    Join Date
    Jun 2004
    Location
    in a bar, under the sea
    Posts
    751
    , and that was about it. Thanx mate!

  17. #17
    did0bib chero's Avatar
    Join Date
    Jun 2004
    Location
    in a bar, under the sea
    Posts
    751
    I've finaly checked that code - the only way that I can see to generate those thumbnails + connect them with the gallery is the way it's explained at Kirupa/portfolio
    On the other hand, if you're going to create the thumbnails by piece, I don't see a point of making an array - looks like a bit more work (though less code) than simply connecting the buttons with pics.
    Still, to connect via an array (continuing on that truck example):
    Code:
    b1_mc.onRelease = function() {
    	addWin (myArray[index]);
    	};
    But I'm sure you've figured that out already

    There's also a favor I'd like to ask - I'll be putting a site for checkup in a few days - I'd really appreciate it to hear your opinion on that.
    So is it ok to pm you when I post it?
    Last edited by chero; 02-02-2005 at 06:16 AM.

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