Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

add sound

Explorer ,
Aug 03, 2023 Aug 03, 2023

Hi Guys

 I managed to get all my buttons work correctly. now i need some help with sound/music. I need the title music to play at the start of my project frames 1-28 where my first bit of frame by frame animation runs with it. But when I test project the animation runs ok but no music. But when i press button to go to another part of the project and return to home page the animation plays ok again and the music to but only for the duration of the short  animation. I need the music the keep playing in that area 1/28 until the user press a button and move on.

Help! AlanYScreenshot 2023-08-03 134220.png

18.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 20 Correct answers

Community Expert , Aug 03, 2023 Aug 03, 2023

put a stop() in your first frame and an intro message along with a button/movieclip to click to trigger your timeline to play().

 

(user's have to interact with browser files to permit sound to play.)

Translate
Explorer , Aug 16, 2023 Aug 16, 2023

Hi I got the start button working ok.plays the animation to frame 28 and stop thats what I want. But I would like to have the musicto play at the same time and keep it confined inbetween frames 1 and 28 if that is possible!

 

Translate
Community Expert , Aug 16, 2023 Aug 16, 2023

it would be easier for you to add your start button to frame 1 and then put your sound on frame 2.

 

but you can start your sound with code on frame 1, if that's what you want to do.

Translate
Explorer , Aug 17, 2023 Aug 17, 2023

That works to keep the sound in 1-28 but the sound now stops playing at 28. Would like the music to keep playing the hole music at 28 until the user clicks another button to take them out of that area.

 

Translate
Community Expert , Aug 22, 2023 Aug 22, 2023

yes, those are the sound functions.  but you don't want to call start_soundF() until you want the sound to start and you don't call stop_soundF() until you want the sound to stop.

 

double click the linkage field > enter soundId (uppercase i, 9th letter in alphabet)

kglad_0-1692718566532.png

 

Translate
Community Expert , Aug 22, 2023 Aug 22, 2023

double click to the right of the highlighted box shown in your screenshot.

 

kglad_0-1692720024406.png

 

Translate
Community Expert , Sep 04, 2023 Sep 04, 2023

the listener function call and function name don't match. ie, 

 

fl_ClickToGoToAndStopAtFrame_6

 

is not the same as

 

fl_ClickToGoToAndStopAtFrame6

 

ie, change one of them so they match.

Translate
Community Expert , Sep 04, 2023 Sep 04, 2023

excellent news!!!!

Translate
Community Expert , Sep 05, 2023 Sep 05, 2023

to close the browser tab, window.close();

Translate
Community Expert , Sep 07, 2023 Sep 07, 2023
NativeApplication.nativeApplication.exit(); 

 

Translate
Community Expert , Sep 10, 2023 Sep 10, 2023

you need to assign the linkage id to your library sound.

Translate
Community Expert , Sep 10, 2023 Sep 10, 2023

are you calling start_soundF()?

Translate
Community Expert , Sep 12, 2023 Sep 12, 2023

check the publish folder.  there's probably an exe.

 

if not, change your target, too.

Translate
Community Expert , Sep 12, 2023 Sep 12, 2023

it's in the output name field path which in your screenshot is the same as the folder where you're saving your fla.

Translate
Community Expert , Sep 20, 2023 Sep 20, 2023

you have to use a non-self signed digital certificate, https://help.adobe.com/en_US/air/build/WS5b3ccc516d4fbf351e63e3d118666ade46-7ff0.html

Translate
Community Expert , Sep 24, 2023 Sep 24, 2023

the same code will work for all air (desktop, ios, android) versions.

Translate
Community Expert , Sep 25, 2023 Sep 25, 2023

nice.  you're doing your own troubleshooting.

Translate
Community Expert , Sep 27, 2023 Sep 27, 2023

(it's definitely getting easier to help you.)

Translate
Community Expert , Sep 29, 2023 Sep 29, 2023

@Alan5E07 

 

that apk (=android package file) is the installer file.

Translate
Community Expert , Oct 02, 2023 Oct 02, 2023

contact apple support for help.  

 

p.s. did you pay the $100+?

Translate
replies 188 Replies 188
Community Expert ,
Aug 19, 2023 Aug 19, 2023

remove it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 19, 2023 Aug 19, 2023

ok I'v removed the sound

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 19, 2023 Aug 19, 2023

and did you use start_soundF() and stop_soundF() to start and stop your sound?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 21, 2023 Aug 21, 2023

yes I did that

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 21, 2023 Aug 21, 2023

I pasted it into the frsit frame of my sound/music

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 21, 2023 Aug 21, 2023

copy and paste here the code that's failing.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 21, 2023 Aug 21, 2023

still not playing the hole

Alan5E07_0-1692634437884.png

 

tune

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 21, 2023 Aug 21, 2023

sound still cuts off after the 10 second animation stops I am trying to keep the playing untill it stops or the user clicks a button to go out of the area

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 21, 2023 Aug 21, 2023

where are the 2 sound functions?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 22, 2023 Aug 22, 2023

Not sure about sound functions that you mean can you expand on that

 

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 22, 2023 Aug 22, 2023

Is this the sound functions 

Alan5E07_0-1692700822872.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 22, 2023 Aug 22, 2023

cant get the linkage to work with the music file

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 22, 2023 Aug 22, 2023

yes, those are the sound functions.  but you don't want to call start_soundF() until you want the sound to start and you don't call stop_soundF() until you want the sound to stop.

 

double click the linkage field > enter soundId (uppercase i, 9th letter in alphabet)

kglad_0-1692718566532.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 22, 2023 Aug 22, 2023

My interface looks different to yours when I double click the linkage button nothing hapens.

Alan5E07_0-1692719771861.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 22, 2023 Aug 22, 2023

double click to the right of the highlighted box shown in your screenshot.

 

kglad_0-1692720024406.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 22, 2023 Aug 22, 2023

Got it 

Alan5E07_0-1692720378274.png

Now I think I mite have to rearange the stop and start codes

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 22, 2023 Aug 22, 2023

exactly.  the functions, place on frame 1.

 

the stop and start call locations are critical to do exactly what you want.  well, the start_soundF() should go in frame one because that's when/where you want your sound to start.  but stop_soundF() needs to go in a location where/when you trigger the movement out of frames 1-28.  eg, that will probably be in a button listener.  or the way you've coded, that may require placement in many button listeners.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 22, 2023 Aug 22, 2023

logging of for tonight thanks for all your help so far.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 22, 2023 Aug 22, 2023

sleep well...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 24, 2023 Aug 24, 2023

Hiya music starts ok at 1 but still stops at 28 only lasts for aproximated 10 seconds and I would like it to keep playing untill the user clicks a button to go out of the area.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 24, 2023 Aug 24, 2023

then add stop_soundF() only to your button listener(s) that "go out of the aread".

 

again, the stop and start call locations are critical to do exactly what you want.  well, the start_soundF() should go in frame one because that's when/where you want your sound to start.  but stop_soundF() needs to go in a location where/when you trigger the movement out of frames 1-28.  eg, that will probably be in a button listener.  or the way you've coded, that may require placement in many button listeners.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 24, 2023 Aug 24, 2023

Put this code in the 7 buttons that go out of the area 1-28

Alan5E07_0-1692896618706.png

but still the music stops at 28 only plays for 10 seconds!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 24, 2023 Aug 24, 2023

are the stop _soundF() ONLY in your button listeners????

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 24, 2023 Aug 24, 2023

To tell you the truth I'm not to sure what a button listener is but if its the 7 buttons that go out of the area then the answer is yes

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 24, 2023 Aug 24, 2023

This my help for you to undersand what I have pasted in

Alan5E07_0-1692899603572.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines