-
Always Learning
Errors from Swish 2.0 swi in SwishMax
Hello,
I have a flash swi from Swish 2.0 that I just opened in SwishMax. Updating has gone smoothly for the most part, but there are a couple "bugs" showing up.
The first is the external audio file. I have my music loaded in a separate swf to keep the main swf file size down...so I call the music in with:
Code:
onFrame (379,afterPlacedObjectEvents) {
loadMovieNum("music.swf",1);
}
I have a sprite with the play and stop buttons. The stop button is just a "Stop All Sounds" action, and the play button is this code:
Code:
on (release) {
loadMovieNum(music.swf,1);
}
The stop button works, but there's a 1-2 second delay that wasn't there in Swish 2.0. And the play button doesn't work at all. For some reason, the music plays in the main timeline, but not from inside the sprite. And though it does play in the main, debut shows this:
Code:
LOADING URL (GET) url="music.swf"
window=""
All of this worked fine in 2.0, so I'm assuming I just need to change my approach here. I'm willing to learn, but I'm hoping it's not too difficult, or I may have to stick with 2.0 for a while.
Any suggestions?
Thanks
Last edited by Off Top; 09-22-2005 at 12:11 AM.
"Twenty years from now you'll be more disappointed by the things you didn't do than by the ones you did."
- Mark Twain
-
Always Learning
Also, when I click the play button from inside the sprite timeline, I get an error saying:
"There are errors in this movie. See the debug panel for more information. Continue playing?"
Debug panel:
Code:
ERROR: Cannot find variable or function 'music' in statement:
Header.music.graphics.play::on (release) {
::loadMovieNum(music.swf,1)
Referenced from: "_root"
"Twenty years from now you'll be more disappointed by the things you didn't do than by the ones you did."
- Mark Twain
-
Flashkit historian
it would be "music.swf" and loading a music swf in level1 would replace the current movie with your music swf.
When you create a sprite you must name it.
(not Sprite) then use loadmovie() (which uses a sprite as oppos to loadMovieNum()
(which loads the movie into a level
If for example your Sprite name was MySprite
then your event/action would be
Code:
on (release) {
MySprite.loadMovie("music.swf");
}
-
Always Learning
Thanks for the quick response. I'm not sure I follow though. How exactly do I use that action/event? I'm used to Swish 2.0, so this is a bit confusing. I don't see an option to add "MySprite.loadMovie" for example.
Also, let's say this is a sprite inside a sprite... so it'd be "MySprite.Music.loadMovie." How do I add that action?
And finally, how do I change the loadmovie from the main timeline, so that it stops giving me this bug:
Code:
LOADING URL (GET) url="music.swf"
window=""
Thanks
"Twenty years from now you'll be more disappointed by the things you didn't do than by the ones you did."
- Mark Twain
-
Senior Member
what makes you think it's a bug? it just tells you that it's loading the movie. the same message followed by "cannot load movie" etc. would be a bug message.
i'd add this script to the play music button:
on(release) {
loadmovienum("music.swf",1);
}
stop button:
on(release) {
unloadmovienum(1);
}
-
Always Learning
Originally Posted by Lys12
what makes you think it's a bug? it just tells you that it's loading the movie. the same message followed by "cannot load movie" etc. would be a bug message.
Hi Lys12, thanks for the reponse.
I just assumed everything in the "debug" tab was a bug/error/problem. That isn't the case?
Originally Posted by Lys12
i'd add this script to the play music button:
on(release) {
loadmovienum("music.swf",1);
}
stop button:
on(release) {
unloadmovienum(1);
}
Thanks, this code works fine. There's a one-second delay on the stop button though, and not play.
Come to think of it, a few of my sound effects have a 1 second delay now. is that common from a Swish 2.0 swi?
"Twenty years from now you'll be more disappointed by the things you didn't do than by the ones you did."
- Mark Twain
-
Senior Member
i'm not quite sure what you mean with "sound effects having a delay"... could you go a bit into detail, or post an example that demonstrates the problem?
-
Always Learning
I can't post an example at the moment.. but when I press play, the music starts instantly. When I press stop, the music plays for 1-1.5 seconds before stopping.
"Twenty years from now you'll be more disappointed by the things you didn't do than by the ones you did."
- Mark Twain
-
Senior Member
and you only noticed this problem in swishmax, not swish2?
hmm. i can't really explain this behaviour. what if you add a stopallsounds() action to the stop button:
on(release) {
stopallsounds();
unloadmovienum(1);
}
is there still a delay?
-
Always Learning
same delay... I can't figure it out. Play is the only sound action that isn't delaying now
"Twenty years from now you'll be more disappointed by the things you didn't do than by the ones you did."
- Mark Twain
-
Senior Member
sure it isn't your computer? maybe you're testing and testing and have 50 browser instances stacked on top of each other (happens to me often )? try freeing some resources or even restarting...?
-
Always Learning
I just deleted some of the old tags and I'm redoing them in SwishMax.. so far, it's back to normal. Thanks for the help
"Twenty years from now you'll be more disappointed by the things you didn't do than by the ones you did."
- Mark Twain
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
|