Search  
Search Options

ACCORDION V1

LAST UPDATED : 4 July 2008

How to?

(video)

Resize the file!

Very important to read!

Features:

1. Supports unlimited images.
2. Supports html formatted description text.
3. Fully customizable – XML driven.
4. Images loaded from external folder.

Really important! Please read very carefully.

You can add unlimited number of images to the accordion, and customize it to any swf and image size.

The file has been updated and some BIG issues have been addressed. I recommend this FREE update to all that bought the file. I added the features MOST of you requested, and I cleaned the code a bit.

1. The file is contained in a single movieclip, and this way I was able to mask everything to fit nicely on the stage. This means the file can now easily be used in other Flash files as well.

2. The _root has been removed from the code, and instead I’ve change the paths accordingly. This is another improvement so that the file can be used in other Flash files too.

3. I’ve added much more functionality in the XML as well as inside the file, and you can read about it below.

The current version now includes flashvars variables, so that one doesn’t need to edit anything in Flash. Simply edit the html code.

I’ve included an example that doesn’t use flashvars as well, just in case you plan to use the file in another way. The only changes are the way those variables were passed.

There is a new help file included, which I am hoping everybody will read.

Inside index.html you’ll see this line of code:

var so = new SWFObject("Accordion.swf?keepSelected=false&selectedWindow=0&imageWidth=315&imageHeight=300&sWidth=590&sHeight=300", "sotester", "590", "300", "8", "#000000");

You can see I am sending these variables to the swf file:

    keepSelected = false   // if set to true, the selected image will always be displayed. This was a request and I thought I should add it.

    selectedWindow = 0     // you can write any number between 0 and the number of images you set. If you want to keep the selected image but start with no image, set the selected window to -1

    imageWidth = the images width. All images need to be the same width.

    imageHeight = the images height. All images SHOULD be the same height. I would suggest you to keep the images height equal to the swf height.

    sWidth = the width of the swf file. Note you also need to set it were it's sent as a parameter, in the above line of code. The value is 590 and is sent twice. You need to do the same.

    sHeight = the height of the swf file. Note you also need to set it were it’s sent as a parameter, in the above line of code. The value is 300 and is sent twice. You need to do the same. (I'm not refering the the imageHeight variable)

    slideshow = true - this will enable auto slideshow between the slides of the Accordion



The XML file holds more settings you might want to check.

The text can be html formatted.

The only variables that might not mean something from the first time you look at them are:

color="0x000000" alphaColor="0"


This is a layer that goes over the image when you move the mouse on top of the images. The color and the alpha of this layer can be set here.

Questions are welcomed.

You might also be interested in:

Video Players



Galleries



Templates



MP3 players



News readers



XML menus



Slideshows



Creative navigation



Utilities

Posted 9 months ago

Hey my brotha! Good work!

How do I remove all the text titles and html text? Just pure sliding images?

I removed them from the xml and it comes up as “undefined.”

Thanks!

Posted 10 days ago

Sorry. I got it. It was because I deleted all the CDATA tags.

Thanks again for your matchless communication skills! You put up with a lot!

Posted 10 days ago

Wow! Thanks a lot pal. And it’s $10 not $8. I hope you aren’t this rude to all your customers. Remember I did purchase this item from you. Had I noticed you had the horizontal one for sale prior to buying this one then we wouldn’t be having this conversation. But now that I know that you are more concerned with making money than help those who buy your products, I know not to purchase anything else from you.

Posted 10 days ago

@ArtisticLiquid: glad you figured it out. ;)

@ 4mula_D: I believe you are the one that’s rude. I did pointed you to a file that does exactly what you try to accomplish. That should be enough.

Posted 10 days ago

Hi I am having trouble loading this as an SWF on top of another via the loadMovieNum script. Could you please list the necessary steps to make this happen? i know that the gallery depends on certain other files but I am not sure which. Thanks in adavance!

Posted 10 days ago

You need to make sure you pass all variables as I do in the html.

Posted 9 days ago

Hi

I just purchased Accordion v1_Love it!_and need to make a few adjustment to suit me website needs.

The main thing I want to do is have the loaded SWFs, onRollOver, gotoAndPlay(“fadeIn”;);. But I can’t make the connection/path to the mcBut.but or mcHolder or (duplicated).mc. or …

Everywhere I read it says that:

_root.mcHolder.gotoAndPlay("framelabel"); shoulkd work. Can't prove it by me.

