Flash Forum, Tutorials, Education & Training

 


Flash Tutorials


Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> undefined array skip problem, an array keeps skipping to the last number in the array
sitinthecar
post Mar 16 2010, 09:50 PM
Post #1


Newbie
Group Icon

Group: Members
Posts: 3
Joined: 16-March 10
Member No.: 6,325



Hi everyone,

I am building a photography website, and I have a rollover 'info' button that makes a caption appear below the photograph when the mouse rolls over it. It works fine, but the problem is that when I click 'next' to move to the next picture, and caption, it skips to the last caption in the array of 19 captions, and repeatedly depicts that one through all the images. Also, before you click next, it displays "undefined," when I want it to display nothing. Its weird because, once you go all the way to the end of the array, on the way back, it starts depicting the correct captions. I can't figure out what is doing this! My suspicion is that it has to do with this code:

info.onRollOver=function() {
dt.text = cArray[i];
}
info.onRollOut=function() {
dt.text = "";
}
forward.onRelease = function() {
i<18?i++:i=18;
}
back.onRelease = function() {
i>0?i--:i=0;
}


but I am not sure. I just want it to depict the correct captions with the photos, I am sure you can't see the photos, but if someone could help it just depict the correct captions......

If anyone could help me out, that would be great!

Thanks
Attached File(s)
Attached File  hptry.fla ( 167.5K ) Number of downloads: 13
 
Go to the top of the page
 
+Quote Post
Oldnewbie
post Mar 17 2010, 12:52 AM
Post #2


Wan Kenobi!
Group Icon

Group: Moderator
Posts: 3,307
Joined: 2-November 05
From: Montréal, Québec.
Member No.: 826



Provide the .fla in a CS3 format, not CS4, if you want me to have a look...


--------------------
Go to the top of the page
 
+Quote Post
sitinthecar
post Mar 17 2010, 04:07 PM
Post #3


Newbie
Group Icon

Group: Members
Posts: 3
Joined: 16-March 10
Member No.: 6,325



thanks! here you go.
Attached File(s)
Attached File  hptrycs3.fla ( 72K ) Number of downloads: 9
 
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 





> Webwasp Flash Forums
New Posts

RSS Lo-Fi Version Time is now: 20th April 2014 - 11:27 PM