Photo gallery in as3
I'm making photo gallery where photos will be loaded from external xml file but i have problem. I want to add an effect when photo is changing like on this site: http://www.studiomelon.pl/index.html#/1/ Could somebody help me with that? I am noob in flash so please explain it as clear as you can. Thanks.
I was sesrching for that for a long time before i created this tread. There is many tutorials and exaple files for page flip or page turn but i cant find good one. Many of them was coded in as1 or as2 other using php and java script so its difficult to understant. I just want one simple solution for that. It cant be so hard to create something like that. Could you help me to find some good and simple tutorial in as3?
Similar Messages
-
Adding Updating Photo gallery in AS3?
I am developing a IOS App in Flash cs5.I want to add a Photo gallery tab in the App.Which show below..need just like tat.
http://i55.tinypic.com/1zzgcpk.jpg
It must be able to update the picture from an website RSS link or an Picasa public album link
Once a picture is clicked it must enlarge it self.
May a link within the image to set is as wallpaper or share in facebook(may be NOT so needed... would be good if so)
Pls help me outI was sesrching for that for a long time before i created this tread. There is many tutorials and exaple files for page flip or page turn but i cant find good one. Many of them was coded in as1 or as2 other using php and java script so its difficult to understant. I just want one simple solution for that. It cant be so hard to create something like that. Could you help me to find some good and simple tutorial in as3?
-
Hi,
I am creating an iPad app using AS3. The app contains three sections.
One of those sections (chocolate sources)contains Dynamic Photo Gallery using XML. The photos, thumbnails, and text in this section are loaded from XML.
I faced may issue when I tried to run this app:
The gallery photos didn't show up
The thumbnails (buttons to navigate the photo gallery) didn't show up at all. (The thumbnails should show up under the photo gallery box.)
The text doesn't show up (the text should be in every photo as describtion)
I want to include Swipe in the photo gallery, how can I do that?
When I click on "Chocolate Sources" button, the photo gallery appears in every section, here are print screens describe what I mean:
The photo gallery covers the home screen too.
Here is my XML:
<?xml version="1.0" encoding="utf-8"?>
<sources>
<section>
<details>
Cocoa tree exists in the tropics area, such as Central and South America.
</details>
<image>
<url>coca1.jpg</url>
</image>
</section>
<section>
<details>
Cocoa is supplied in many countries such as Indonesia, Ghana, Brazil, Ecuador and Cameroon.
</details>
<image>
<url>coca2.jpg</url>
</image>
</section>
<section>
<details>
Dark chocolate helps to relax and reduce the stress and blood pressure because it has antioxidants elements, which helps in vasodilatory process.
</details>
<image>
<url>coca3.jpg</url>
</image>
</section>
<section>
<details>
Chocolate provides energy and hyperactive sometimes because it contains high level of caffeine and sugar.
</details>
<image>
<url>coca4.jpg</url>
</image>
</section>
<section>
<details>
Chocolate could be mixed with many different flavors, such as mint, strawberry, orange, banana, vanilla, hazelnut, almond, coconut, and etc.
</details>
<image>
<url>coca5.jpg</url>
</image>
</section>
<section>
<details>
Chocolate is expressing of well hospitality and good time due to its lovely taste.
</details>
<image>
<url>coca6.jpg</url>
</image>
</section>
</sources>
And here is my Action Script for "Chocolate Sources" section:
stop();
function Choco1(evt:MouseEvent): void {
gotoAndStop('16');
choco_btn.addEventListener(MouseEvent.CLICK,Choco1);
function Souc1 (evt:MouseEvent): void {
gotoAndStop ('31');
souc_btn.addEventListener(MouseEvent.CLICK,Souc1);
function ShopIn1 (evt:MouseEvent):void {
gotoAndStop('46');
shops_btn.addEventListener(MouseEvent.CLICK,ShopIn1);
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.events.Event;
import flash.display.MovieClip;
import flash.display.Loader;
import fl.motion.MotionEvent;
import flash.events.MouseEvent;
import flash.sampler.NewObjectSample;
import flash.text.TextFormat;
var xmlLoader: URLLoader = new URLLoader (new URLRequest("sources.xml"));
xmlLoader.addEventListener(Event.COMPLETE, finishedXmlLoader);
var xmlFile:XML;
var xextend:int = 10;
var gal:galary = new galary ();
gal.x = 85;
gal.y = 165;
addChild(gal);
var txfe: TextField = new TextField ();
txfe.x = 25;
txfe.y = 45;
var tformat:TextFormat = new TextFormat ();
tformat.bold = true;
tformat.color = 0xFFFFFF;
tformat.size = "18";
tformat.font = "Arial";
txfe.defaultTextFormat = tformat;
addChild(txfe);
function finishedXmlLoader (e:Event): void{
xmlFile = new XML (xmlLoader.data);
var leng:int = xmlFile.image.length();
txfe.text = xmlFile.image.details[0];
for (var i:int = 0;i<leng;i++){
var b:thumbs = new thumbs ();
b.x = xextend;
b.y = 480;
b.buttonMode = true;
b.details = (i+1).toString();
addChild(b);
b.addEventListener(MouseEvent.MOUSE_OVER, theMosover);
b.addEventListener(MouseEvent.MOUSE_OUT, theMosout);
b.addEventListener(MouseEvent.CLICK, onMosClick);
var bloader:Loader = new Loader();
bloader.load(new URLRequest("thumbs/" + (i+1) + ".jpg"));
b.addChild(bloader);
xextend += b.width + 50;
var loader:Loader = new Loader ();
loader.load(new URLRequest ("pictures/coca1.jpg"));
gal.addChild(loader);
function theMosover(m:MotionEvent):void{
m.currentTarget.alpha = 0.5;
function theMosout (m:MouseEvent):void{
m.currentTarget.alpha = 1.0;
function onMosClick(m:MouseEvent):void{
var loader:Loader = new Loader();
loader.load(new URLRequest("pictures/" + m.currentTarget.details + ".jpg"));
gal.addChild(loader);
txfe.text = xmlFile.image.details[int(m.currentTarget.details) -1];
I need an urgent help to fix the errors and make this section work well.
thanks.try:
txfe.text = xmlFile.section[int(m.currentTarget.details) -1].details;
instead of
txfe.text = xmlFile.image.[int(m.currentTarget.details) -1];
and add your thumbs to gal, not the stage. when you're done with the gallery, remove gal. -
Photo Gallery AS 2.0 Help
Hi,
I am very new to Flash and need some assistance. I am using CS4 and ActionScript 2.0. I am trying to create a photo gallery. I have created 4 different movie clip buttons that reside on the content layer. Each button consists of one image. When the movie clip button is pressed, I want the full size image to appear on the stage next to the buttons. You can see the buttons in the image below. I am trying to create an empty movie clip holder that would reside on the main timeline while the buttons reside on the content layer. Can someone help me with the code I need to get the images to load into the empty movie clip and then unload when the next button is selected? I can't seem to get the buttons to "talk" to the empty movie clip holder. I did manage to create code for an empty movie clip holder within each button, but then I end up with all four images on top of each other. Thanks in advance to anyone willing to share their code knowledge.If you are just starting out, then you should consider forgetting AS2 and move up to AS3. That said...
Since you are just learning AS2, there is no time better than the present to drop bad coding practices, namely, placing code on objects. Give your button_mc's instance names, just like you did with the mcHolder, and use timeline code for them.
cabinBtn.onRollOver = function() {
cabinBtn.gotoAndStop("over");
spectrumCursor.gotoAndStop("hover");
cabinBtn.onRollOut = function() {
cabinBtn.gotoAndStop("up");
spectrumCursor.gotoAndStop("normal");
// got rid of loading for on(press)... it defies ReleaseOutside intentions
cabinBtn.onPress = function() {
spectrumCursor.gotoAndStop("click");
cabinBtn.onRelease = function() {
mcHolder.loadMovie("cabin.jpg");
cabinBtn.gotoAndStop("up");
spectrumCursor.gotoAndStop("hover");
cabinBtn.onReleaseOutside = function(){
cabinBtn.gotoAndStop("up");
spectrumCursor.gotoAndStop("hover");
As long as you have each button using the same mcHolder object for loading the images into, the code as you have it will take care of replacing the one previously loaded. -
Photo Gallery - Next or Previous Button
Hi,
I am new to Action Script and I have a small issue that I
can't seem to figure out...
Probably very easy for you guys... ;)
(1)
I have a Photo Gallery here, kinda like a Photo show and
under the picture is a 'Next' and 'Previous' button.
Now when the user will click on e.g. the 'Next' button I want
the pic shown to change into the next picture.
I have all my pics in a movieclip all with labels s1, s2, s3
etc. ....
I already have the code setup to go to the appropriate
movieclip but I don't know how to tell Flash via Action Script to
go to label "s" + 1.... meaning:
if the picture with the label "s2" is shown right now and the
user clicks on the 'Next' button Flash need to go to the mc with my
pics in it and then to the label "s3" --> "s2" + 1
How do I do that ?
(2)
Another thing I was thinking about:
Let's say I have 7 pics in the photo gallery and user is
seeing pic # 7 right now (label "s7") and he clicks the 'Next'
button I need to tell Flash to jump to label "s1" (to the first
pic) because there is no eigth picture...
How is that done ?
Note: I am using Flash 9 CS3 so either AS2 or AS3 is
welcome...
Any help is appreciated and I thank you in advance for that
Mikequote:
Originally posted by:
CanonBoy
if you go to here:
http://www.sapphiremonkey.com/picDemo.zip
you can download a simple Flash 8 document I made to show you
the code.
Kelly
Kelly,
thanx for your reply....
I think we're very close but here's some more info - I
probably should have stated that earlier... sorry ! ;)
the thing is a little more complicated and I just wanna make
sure I use ur code at the right spots:
So here are the three main objects we're dealing with:
(1) movieclip next_btn --> contains rollover and rollout
effects for the Next button as well as an invisible button holding
the action script for that button
(2) movieclip 'rollover_mc' --> which will bring a nice
rollover effect between the pics
(3) movieclip 'pics_mc' --> contains my pictures in a
simple timeline with labels s1, s2, s3 etc. and stop actions at
each frame for each pic
--> (1) and (2) are on the same level, (3) is nested
inside of (2)
when the user clicks (1) the 'Next' button (label: next_btn)
the cursor in the timeline of (2) the 'rollover_mc' movieclip will
proceed and produce nice rollover animation from one pic to the
next pic, having (3) in the midst of the animation go from one pic
to the next.... at least that's the idea.... ;)
so the action script for the 'Next' button (label: next_btn)
right now is:
on(rollOver){
gotoAndPlay("m1"); --> rollover effect for the next
button
on(releaseOutside, rollOut){ --> rollout effect of the
next button
gotoAndPlay("m2");
on(release){
this.pics_rollover_mc.gotoAndPlay("p1");
--> p1 is the label of the frame where the cursor will
jump to and start the rollover animation --> that works ;) haha
while the animation is rolling over to the next pic and it is
just covering the actual picture that was just shown, the cursor
(runnning through the timeline in the (2) 'rollover_mc' movieclip)
will hit a key frame with an action script in it...
and in that action script I need to tell Flash to go to (3)
the movieclip with my pics in it (label: pics_mc which is nested in
that timeline) and go from let's say "s2" PLUS ONE to label "s3"
(the next pic in the series)...
right now the code in that keyframe is:
this.pics_mc.gotoAndPlay("s2")
which means it only shows (after the animation) Pic2 (label:
s2)
now the code that you gave does make sense to me but where do
I need to put which parts ?
here's your code again:
stop();
_global.n = 1;
_root.next_mc.onRelease = function() {
n = n+1;
if (n == 5) {
n = 1;
_root.pics_mc.gotoAndStop("s"+n);
For example, the establishing code for the variable n....
where do I need to put this code so it is globally valid ?
I pasted it into the action keyframe of my next_btn, so the
code looked like this:
on(rollOver){
gotoAndPlay("m1");
on(releaseOutside, rollOut){
gotoAndPlay("m2");
_global.n = 1;
_root.next_btn.onRelease = function() {
n = n+1;
if (n == 5) {
n = 1;
_root.pics_mc.gotoAndStop("s"+n);
and it gave me the following error message:
**Error** Symbol=1.2 next_btn, layer=invisible_btn,
frame=1:Line 7: Statement must appear within on handler
_global.n = 1;
**Error** Symbol=1.2 next_btn, layer=invisible_btn,
frame=1:Line 8: Statement must appear within on handler
_root.next_btn.onRelease = function()
my (amateurish) opinion is that the part
_root.pics_mc.gotoAndStop("s"+n); has to go into the action
script keyframe that the cursor will hit when running through the
timeline in the (2) rollover_mc movieclip
therefore if u wanna start the animation when u click the
button u would have to change your code that u paste into the
next_btn keyframe:
on(rollOver){
gotoAndPlay("m1");
on(releaseOutside, rollOut){
gotoAndPlay("m2");
_global.n = 1;
_root.next_btn.onRelease = function() {
n = n+1;
if (n == 5) {
n = 1;
_root.pics_rollover_mc.gotoAndPlay("p1");
I did that but it still gives me the above error message....
Thanx for your help in advance ! ;) -
Problem with mutiple photo gallery...
Hello,
I'm new to As3.0 (i'm a designer...) but I need to create a photo gallery, So I found a Tutorial On lynda.com.
I'm using a code that works perfectly, and modified it (copy and paste it) to have 2 SAME photo gallery (using different images) displayed on the page.
So I'm using a 2 thumbnails (one for each Gallery) and by scrolling on the X axis of each thumbnail you can see the differnet images availaible in the gallery. By clicking it displays the full size image in a container.
So far so good.
The problem is that when going form one gallery to another, the first viewed gallery doesnt allow the other gallery main size image to display simply because it is underneath it... Like if it was a layer under another top layer...
I would like to know if there is a way to make each gallery unload their full size image when clicking on the other gallery.
SORRY IF THIS IS A BIT UNCLEAR BUT CAN EXPLAIN IF YOU ASK...
HERE IS THE CODE
var xml:XML;
var xmlList:XMLList;
var xmlLoader:URLLoader = new URLLoader();
var container:MovieClip = new MovieClip();
var imageLoader:Loader;
var fullLoader:Loader = new Loader();
var frontIndex:int = 0;;
var containerMask:MovieClip = new MovieClip();
var segment:Number;
container.x = 115;
container.y = -185;
fullLoader.x = 275;
fullLoader.y = -185;
container.addEventListener(MouseEvent.MOUSE_MOVE, changeThumb);
container.addEventListener(MouseEvent.CLICK, showPic);
xmlLoader.load(new URLRequest("data/images.xml"));
xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
function mcunload1(event:MouseEvent):void
fullLoader2.unload();
fullLoader.load(new URLRequest(xmlList[frontIndex].attribute("full")));
function xmlLoaded(event:Event):void
xml = XML(event.target.data);
xmlList = xml.children();
for(var i:int = 0; i < xmlList.length(); i++)
imageLoader = new Loader();
imageLoader.load(new URLRequest(xmlList[i].attribute("thumb")));
container.addChild(imageLoader);
function changeThumb(event:MouseEvent):void
segment = container.width / container.numChildren;
frontIndex = Math.floor(container.mouseX / segment);
if(frontIndex <= container.numChildren - 1)
for(var j:int = 0; j < container.numChildren; j++)
container.getChildAt(j).visible = false;
container.getChildAt(frontIndex).visible = true;
function showPic(event:MouseEvent):void
fullLoader.unload();
fullLoader.load(new URLRequest(xmlList[frontIndex].attribute("full")));
addChild(fullLoader);
container.filters = [new DropShadowFilter()];
addChild(container);
//SECOND IMAGE GALLERY
//SECOND IMAGE GALLERY
var xml2:XML;
var xmlList2:XMLList;
var xmlLoader2:URLLoader = new URLLoader();
var container2:MovieClip = new MovieClip();
var imageLoader2:Loader;
var fullLoader2:Loader = new Loader();
var frontIndex2:int = 0;;
var containerMask2:MovieClip = new MovieClip();
var segment2:Number;
container2.x = 115;
container2.y = -80;
fullLoader2.x = 275;
fullLoader2.y = -185;
container2.addEventListener(MouseEvent.MOUSE_MOVE, changeThumb2);
container2.addEventListener(MouseEvent.CLICK, showPic2);
xmlLoader2.load(new URLRequest("data/images2.xml"));
xmlLoader2.addEventListener(Event.COMPLETE, xmlLoaded2);
function mcunload(event:MouseEvent):void
fullLoader.unload();
fullLoader2.load(new URLRequest(xmlList2[frontIndex2].attribute("full")));
function xmlLoaded2(event:Event):void
xml2 = XML(event.target.data);
xmlList2 = xml2.children();
for(var i:int = 0; i < xmlList2.length(); i++)
imageLoader2 = new Loader();
imageLoader2.load(new URLRequest(xmlList2[i].attribute("thumb")));
container2.addChild(imageLoader2);
function changeThumb2(event:MouseEvent):void
segment = container2.width / container2.numChildren;
frontIndex2 = Math.floor(container2.mouseX / segment);
if(frontIndex2 <= container2.numChildren - 1)
for(var j:int = 0; j < container2.numChildren; j++)
container2.getChildAt(j).visible = false;
container2.getChildAt(frontIndex2).visible = true;
function showPic2(event:MouseEvent):void
fullLoader2.unload();
fullLoader2.load(new URLRequest(xmlList2[frontIndex2].attribute("full")));
addChild(fullLoader2);
container2.filters = [new DropShadowFilter()];
addChild(container2);This is just a quick guess. Whenever you call... fullLoader.unload(); also call fullLoader2.unload(); and vice versa.
-
Photo gallery with buttons and php.
I am relatively new to actions script, very new to as3, and brand new to php. I have tried very hard to figure all of this out via tutorials, studying the code, etc but now I'm running out of time to get this done so I need some help.
I am trying to make a photo gallery that functions as follows:
-the php gathers all of the filenames from a folder and returns it to flash
-an array of buttons is loaded onto the stage (one for each photo)
-flash then loads the first image into a movie clip.
-when the user clicks on button[i], image[i] loads in the movie clip.
-i also plan to incorporate what might happen if the number of photos exceeds the number of buttons that can fit nicely on the stage, like an arrow to go to another set of buttons. I haven't tried coding this yet since I was just trying to get the thing to work in general first. If anyone has ideas about this, let me know.
Please don't make fun of me too much. I know it's probably a mess.
Thank you so much in advance for your help.
Here's the php:
<!--
Author: Adam Ehrheart
Site: http://adamehrheart.com
Blog: http://flashcamp.net
Date: 4.21.08
-->
<?php
# Use "." if the get_files.php file resides in the same directory as files being read
# Otherwise you can change the path to whatever you like
# eg:
# Same Directory:
# $path = ".";
# Other Directory
# $path = "products/images/"
$path = "Photography/";
# Choosing what directory to read
if ($handle = opendir($path)) {
# Temporary array to hold image files
$imageFiles = array();
# Creating loop and assigning current file to $file temp variable
while (false !== ($file = readdir($handle)))
# Checking wheter or not the file is invisible and starts with a "."
$fileCheck = substr($file, 0, 1);
# Checking to make sure the files is either a (jpg, JPG, png, PNG)
$fileType = substr($file, -3);
# Making sure file is not invisible
if($fileCheck != ".")
# Making sure file is readable and dynamically loadable by Flash
if($fileType == "jpg" || $fileType == "JPG" || $fileType == "png" || $fileType == "PNG")
# Adding File to the image array
if($path != "."){
array_push($imageFiles, $path . $file);
}else{
array_push($imageFiles, $file);
# Sorting the files alphabetically
sort($imageFiles);
# Creating XML File output to be read by Flash
echo "<?xml version=\"1.0\"?>\n";
# Root Node
echo "<image_list>";
# Creating child nodes for each image
foreach($imageFiles as $value)
# Pulling the Width and Height values for each file and adding them as attributes for the image node
list($width, $height) = getimagesize($value);
# Creating the image node
echo "<image width=\"$width\"" . " height=\"$height\">" . $value . "</image>";
echo "</image_list>";
# Closing the readdir function
closedir($handle);
And here's the as3:
//php photo section
import flash.events.Event;
import flash.net.*;
//load the php file
var myRequest:URLRequest = new URLRequest("Photography.php");
var myLoader:URLLoader = new URLLoader();
//define images variable as an xml file
var images:XML = new XML();
images.ignoreWhite = true;
images.addEventListener ('load', myLoader);
//define the images variable as an xml as the php file result
myRequest.data = images;
//outputting the filenames
function onLoaded(evt:Event):void {
trace("here we get the data back: "+myLoader.data);
//when the data is loaded, begin myRequest
myLoader.addEventListener(Event.COMPLETE, onLoaded);
myLoader.load(myRequest);
//array to call the images
var imageArray:Array //= NewArray();
var listLength:Number;
var il:XMLList = images.data //xml.images;
listLength=il.length();
var i:Number
var photo_btn:Array = new Array();
for (i = 0; i < listLength; i++); {
imageArray[i] = il[i].pic //xml.images[i].pic;
if (photo_btn[i].mouseDown == true) {
img_loader.load(imageArray[i])
if (i == 0) {
photo_btn[i].y = 422.7;
photo_btn[i].x = 411.5
else if (i > 0 && i < 24); {
photo_btn[i].y = 422.7;
photo_btn[i].x = (photo_btn[i-1].x + 18.6);
if (i > 24 && i < listLength); {
photo_btn[i].y = 442.7;
photo_btn[i].x = (photo_btn[i-1].x + 18.6);
img_loader.load(imageArray[0]);As for AS3 part of it, I am not sure your code really works. There are syntax and logical errors there.
I think you need to take it step by step and accomplish several task in the following sequences:
1. Write code that loads XML correctly;
2. Write code that enables buttons;
3. Write code that will load images on button clicks.
The code below shows in principal what needs to be done in order to load XML and make the data in this XML available for further consumption. Also, by accomplishing this step you will iron out all the PHP vs Flash wrinkles including your XML.
Please note, I don't know your XML structure so all the parsing issues you need to resolve yourself.
Once you get handle on it - we, hopefully, will talk about steps 2 and 3.
import flash.display.Loader;
import flash.events.*;
import flash.net.*;
var images:XML;
var myRequest:URLRequest;
var myLoader:URLLoader;
// list of image urls that will come from loaded XML
var imageList:XMLList;
myRequest = new URLRequest("Photography.php");
myLoader = new URLLoader();
myLoader.addEventListener(Event.COMPLETE, onFileLoaded);
// suggested handler for unexpected errors - avoids some headaches
myLoader.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);
myLoader.load(myRequest);
// Note: all the listeners are removed
// it is always wise to remove listeners that are needed any longer
// to make objects eligible for arbage collection
function onLoadError(e:IOErrorEvent):void
trace(e.toString());
myLoader.removeEventListener(Event.COMPLETE, onFileLoaded);
myLoader.removeEventListener(IOErrorEvent.IO_ERROR, onLoadError);
function onFileLoaded(e:Event):void
myLoader.removeEventListener(Event.COMPLETE, onFileLoaded);
myLoader.removeEventListener(IOErrorEvent.IO_ERROR, onLoadError);
images = new XML(myLoader.data);
// only now xml is ready and you can start loading images
imageList= images.pic; -
How can I create a photo gallery in flash cs3, Iam a beginner in flash
How can I create a photo gallery to put into my current flash site Iam creating? Using flash cs3, can anybody suggest any tutorials (noting complicated with me being new to flash cs3)
When going on line I saw that maybe you can use Dreamweaver, XML, or even Photoshop can anybody explain the difference between using one or the other?
THanksIndeed, google ftw.
For example:
+as3 photo gallery flash tutorial
reveals many including this one:
http://www.flashmagazine.com/Tutorials/detail/as3_photo_gallery/ -
I am having trouble with actionscript. I am making a photo
gallery and my buttons and layout are just dandy everything's
looking fine. The buttons do nothing, and i know i need
actionscript to make it work but i have no idea how to even begin.
I have what i want the buttons to show made in a movie clip I just
need to know how to how to have the clip come up and be centered
when clicked. Please help me.depends on whether you are using AS3 or AS2.
either way, however, you're looking to work with "event
handlers"
onRelease()
onPress()
onRollOver()
onRollOut()
etc...
so in AS2, if you have a button named "test_b" on your main
timeline, you would assign an action like this...
test_b.onRelease = function() {
trace("this is a test to see if this button works.");
AS3's event handlers are a little different. -
Making a photo Gallery in Flash cs4
Is there an easy way to make a cool looking, interactive photo gallery that i can insert into my website usuing flash?
The safest answer to give you is... no, there is no easy way for you to make a cool looking interactive photo gallery. To achieve whatever it is you consider cool looking and interactive requires understanding how to design with Flash and Actionscript. Your best bet for getting a start on making one is to search Google using search terms like... "AS3 gallery tutorial" and add in any other terms that represent what you want.
-
How create html photo gallery in PSE 12?
In earlier version of PSE I was able to create an html photo gallery. How do I make one in version 12?
Indeed, google ftw.
For example:
+as3 photo gallery flash tutorial
reveals many including this one:
http://www.flashmagazine.com/Tutorials/detail/as3_photo_gallery/ -
Make 3D Flash wedding photo gallery with songs
Last week, my dearest sister got married. There were about a gazillion things to love about her wedding day… so many moments all wrapped up into one very totally unforgotten event. I took lots of wedding photos on her wedding day and wanted to give her a surprise of making her a 3D flash wedding photo gallery with wedding songs.
As I expected, my sister was moved, many thanks she said to me. Now I just want to give my many thanks to Aneesoft 3D Flash Gallery. It is a wedding gallery making software that helped me make so gorgeous flash gallery with my sister's wedding pictures. Knowing nothing about flash making, I never thought making a splendid 3D flash gallery would be so easy. My friend, do you eager to make your own cool, awesome flash gallery now? Do you eager to sharing your wedding photos in a stunning 3D photo gallery? Let me show you the way!
What you'll need:
1. Wedding photos and wedding songs for your 3D flash gallery
2. Aneesoft 3D Flash Gallery
Step 1: Download & install Aneesoft 3D Flash Gallery
We'll be using a very nice 3D gallery making software 'Aneesoft 3D Flash Gallery' to making a romantic wedding flash gallery with wedding photos and wedding songs, head over here and download the free trial version. Next step is to install the program.
Step 2: Import wedding photos and edit
You can add up to 500 photos that you want to use in your wedding photo gallery, arrange the photos as you like. Aneesoft 3D Flash Gallery supports a wide range of file formats for images, such as .jpg, .bmp, .gif. Click "Add Caption" to add title and description for your wedding photos. And you can also crop and add special effects to them to make your wedding photos more perfect
Step 3: Choose from a variety of wedding flash gallery templates
Aneesoft 3D Flash Gallery offer you an easy way to make a stunning wedding photo gallery by choosing from variety of flash gallery templates. A flash gallery template automatically put preset decoration to wedding gallery. When you select a preset flash gallery template, you're able to enhance it by customizing some additional settings, such as background, thumbnail effects, playback options and scrolling actions. For the adventurous users, explore the powerful advanced features and tools that gives you total control over how you compose your wedding flash photo gallery.
Step 4: Add some wedding songs for your wedding flash gallery
Wedding songs are a very important factor to consider when making your wedding flash photo gallery. They set the general mood and tone for your gallery, while also allowing you to express your feelings through music. You may find the perfect wedding songs out of hundreds of popular wedding songs and music through Amazon.com or iTunes.
In this step, you can add some wedding songs as background music to play along with your wedding flash gallery. Click Add Music button to browse and add your wedding songs. You can add, remove and edit the wedding music files. And you may check the option to control the background music looping or not.
Step 5: Preview and publish your 3D wedding flash gallery
It is advisable that you preview the wedding flash gallery at least once, before you publish it. Click and drag mouse for scrolling and tilting the 3D flash gallery. Click on the thumbnail to zoom in and out the photos. You have several options to share and publish your 3D wedding photo gallery, such as SWF, EXE and HTML. It depends on your needs.
OK, now your wedding flash gallery is done. What do you think of the wedding flash gallery that I made for my sister? End with my sister's sentences "Fun is not ending, romantic is not ending, and love is just beginning!" Wish your wedding pictures can also be splendid as my sister's, and your love is just beginning, enjoy!
know more:
http://www.aneesoft.com/win-3d-flash-gallery.html
http://www.aneesoft.com/tutorials/3d-flash-gallery/make-wedding-flash-gallery-with-songs.h tmlAs for AS3 part of it, I am not sure your code really works. There are syntax and logical errors there.
I think you need to take it step by step and accomplish several task in the following sequences:
1. Write code that loads XML correctly;
2. Write code that enables buttons;
3. Write code that will load images on button clicks.
The code below shows in principal what needs to be done in order to load XML and make the data in this XML available for further consumption. Also, by accomplishing this step you will iron out all the PHP vs Flash wrinkles including your XML.
Please note, I don't know your XML structure so all the parsing issues you need to resolve yourself.
Once you get handle on it - we, hopefully, will talk about steps 2 and 3.
import flash.display.Loader;
import flash.events.*;
import flash.net.*;
var images:XML;
var myRequest:URLRequest;
var myLoader:URLLoader;
// list of image urls that will come from loaded XML
var imageList:XMLList;
myRequest = new URLRequest("Photography.php");
myLoader = new URLLoader();
myLoader.addEventListener(Event.COMPLETE, onFileLoaded);
// suggested handler for unexpected errors - avoids some headaches
myLoader.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);
myLoader.load(myRequest);
// Note: all the listeners are removed
// it is always wise to remove listeners that are needed any longer
// to make objects eligible for arbage collection
function onLoadError(e:IOErrorEvent):void
trace(e.toString());
myLoader.removeEventListener(Event.COMPLETE, onFileLoaded);
myLoader.removeEventListener(IOErrorEvent.IO_ERROR, onLoadError);
function onFileLoaded(e:Event):void
myLoader.removeEventListener(Event.COMPLETE, onFileLoaded);
myLoader.removeEventListener(IOErrorEvent.IO_ERROR, onLoadError);
images = new XML(myLoader.data);
// only now xml is ready and you can start loading images
imageList= images.pic; -
Photo gallery (using Loader with no xml)
Hello, currently I'm doing a photo gallery.
Inside .fla, only 2 frame:
1st is for my 3 category: A, B, C.
stop();
A.addEventListener(MouseEvent.CLICK, clickSection);
B.addEventListener(MouseEvent.CLICK, clickSection);
C.addEventListener(MouseEvent.CLICK, clickSection);
function clickSection(evt:MouseEvent):void{
gotoAndStop("gallery");
loader.unload();
req = new URLRequest(evt.target.name + "_gallery.swf");
createLoader();
loader.load(req);
2nd is to load the swf externally.
var req:URLRequest
var container_mc:MovieClip
var loader:Loader = new Loader();
req = new URLRequest("A.swf");
createLoader();
loader.load(req);
function createLoader():void{
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, initListener);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, fileLoaded);
function initListener(evt:Event):void{
addChildAt(loader,1);
function fileLoaded(evt:Event):void{
container_mc = MovieClip(loader.content);
debug (click the button and it pop this):
RangeError: Error #2006: The supplied index is out of bounds.
at flash.display::DisplayObjectContainer/addChildAt()
at main_gallery_fla::MainTimeline/initListener()
any ideas why?Yes, two... the first being the most important...
1) Learn how to use the help documentation (and Google). If you look up addChild in the help documents it will define what you need to know to be able to use it. The same goes for any other element of the AS3 language. The help documents are a primary tool in learning/using AS3 (or any language).
2) use: addChild(loader);
I couldn't really follow your description in the first posting, but I would almost expect a flurry of other errors unless I am misinterpretting what you described. Very often errors get reported in sequence, not all at once. -
Flash & XML Photo Gallery with Categories
Hello friends
i am trying but
i want to create Flash & XML Photo Gallery with Different Categories
please help meIf you want to do using oop
go throgh this article first
http://active.tutsplus.com/tutorials/actionscript/as3-101-oop-additional-concepts/ -
How to build the vertical photo gallery?
Similar to tn3, but I need to build a vertical photo gallery with scroll bar with as3. Can you please advise?
These are better:
Responsive Image Scroller
http://code.tutsplus.com/tutorials/create-a-responsive-image-scroller-in-actionscript-30--active-1412
Build a Categorized Image Gallery With XML and AS3
http://code.tutsplus.com/tutorials/build-a-categorized-image-gallery-with-xml-and-as3--active-4272
to change it from horizon to vertical just need to change the x/width to y/height
Maybe you are looking for
-
Can't transfer files from my compiuter to iphone
problem is that it says that my "computer isn't authorized"... i authorized (Store > Authorized This Computer) it many times but nothing changes... please help me
-
Canon 5D Mark III Raw Files Not Viewable in Finder for Snow Leopard 10.6.8
System specs: Computer: Mid 2008 Mac Pro - Dual Quad Core OS: OS X 10.6.8 (includes the most recent Digital Camera Raw Updates) Camera: Canon 5D Mark III Problem: Finder can not preview the thumbnails from this camera. While not that big of a deal (
-
Dynamic default values in parameters
Hello, anyone knows if it's possible to set dynamic values as default values for parameters in portal? i am specially interested in the use the date we are in to pass it to a discoverer worksheet (month or year) via single parameter form or any other
-
Deserialization error of exception information
Hello, In my client when an exception from the server is caught I get the following exception info: Runtime exception; nested exception is: deserialization error: unexpected XML reader state. expected: END but found: START: messageSearching for
-
Delete photos iPhoto on ipad?
Is there an easy way to delete photos in iPhoto on an iPad? Maybe a better question is: is there any way?