Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Help controlling dynamically created buttons and movieclips -- file attached

Posted on 2008-10-10
7
Medium Priority
?
188 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 2000 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Industry Leaders: 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

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

618 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