PDA

View Full Version : My first Project, 2 Problems with, Background Music ;)


Elena
11-18-2006, 09:44 AM
Hi to all

This is my first Project, that I have tryed with AM6. I would like to see, what is all possible to do with this Application.

I have done allot with the Idees and Tips from this board here very well.
Some Idee helping me allot.;)
So, still now I have 2 problems: :o :huh

First:
If I make a Publish>Preview...
The Backgound Sound start and play.
If I Publish>Build... my project, the Background Sound dosn't start.

Second:
I have a Audio-Icon-Button left on the bottom, if I click once the sound stop, if I click again the sound play. This works no problem.
But I have more than one pages/sites.
I would like that show me on every page the Icon "Sound Aus.png" if is the sound off and the Icon "Sound Ein.png" if is the sound on?
I appreciate any Idee, time and effort!
And sorry for my bad english grammar, it is not my mother language. I hope someone understand me.

Here my project file:
http://www.sendspace.com/file/qp26of

Have a nice weekend, and I thank you for any answer, time and effort and reading my thread.

Elena

jfxwave
11-18-2006, 01:36 PM
I'm no expert but you should have all the codes pointing to "image1" on each page or better said name the images the same for each page.


Do a VIR so the it will pass on to the next page.

if Math.Mod(nClickCtr, 2) == 0 then
-- Load the image for even count clicks
Image.Load("Image1", "AutoPlay\\Images\\Sound Ein.png");
-- other code to turn music on here
Audio.TogglePlay(CHANNEL_ALL);
soundpic = 0;
else
-- Load the image for even odd clicks
Image.Load("Image1", "AutoPlay\\Images\\Sound Aus.png");
-- other code to turn music off here
Audio.Stop(CHANNEL_ALL);
soundpic = 1;

end

then add this to each page preload.

if soundpic == 0 then
Image.Load("Image1", "AutoPlay\\Images\\Sound Ein.png");
else
Image.Load("Image1", "AutoPlay\\Images\\Sound Aus.png");
end

The sound starts/plays fine when i build and run the app.

Elena
11-21-2006, 01:52 PM
@jfxwave

Mea culpa, sorry for may late answer, 10q for your effort and time.
I have tryed that what you wrote.

I put this code on every Sound Button each site:

if Math.Mod(nClickCtr, 2) == 0 then
-- Load the image for even count clicks
Image.Load("SoundEin", "AutoPlay\\Images\\Sound Ein.png");
-- other code to turn music on here
Audio.TogglePlay(CHANNEL_ALL);
soundpic = 0;
else
-- Load the image for even odd clicks
Image.Load("Image1", "AutoPlay\\Images\\Sound Aus.png");
-- other code to turn music off here
Audio.Stop(CHANNEL_ALL);
soundpic = 1;

end

And I put this script on each site "On Preload":
if soundpic == 0 then
Image.Load("SoundEin", "AutoPlay\\Images\\Sound Ein.png");
else
Image.Load("Image1", "AutoPlay\\Images\\Sound Aus.png");
end

But now the same problem, if I Publish>Preview...
the sound comes on start.

and if I Publish>Build...
the sound dosn't come!

The sound starts/plays fine when i build and run the app.
If you tryed this with my projection file?

So long

Elena