-
OKay, so i'm an actionscript newbie, and i am wondering what the code would look like for this kind of if statement.
This is what i have now:
A jukebox that loads external movie #1 to level 1 when you click play. The stop button unloads any movie in level 1. There is a next button and a previous button that currently have no actions assigned to them.
What i want to happen:
When the user clicks either next or previous, the appropriate movie # loads into level 1 to replace the one that was there before.
So onRelease of next button, if movie #1 is in level 1, then load movie #2 into level 1. If movie #2 is in level 1, then load movie #3 into level 1, and if movie #3 is in level 1, then load movie #1 into level 1.
Same for previous, except backwards. So onRelease of previous button, if movie #1 is in level 1, then load movie #3 into level 1.
Can you help me write the code properly?
Thanks!
-
whatever was in _level1 will be replaced by the new clip loaded in the same _level... so you don't need any if statement.. only the loadMovieNum()
gparis
-
Yes i know that, but it depends on which movie is being played at the time the button is clicked. Like i said, if then NEXT button is clicked when movie #2 is loaded in level 1, then movie #3 should loaded, however if movie #1 is playing when NEXT is clicked, then movie #2 needs to load.
So what should the code look like?
-
ok then 3 movies = 4 frames. The next button sends the clip to next frame the previous to previous frame (easy enough) on each frame is your command to load the clip. that clip is just a 4 frames actions movie. frame1 unloads and stopsAllSounds() frame1 loads music1, frame2 loads music2, frame3 loads music3.
gparis
-
Oh!!! That makes soooo much sense! Thank goodness there are people like you with such logical minds! I didn't even think of that.
Thanks a lot!
-
Okay, so i tried it, but i'm doing something wrong... there's no sound coming out. My little song display works... so when i hit next/prev, it is going to the right frame, but there is no sound. I put a stop action on each frame. Should i take that action off?
Any ideas what else could be making the sound not work?
Thanks again,
-
don't know.. Are you sure the movie goes to the next/previous frame (as it's blank, maybe write a # on each frame to see whether it goes there or not)
gparis
-
Oh it's definately going to the proper frames because i have an indicator: that song name display that i was telling you about. I was all tickled that it worked, then i noticed no sound. And i made sure the volume was up and all that other stuff.
So it's not the 'stop' action on each frame?
-
nope. it's got to stop. You've got the loadMovieNum() code right? other solution if the fla is not tooooo big send it over :gparis@securenet.net
gparis
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|