Solved

Help controlling dynamically created buttons and movieclips -- file attached

Posted on 2008-10-10
7
179 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
  • 5
  • 2
7 Comments
 
LVL 39

Accepted Solution

by:
blue-genie earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 4

Author Comment

by:Oneiroid
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Hey, collaborative troubleshooting is still worth an 'A'. Thanks again!
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
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 select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now