AS3 - Sounds and Mouse trails

This is a discussion on "AS3 - Sounds and Mouse trails" within the Flash & Multimedia Forum section. This forum, and the thread "AS3 - Sounds and Mouse trails are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices


Reply
 
LinkBack (1) Thread Tools
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old Nov 1st, 2007, 19:57
1840dsgn's Avatar
SuperMember

SuperMember
Join Date: Jun 2007
Location: Canterbury
Age: 19
Posts: 717
Thanks: 0
Thanked 0 Times in 0 Posts
AS3 - Sounds and Mouse trails

Hi,

I'm working on a Flash project for Uni and have hit a bump.

I'm using AS3 and I'm not at all familiar with the language.

I'm trying to implement some sound buttons and so far I have:

Code: Select all
var request:URLRequest = new URLRequest("loop.mp3");
var sound:Sound = new Sound(request);
var soundChannel:SoundChannel = sound.play();
var soundPosition:Number;

function pause_Btn_Listener(event:MouseEvent):void {
    soundPosition = soundChannel.position;
    trace("position : " + soundPosition);
    soundChannel.stop();
}
    
function play_Btn_Listener(event:MouseEvent):void {
    soundChannel = sound.play(soundPosition);
}
Now it works perfectly but I need the track to loop.

I've tried this sound.play(0,9999); but it doesn't work and still cuts out after 20seconds which is the length of the sound clip.

Also, has anyone got a tutorial or a example of a mouse trail in AS3 I can find loads for AS2 but none really for as 2, I just want like a small trail of fading circle behind the mouse.

Thanks for any help.

Mike
Reply With Quote

  #2 (permalink)  
Old Nov 1st, 2007, 20:55
marSoul's Avatar
Moderator
Join Date: Sep 2007
Location: Tehran - Iran
Age: 28
Posts: 409
Blog Entries: 2
Thanks: 3
Thanked 4 Times in 4 Posts
Send a message via MSN to marSoul Send a message via Yahoo to marSoul
Re: AS3 - Sounds and Mouse trails

I think you should use mysound.start(0,99999) for looping not play method.
__________________
Designing For Communicating
Website : http://www.datisdesign.com
Weblog : http://blog.datisdesign.com

Last Blog Entry: Throughout IRAN (Dec 10th, 2007)
Reply With Quote
  #3 (permalink)  
Old Nov 1st, 2007, 21:03
1840dsgn's Avatar
SuperMember

SuperMember
Join Date: Jun 2007
Location: Canterbury
Age: 19
Posts: 717
Thanks: 0
Thanked 0 Times in 0 Posts
Re: AS3 - Sounds and Mouse trails

ok ill try it thanks
Reply With Quote
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.webforumz.com/flash-and-multimedia-forum/61867-as3-sounds-and-mouse-trails.htm
Posted By For Type Date
Making Mouse Trails Flash Tutorial This thread Refback Feb 4th, 2008 17:47

Similar Threads
Thread Thread Starter Forum Replies Last Post
free sounds ahwell Flash & Multimedia Forum 4 Nov 22nd, 2007 12:22
Sounds for flash site. Lassjus Flash & Multimedia Forum 5 Nov 20th, 2006 17:24
Mousever sounds? autumn_whispers2me Flash & Multimedia Forum 2 Nov 23rd, 2004 13:58
Sounds gwx03 Flash & Multimedia Forum 11 Nov 8th, 2003 08:05
Playing Audio Sounds djaccess Web Page Design 6 Sep 29th, 2003 12:03


All times are GMT. The time now is 20:21.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43