PDA

View Full Version : Gallery and ALOT of pictures


pattym
05-28-2007, 04:53 AM
Hello.
Ive started to make a gallery for all the pictures i have from a prom a went to with my school.
The only problem is that there is loads of them, so im wonering if there is a way to tell flash to look in a folder and randomly load one of the pictures then randomly load another after like 5 seconds or so.

If there isnt a way to do this is there another way to handle some many pictures quickly and effectivly.

truimagz
05-28-2007, 05:11 AM
xml is great for such a thing.

Or put them into an array, either way you can randomise them, if its something youll

If tis going to be online then you could use php, this would be the eaiest way.

pattym
05-28-2007, 05:26 AM
Well im dont realy know much xml or php so ill have to look into that but i though that it might be the best methord :( o well. Any sample codes to get me started cose i havnt got a clue.

arkhan
05-28-2007, 06:37 AM
it depends on what serverSide lang you choose to use..coz flash doesnt search on folders by itself as far as I know.. could be anything from asp, php or java..
you might also use the flashVars to list all the images you want to be shown, or make the images names serialized(img001.jpg,img002.jpg,img003.jpg,img004 .jpg, etc...), so you dont need any referece to them.

pattym
05-28-2007, 09:18 AM
Ill definatly be changeing the names to something like NCS2007_001, NCS2007_002, ect... (and just so you know there are hundreds of photos :S)
As for the language i only realy know AS so suggessed one the i can attempt to learn it.

medhopz
05-28-2007, 10:21 AM
learn xml...truimagz gave a "lesson" for it in this forum
there is really nothing to learn, search for the thread, it helped me a lot

pattym
05-28-2007, 03:44 PM
ive attemped to search for the xml tutorial but i cant find it, so can you post a link please.

Also im having some AS 3.0 problems. I have some code that as 2.0 works fine and i get the desired effect. How ever for 3.0 theres no errors but all the animations and stop actions dont seem to work the way it would as 2.0.

The line of code that makes it not work is

_parent.ConBox.play();

It says

1120: Access of undefined property _parent. Source:_parent.ConBox.play();

So unless _parent and the way instance names have change i have no idea why it says this. Any idea?

truimagz
05-28-2007, 05:28 PM
learn xml...truimagz gave a "lesson" for it in this forum

I did? are you sure?

Man I am going to look.........I hope it's good lol.

Jacob
05-28-2007, 05:35 PM
Also im having some AS 3.0 problems. I have some code that as 2.0 works fine and i get the desired effect. How ever for 3.0 theres no errors but all the animations and stop actions dont seem to work the way it would as 2.0.

The line of code that makes it not work is

_parent.ConBox.play();

It says

1120: Access of undefined property _parent. Source:_parent.ConBox.play();

So unless _parent and the way instance names have change i have no idea why it says this. Any idea?

AS 3.0 has changed a bit in some of its syntax. For one, the use of underscores in the properties of MovieClips has been largely removed.

So "_parent" does not exist (thats what the compiler is telling you). _parent has been replaced by parent, just like _x is now x, _y is y, _xscale is scaleX, etc etc.

So dont expect to just publish as 3.0 and hope it will work. It most likely wont, due to the changes.

medhopz
05-28-2007, 10:09 PM
http://forums.xgenstudios.com/showthread.php?t=95164&page=2

and NG link :
http://www.newgrounds.com/bbs/topic.php?id=298044

this is basicly how i learned, pretty simple stuff

truimagz
05-28-2007, 10:31 PM
wow i did post that.......way to go self.

Yea pretty simple stuff.

I tell ya what would be better, making an upload module and using mysql with php to quesry it and add the photos, this way you could just upload a file, and bam, there it is in your photo gallery.

Actually I just made such a thing............I love making re-usable assets.

Maybie I'll open source it?

arkhan
05-29-2007, 08:53 AM
why use mysql? it would be just more actions to take in order to achieve th same thing..its easyer to just make php/asp search the folder(s) for the files and send it back to flash..tomorrow at work I have an image galerry that does exactly that..truimagz, just by the way, your host accepts asp as well as php?

truimagz
05-29-2007, 09:11 AM
I have alot of hosting some asp some php, i like php with linux better than asp with windows though.

And yes its tru you in this case you could have php return the values of folders, I tend to store all data in mysql though, In my hosting module for instance its nice to know who uploaded that porno or keygen to the community folder, ya know.

arkhan
05-29-2007, 09:37 AM
it sure is.
I meant on creativeDedication, is I upload an asp file to my folder, it will work right? I have no asp here to test..at home I only have my playing comp XD..my work comp is..well..at work..

pattym
05-29-2007, 04:35 PM
jjcorreia i understand what uve said and change the code by getting rid of the _ but i think the the problem is that its calling

parent.ConBox.gotoAndPlay(2);

befor it get to the frame its on, so im completely lost on how AS3 works. So does any one know any tutorials about the basic of AS3 that could help me.

Once ive got the flash stuff out the way i can start learning XML and thanks for the link. :)

arkhan
05-29-2007, 04:38 PM
get to the livedocs(http://livedocs.adobe.com/flex/2/langref/index.html), look for some functions you want to learn how to use, and read the examples...mix them togueter, play around...worked nicelly for me..not sure about tuts online...didnt search for them.

Jacob
05-29-2007, 05:51 PM
jjcorreia i understand what uve said and change the code by getting rid of the _ but i think the the problem is that its calling

parent.ConBox.gotoAndPlay(2);

befor it get to the frame its on, so im completely lost on how AS3 works. So does any one know any tutorials about the basic of AS3 that could help me.

Once ive got the flash stuff out the way i can start learning XML and thanks for the link. :)

Dunno about tuts specifically, but you should head over to the AS3 forum (http://board.flashkit.com/board/forumdisplay.php?f=102)at FlashKit. You will find a lot more help with your AS3 questions there. Kirupas AS3 forum (http://www.kirupa.com/forum/forumdisplay.php?f=141) might be helpful as well.