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?
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();
}[/B]
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.
I will give that a shot… I work an hour from my house and that’s where I am now (lucky me), so I have to wait till tonight. do I put that right into my code or at the end? I appreciate the help…I definitely am in need.
OK…I will definitely give that a shot and see what happens. When I did the thing to start with, the instructions had me create my first symbol (after the background was complete) and then double click on that, opening the edit thing, then I added more frames with more images… I believe the instructions were in AS2 instead of AS3, so that got me jacked up to start with. Then I did a little research to find the right code for AS3. So I have the main part, then all of the images are inside that other area (forgive me for not knowing the best way to put this…terminology wise) and that other area is called content_mc… So I figured that I would have to put that somewhere, but when I tried, it still didn’t work, so I am assuming that I put it in wrong. I will try your code when I get home and see what happens.
Thinking I need to get out of here early today…Boss-man may not be happy.