# onKeyDown mix up... so confused!

**URL:** <https://forum.kirupa.com/t/onkeydown-mix-up-so-confused/225839>\
**Category:** flash\
**Created:** [May 16, 2007, 4:13am UTC](https://forum.kirupa.com/t/onkeydown-mix-up-so-confused/225839 "2007-05-16T04:13:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nlyttle](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@nlyttle](https://forum.kirupa.com/u/nlyttle)\
**Post date:** [May 16, 2007, 4:13am UTC](https://forum.kirupa.com/t/onkeydown-mix-up-so-confused/225839/1 "2007-05-16T04:13:01Z")

</div>

So I have this linear photo “slideshow” with forward and back buttons in which the photo frame resizes to fit the image, and I want to add the ability to move through the photos via the arrow keys. However, when I applied the code it advances the photo, but the border is consistently sized to the current photo -1 in the xml (if that makes sense), even thought the same function is applied to both the buttons, and the arrow keys.

The live example can be seen here [http://www.bus15.com/clients/shalowitz/Flash/](http://www.bus15.com/clients/shalowitz/Flash/)

I’ve also attached the FLA. Thanks in advance!

[http://www.bus15.com/clients/shalowitz/Flash/shalowitz.fla](http://www.bus15.com/clients/shalowitz/Flash/shalowitz.fla)

And here’s the xml:

```auto
<?xml version="1.0" encoding="UTF-8"?>
<portfolio>
		<image title="" source="photos/1.jpg"/>
		<image title="" source="photos/2.jpg"/>
		<image title="" source="photos/3.jpg"/>
		<image title="" source="photos/4.jpg"/>
		<image title="" source="photos/5.jpg"/>
		<image title="" source="photos/6.jpg"/>
		<image title="" source="photos/7.jpg"/>
		<image title="" source="photos/8.jpg"/>
		<image title="" source="photos/9.jpg"/>
		<image title="" source="photos/10.jpg"/>
		<image title="" source="photos/11.jpg"/>
		<image title="" source="photos/12.jpg"/>
		<image title="" source="photos/13.jpg"/>
		<image title="" source="photos/14.jpg"/>
</portfolio>

```