I must also say_incase you haven’t guessed_I have only minimal experience with Flash. I wish to add Flash-ness to my site and am just starting down that long ActionScript(); road.

Hope someone can point me in the right direction. I’ve spent hours. ;-(

Thanks

Posted 5 days ago

Hi. Please let me know what you try to achieve. I’m not sure I understand you.

Posted 5 days ago

Hi again,

Simply, I want the RollOver to cause the loaded SWF to gotoAndPlay(2);.

I’m trying to create animated buttons so the viewer can see an animated preview of each section before they click.

Thanks for any help you can give me. And for the unbelievably quick response!

Posted 5 days ago

Eric, if you want to interact with each swf file, you won’t be able to. If it’s a simple animation, than you should be able to play it. Search for the onLoadInit function in Actions.as, and write mc.gotoAndPlay(2).

Posted 4 days ago

Hi bobocel,

This is the first item I’ve purchased on flashden, and I wanted to say thanks for such a clean piece of AS. The end result is very simple and elegant looking.

rupbert

Posted 4 days ago

Welcome to FlashDen Rupbert! I’m glad you enjoy your first purchase. ;)

Posted 4 days ago

bobocel,

Thanks for the tip, but that wasn’t the direction I was going. I wanted something more like this: FlashDen

It’s still not working quite right, but I was trying to have the image on each section fade-in on roll-over and animate (animation loop to be added later). Then fade-out on roll-out. The same for each section.

My Fade-In Code:

mc.mcBut.but.onRollOver = function():Void { mcAll[“mcWindow” + selectedWindow].mcHolder.gotoAndPlay(“fadeIn”;);

“Title 0” works like I want for the fade-in part. But when I add the fade-out each section then stays selected. Also, for some reason you have to roll-over twice to get the other sections to work?

Any help would be appreciated. Thanks!

Posted 4 days ago

@EricStreeter: buddy, you are on your own here, as you’re doing changes in my code which I’m not aware of. I told you my way of doing it, but I can see we talk about different things.

Posted 3 days ago

bobocel,

Don’t worry, I won’t mess up your code and make you and FlashDen look bad. I’ll just make my own menu from scratch. I’ll use yours as a guide because it looks and works so cool. And I think I’ll try using AS3 . That should be a nice project for me to learn ActionScript and Flash CS3 .

Thanks. Love your stuff. I also bought two Utilities of yours.

Posted 3 days ago

@bobocel

I think this was possibly discussed already so forgive me.

If I want to display multiple versions of the Preview.swf using different images, do I have to create duplicates of the deploy folder (containing all of the files) for each one?

Is there a way to modify/publish the Accordion.fla so that it is looking at a different .xml file?

I modified the following line, but when viewing the .swf nothing is displayed:

http://pastie.org/227052

I basically would like to keep all of the images in one folder, and have just a pair of .swf and .xml files for each Accordion gallery.

Thanks in advance, rupbert

Posted 2 days ago

Hi Bobocel, really like the look of your flash code such as this accordian but I’m an asp.net user who’s new to flash. So before i purchase I’d like to know how easy is it to embed the file (?) in an .aspx page? Do you know of any guide or tool that makes using your work in asp.net simple? Any help much appreciated :)

Kind regards,

Chris.

Posted 2 days ago

@rupbert: yes, you can have only one swf, and different XML files for each slide. For that you need to pass a variable instead of the XML , in Actions.as, and then pass the xml in FlashVars, as a variable with the same name. Hope this helps.

@ChrisUK: please check the video file in the description of the file. ;)

Posted 2 days ago

Excuse me can i create the horizontal scroll like http://www.converse.de/ in history section. Can you help me?

Posted 2 days ago

@bobocel

Thanks for the prompt reply.

If I understood you correctly, I change this line:

accordionXml = new XmlParse(“accordion.xml”, HOME .initAccordionItems);

To

accordionXml = new XmlParse(xmlfile, HOME .initAccordionItems);

And then for the html I add this:

var so = new SWFObject(“preview.swf?xmlfile=accordion.xml&keepSelected=t…

Is this what you suggested?

Thanks again, Steven

Posted 1 day ago

@inspiration: please get in touch by email for a quote.

@Steven: yep, that’s correct.

Posted 1 day ago

FILE UPDATED . AUTOMATIC SLIDESHOW ADDED

Posted 1 day ago