curtmart
09-25-2008, 10:12 PM
I just started playing with AS3 around the end of August but I learn quickly.
I'm not having any problems creating the photo gallery (that's easy stuff).
However I am having a problem figuring out how to code a mouse event function (that's not packaged or classed) that checks to see if the user has selected the symbol permitting them add a pic from the gallery to a favorites queue.
I've started off learning AS3 and have no prior experience with AS2, but I've looked at some AS2 code that does what I'm try to accomplish. It looks to be a bit simpler than what I'm thinking will be ahead of me in AS3. (but im not going to let that stop me)
Unfortunately because event handlers were not used in the AS2 code it was a bit confusing.
Outside of creating a package with a function that provides a global mouse event boolean (to check and see if the user has selected the "yes" button to add the picture to their favorites for a personalized slide show viewing) I'm not finding any other possible methods.
At the moment I'm looking at (somewhat similar to what i found in the AS2 coding) setting up multiple variables with zero values (var pic0 = 0; through var pic11 = 0;)
Next setting a total var summing up all of the zero valued pic variables. (this will be the checker to see whether or not the user has selected any favorite pics for the personalized slide show)
On the time line I would set up a series of frames with each frame displaying each individual gallery picture. These series of frames would be the actual entrance to the viewing of the gallery.
However if I could create a mouse event function that returns a boolean, This function would (upon the user selecting the button) change one of the zeroed "pic" variables to true from within the mouse event function itself.
Then on each of the individual gallery frame pics I would put an if statement that would check to see "if" the pic var is zero or one. If the pic var is zero goTo the next frame (since it wasn't selected as a favorite).
I hope this is not clear as mud. And I'm sure this is probably not the most efficient way of building this. But any advise would be sure appreciated.:confused:
I'm not having any problems creating the photo gallery (that's easy stuff).
However I am having a problem figuring out how to code a mouse event function (that's not packaged or classed) that checks to see if the user has selected the symbol permitting them add a pic from the gallery to a favorites queue.
I've started off learning AS3 and have no prior experience with AS2, but I've looked at some AS2 code that does what I'm try to accomplish. It looks to be a bit simpler than what I'm thinking will be ahead of me in AS3. (but im not going to let that stop me)
Unfortunately because event handlers were not used in the AS2 code it was a bit confusing.
Outside of creating a package with a function that provides a global mouse event boolean (to check and see if the user has selected the "yes" button to add the picture to their favorites for a personalized slide show viewing) I'm not finding any other possible methods.
At the moment I'm looking at (somewhat similar to what i found in the AS2 coding) setting up multiple variables with zero values (var pic0 = 0; through var pic11 = 0;)
Next setting a total var summing up all of the zero valued pic variables. (this will be the checker to see whether or not the user has selected any favorite pics for the personalized slide show)
On the time line I would set up a series of frames with each frame displaying each individual gallery picture. These series of frames would be the actual entrance to the viewing of the gallery.
However if I could create a mouse event function that returns a boolean, This function would (upon the user selecting the button) change one of the zeroed "pic" variables to true from within the mouse event function itself.
Then on each of the individual gallery frame pics I would put an if statement that would check to see "if" the pic var is zero or one. If the pic var is zero goTo the next frame (since it wasn't selected as a favorite).
I hope this is not clear as mud. And I'm sure this is probably not the most efficient way of building this. But any advise would be sure appreciated.:confused: