Go Back   Flash Flash Revolution > General Discussion > Chit Chat
Register FAQ Community Calendar Today's Posts Search

Closed Thread
 
Thread Tools Display Modes
Old 11-28-2006, 04:36 PM   #1
HammyMcSquirrel
Everlong
Retired StaffFFR Simfile AuthorFFR Music ProducerFFR Veteran
 
HammyMcSquirrel's Avatar
 
Join Date: Dec 2004
Location: Madison, Wisconsin
Age: 35
Posts: 3,833
Default Flash Mx 2004 ActionScript: Sound volume and Zooming

I have two questions:
1. How do you adjust the volume of a song/sound using actionscript?
2. How do you zoom using actionscript and is there a way to have that zoom follow a certain path on the stage?

In regards to question one:
First, I'll explain what I am trying to do. I have an interface that has music set as "start" and "loop" on frame 1 of its own layer inside a movie clip (I'll get into details with that later.) That is for when you click on my credits button (That leads to frame 2) and then go back to the main page (Frame 1) the music will not play overitself. I have a few shorts on the interface and what I have is a button that loads frame 3 which transitions into a second interface containing more short animations of mine.
What I am trying to do is have the volume of the song, playing on interface #1, fade out but at any point of that song since I do not have it streaming. After that, a new song will fade in for interface #2 and if I am able to get the correct actionscript for the song to fade out, I am sure I can use it to make a song fade in.

This is what I have:
_root.ssz = new Sound(song_mc);
_root.ssz.attachSound("ssz1");
_root.sszVolume=50;
_root.ssz.setVolume(sszVolume);

Using information off of a tutorial from a site I found. I put the song in a movie clip and put that movie clip (named "song_mc") on the stage and made the instance name for that "ssz". For the song file itself I made the linkage identifier "ssz1".
I am using that actionscript as a test to see if I can get this to work. If it does work, the music will be at 50% of it's normal volume from frame 1. After I get the actionscript to work, I was going to make multiple frames and just decrease the value for the volume 5 each time to give it a fading effect.
I need help finding out the problem with that actionscript and also, if there is a less tedious way to make the song fade in/out then that would be great.

EDIT: Heh, I figured out the whole volume thing pretty quickly so don't need any help with that anymore. The actionscript was correct I just had "sound_mc" instead of "song_mc". Still, if someone knows how to do the fading easier that would be appreciated. Also, I have yet to figure out the zooming actionscript.

Now for question 2:
I am not currently trying to make anything zoom right now but I have always wondered how to do this. I figured I should ask this question also in this thread since they both have something to do with actionscripting.

Thanks for taking the time to help and if anything is confusing, let me know and I will try to explain it better. I can also send the swf file to those that need a visual representation of what is going on with the two interfaces.

Last edited by HammyMcSquirrel; 01-6-2012 at 07:15 PM.. Reason: test
HammyMcSquirrel is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 09:10 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright FlashFlashRevolution