×

Discussion Board

Results 1 to 9 of 9

Thread: Time line Audio

  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    44

    Time line Audio

    Hi,
    I am designing an lip synchronization animation in flash lite with audio on an separate time line. when i exist this movie clip and return to home screen the audio continuous to play in the background. Is there any way to stop the audio playing in background.

    Regards,
    Elmi.
    Last edited by elminator; 2010-04-27 at 05:26.

  2. #2
    Registered User
    Join Date
    Oct 2005
    Posts
    107

    Re: Time line Audio

    if you put in more details and some code snippets, then maybe we can help.

    Ramesh

  3. #3
    Registered User
    Join Date
    Apr 2010
    Posts
    44

    Re: Time line Audio

    Hi Ramesh,
    Thanks again for your reply... See i am developing an Video app there are around 50 videos.... So i decided to cut the audio form the video and play in the timeline in flash and above in a different timeline i am swapping images at different intervals which looks almost as if video is playing. I was able to achieve this poc and reduce the file size by 40 %. But since the audio playing in the timeline if i remove this movie and attach the main movie clip the sound is still playing in the background... Please help me how to solve this issue.. If its still not clear will try to put the code...

    Regards,
    Elmi...

  4. #4
    Registered User
    Join Date
    Oct 2005
    Posts
    107

    Re: Time line Audio

    Thats interesting. Can you put the code for controlling audio.

    Ramesh

  5. #5
    Registered User
    Join Date
    Apr 2010
    Posts
    44

    Re: Time line Audio

    Hi Ramesh,
    Thats were I need you help. I have sound in one timeline and animation in another timeline. I need codes for Rewind Pause Forward and Play for controlling the sound on the time line. Please help me our in this issue since its an totally new concept and will help to achieve large video apps keeping memory issue under consideration...

    Regards,
    Elmi..

  6. #6
    Registered User
    Join Date
    Oct 2005
    Posts
    107

    Re: Time line Audio

    Sorry, I am unable to visulaize your concept. Can you share some code?

    Ramesh

  7. #7
    Regular Contributor
    Join Date
    Aug 2009
    Location
    Bangalore, India
    Posts
    454

    Re: Time line Audio

    Quote Originally Posted by elminator View Post
    Hi,
    I am designing an lip synchronization animation in flash lite with audio on an separate time line. when i exist this movie clip and return to home screen the audio continuous to play in the background. Is there any way to stop the audio playing in background.
    Try to call Stop() / Cancel() / Close() functions of that Audio player or any Timer if you are using when you are "returning to home screen"
    Regards,
    Sunitha.M

  8. #8
    Registered User
    Join Date
    Apr 2010
    Posts
    44

    Re: Time line Audio

    Hi Ramesh,
    Thanks a lot for your help i tried load method its not working I think its not supported in Flash Lite... Is there any other method to load images form library to empty movie clip or I have an empty movie clip on stage called Holder can i load images to that.. Below is the code for playing audio and swapping images on the stage.. All the option are working fine if except rewind and forward. I have created converted all the images to movie clip and added to stage...

    myMusic = new Sound(myMusicMc);
    myMusic.attachSound("myMusic01");
    myMusicVolume = 100;
    myMusic.setVolume(myMusicVolume);

    _root.holder.load("S1", "S1", this.getNextHighestDepth());

    this.onEnterFrame = function ()
    {
    var _loc1 = _root;
    myMusicDurationText = _loc1.myMusic.duration / 1000;
    myMusicPositionText = _loc1.myMusic.position / 1000;
    //Reverse
    if (REV==1 && myMusicPosition>0) {
    _root.myMusic.stop("myMusic01");
    myMusicPosition=myMusicPosition-.5;
    //The .5 is the decremented amount.

    _root.myMusic.start(myMusicPosition,0);
    }
    revButton.onPress = function () {
    REV=1;
    myMusicPosition=_root.myMusic.position/1000;
    //
    }
    revButton.onRelease = function () {
    REV=0
    }
    //Fast Forward
    if (FF==1 && myMusic.position < myMusic.duration) {
    _root.myMusic.stop("myMusic01");
    myMusicPosition=myMusicPosition+.5;
    //The .5 is the incremented amount.

    _root.myMusic.start(myMusicPosition,0);
    }
    FFButton.onPress = function () {
    FF=1;
    myMusicPosition=_root.myMusic.position/1000;
    }
    FFButton.onRelease = function () {
    FF=0
    }

    //***************************************************************************


    if (playing==true && myMusic.position/1000 >= 0.1 && myMusic.position/1000 <= 9.9) {
    _root.holder.attachMovie("Screen1", "Screen1", this.getNextHighestDepth());
    }
    //5
    if (playing==true && myMusic.position/1000 >= 10 && myMusic.position/1000 <= 29.9) {
    _root.holder.attachMovie("Screen2", "Screen2", this.getNextHighestDepth());
    }
    //6
    if (playing==true && myMusic.position/1000 >= 30 && myMusic.position/1000 <= 39.9) {
    _root.holder.attachMovie("Screen3", "Screen3", this.getNextHighestDepth());
    }
    //7
    if (playing==true && myMusic.position/1000 >= 40 && myMusic.position/1000 <= 49.9) {
    _root.holder.attachMovie("Screen4", "Screen4", this.getNextHighestDepth());
    }
    //8
    if (playing==true && myMusic.position/1000 >= 50 && myMusic.position/1000 <= 59.9) {
    _root.holder.attachMovie("Screen3", "Screen3", this.getNextHighestDepth());
    }
    //9
    if (playing==true && myMusic.position/1000 >= 60 && myMusic.position/1000 <= 69.9) {
    _root.holder.attachMovie("Screen2", "Screen2", this.getNextHighestDepth());
    }
    //10
    if (playing==true && myMusic.position/1000 >= 70 && myMusic.position/1000 <= 79.9) {
    _root.holder.attachMovie("Screen1", "Screen1", this.getNextHighestDepth());
    }

    }

  9. #9
    Nokia Developer Champion
    Join Date
    Jul 2008
    Location
    Pakistan
    Posts
    1,065

    Smile Re: Time line Audio

    I found a little statement which may causing the issue. Just replace this line :
    Code:
    _root.myMusic.stop("myMusic01");
    with this :
    Code:
    _root.myMusic.stop();
    However, I suggest u to do some debugging and find out that where the exact problem is. Its only u who can find a solution quickly. Moreover, u can try reading this article :
    Fast-Forward-and-Rewind
    It surely helps u as the demonstration is working fine for me on Flash Lite 3.0.
    Is there any other method to load images form library to empty movie clip or I have an empty movie clip on stage called Holder can i load images to that.
    The only famous way to load images in flash lite is by converting an image to movie clip and than attaching the movie clip from library to stage by using :
    attachMovieClip API
    The other way i.e using BitmapData is not supported in Flash Lite 3.0 but may work fine with Flash Lite 3.1. Wish u Luck..

    Best Regards,
    SajiSoft

Similar Threads

  1. [REQ App] Capture Key, Brightness solution!
    By rilley in forum Symbian
    Replies: 24
    Last Post: 2010-04-11, 21:32
  2. pjsip on carbide c++
    By rams.vundela in forum Symbian
    Replies: 5
    Last Post: 2010-03-04, 07:12
  3. [moved] HELP! Phone Debug (GCCE)
    By joseph.m in forum Symbian
    Replies: 18
    Last Post: 2008-07-14, 10:42
  4. carbide build problem help please
    By berkcekisbas in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2006-09-26, 19:41
  5. problem with codewarrior 5.2
    By mayankkedia in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2004-09-27, 16:08

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×