Solved

Help controlling dynamically created buttons and movieclips -- file attached

Posted on 2008-10-10
7
183 Views
Last Modified: 2013-11-11
I am trying to create a 'paging' function for my gallery, where 'pages' of thumnail links are displayed instead of, say, a scrolling thumnail menu. These pages are controlled by page buttons below. All are created dynamically.

The first page of thumbs appears correctly. But the subsequent pages do not. I have trace calls throughout the code that you can uncomment to help. The currently uncommented trace calls seem to me to indicate that the code should operate correctly (or not...).

I've been staring at the code for a long time, and I think I need another set of eyes now. I don't know if this is a depth problem or what it is.

Here is the fla and associated files:
http://65.36.238.78/fla/gallery.zip

If I can provide any additional information, please ask. Thanks!
0
Comment
Question by:Oneiroid
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
7 Comments
 
LVL 39

Accepted Solution

by:
blue-genie earned 500 total points
ID: 22703573
hey me again.
i just looked through your code again.
i need to head off to a class in a few minutes, but it seems to me the other "pages"  are never getting created.
instead of creating pages - what you need to do is strip out the attach clip in a separate function.
then call each "build page" function when they click the buttons.
i'll see if i can have a look tonight when i get home from class.
but think about what i said.
0
 
LVL 4

Author Comment

by:Oneiroid
ID: 22705795
I tried pulling out the page-create into a function, and included a trace to be sure that is was being hit predictably. The pages appear to be getting created.

But building a page every time a button is clicked seems a little less effecient than the current apprach, no?

Something else to consider here, is that the first page appears, but after navigating to the other pages which do not appear, the first page will not reappear. Hmmm...
0
 
LVL 4

Author Comment

by:Oneiroid
ID: 22707495
Okay... found something. It seems that the alpha value of the thumb buttons is causing grief. For example, if you start all of the buttons at alpha value 100 (do not alter the visibility), and remove the two lines of alpha manipulation in the newPage function, it appears to work.

However, I'd very much like to also control the alpha.

Anyway, I think this might be on the right track...
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Author Comment

by:Oneiroid
ID: 22707664
Another interesting test...

Set all the alphas back to their original state (as in before my last post), and  in the 'loop current page images to disappear' loop (the first loop in the newPage function), set the alphs value tp 15 instead of 0.

Run the script. The first page shows up. The second page does not show up. The third page does not show up. But on any page button you click on thereafter, the pages show up as they should, but only with an _alpha of 15.

Curious.
0
 
LVL 39

Expert Comment

by:blue-genie
ID: 22708633
what i did last night before i got sleepy, was create each "page" with an x and y offset - and from what i could see, only 1 page was being created.
my theory is this.
load up the xml store everything, calculate how many pages, how many thumbnails etc.
create the first page thumbnails.
load images into the thumbnails.
then when they do a Nextpage - check the number required (clear the extras if necessary) load the next lot of images.
i tried stripping out all the extra code last night (the zoomy stuff) to get that part working, but sleep got the better of me.
if i find something will let you know.

what happened to that last file we had where it loaded, then went wonky. i've tossed mine.
0
 
LVL 4

Author Comment

by:Oneiroid
ID: 22716305
In the original file, I managed to fix a depth conflict between the thumbnails and the main image viewer. It appears that I got this new file working now - the main culpret was an alpha mis-assignment. I got it working with both the no-fade version and the fade version (which was commented out), and both had their problems.

Thanks for taking a peak at my files. I will certainly consider the page creation/navigation method you described in your last post the next time I need this kind of functionality.

Cheers.
0
 
LVL 4

Author Closing Comment

by:Oneiroid
ID: 31505168
Hey, collaborative troubleshooting is still worth an 'A'. Thanks again!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question