I am having the worst problems. I am working on my final project for class and I thought it would be a great idea to add a Flash slideshow.... Notsomuch. I have managed to get the code to where it actually stops the .swf from looping, but I have a whole new error when I click on my back and next buttons to nav through the images. The new error is:
TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Stage@293d4089 to flash.display.MovieClip.
at Untitled_fla::MainTimeline/clickHandler2()
So, now that I want to curl up in the fetal position and die, can someone help me with this code?
import flash.events.MouseEvent;
import flash.events.Event;
stop();
next_btn.addEventListener(MouseEvent.CLICK, clickHandler);
function clickHandler(event:Event):void
{
MovieClip(parent).nextFrame();
}
last_btn.addEventListener(MouseEvent.CLICK, clickHandler2);
function clickHandler2(event:MouseEvent):void
{
MovieClip(parent).prevFrame();
}
I have a single file and in that is all of the images. I haven't ever coded anything like this before and I am feeling quite stupid not being able to figure it out.
I would appreciate any help at all. I have 24 hours to get this stupid thing done and I still have so much work to do....and a job. Over my head, here.


Reply With Quote


Bookmarks