Hello, I have added a loader for my picture gallery. What I would like it to do is when I select a picture it will appear in the gallery. What command do I need to define that when I click on the picture it will appear in the main gallery. I hope this is clear. If you need more clarity. Let me know. Thanks
What i have is an a drawing object. In this object I have15 images. I have defined each image as a button. Beside this drawing object I have defined a loader with a currentpath of the default picture, image1.jpg. What I would like to do is when I click on one of the images in the drawing object that it appear in the loader. Is this the correct way of creating a picture gallery? Or I am I doing this wrong? Thanks
give the Loader component and instance name, lets say, myLoader.. then give all your buttons an instance name, for this example, my_btn, my_btn2, etc.. attach this to frame myLoader.contentPath = "image1.jpg" my_btn.onRelease = function(){ myLoader.contentPath = "image2.jpg"; }; my_btn2.onRelease = function(){ myLoader.contentPath = "image3.jpg"; };
I have tried your code I am still having problems. I gave the loader an instance name and each button an instance name. Than I made sure to put the full path to the images in the contentPath. What happened is that when I put the contentPath in the parameters of the loader I see the image. When I remove the contentPath and put it in code as you suggested no image appears and the buttons still do not function. Is there something I am missing? Thanks
I gave the component an instance name of myLoader then I put in the full path to my folder on my computer of where the pictures are. I called the buttons as you suggested for testing purposes. When I try to view it in a web page I don't see the loader at all.
you need to use a relative URL like i did in the example.. place the images in the same directory as your SWF and just use "image1.jpg" or place them in an image folder in the same directory as your SWF and use "image/image1.jpg".. that's if you name the folder image.
Great. It works. Thank you very much.
Don't see what you're looking for? Try a search.
|