Flash

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized Forums2D GraphicsFlash

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old February 22nd, 2012, 05:04 AM
SoulSketch SoulSketch is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Feb 2012
Posts: 7 SoulSketch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 7 m 22 sec
Reputation Power: 0
Audio problem in Preview (swf in dreamweaver)

Hey there dreamweavers!

Im quite new to the forum and to flash for that matter. Im pretty advanced in html/css, and hoping to learn more about php as time goes along.

So here is my problem:

Im making a website for a band, and i got the layout set but they want to have some audio played on the page. I know the usual skins for audio and dont like those much, eighter too big or too clumpsy. Considdering im new to Action Script, i thought like 3.0 from the start so i go with time as i progress in Flash.

Found a nice tutorial on how to create some features in a mp3 player ill post it below so you guys can see the flash script. i basically want to have it like (play/stop button) "Artist - Name Song" i guess thats fairly easy. So i made it and it runs perfectly in flash (the play/stop button) import it in Dreamweaver it adds the flashscript perfectly without errors but here is the thing.

When i open up the preview/debug window, i can see the skin of my player, i can see i can press it, but no sound. Maybe you guys know about the problem?

i dont know if i should post my actionscript between brackets or something, so if i do then im sorry i didnt, here is my script:

import flash.events.MouseEvent;
import flash.media.Sound;
import flash.net.URLRequest;
import flash.media.SoundChannel;

var myMusic:Sound = new Sound();
var soundFile:URLRequest = new URLRequest("./music/crossfire.mp3");
var channel:SoundChannel = new SoundChannel();
myMusic.load(soundFile);

btnPlay.addEventListener(MouseEvent.CLICK, playMusic);
btnStop.addEventListener(MouseEvent.CLICK, stopMusic);

function stopMusic(evt:MouseEvent):void {
channel.stop();
}

function playMusic(evt:MouseEvent):void {
channel = myMusic.play()
}


Hope you guys can help, SoulSketch.

Last edited by SoulSketch : February 22nd, 2012 at 05:07 AM.

Reply With Quote
  #2  
Old February 24th, 2012, 06:02 PM
SoulSketch SoulSketch is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Feb 2012
Posts: 7 SoulSketch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 7 m 22 sec
Reputation Power: 0
Fixed

Fixed the Problem

Reply With Quote
Reply

Viewing: Tutorialized Forums2D GraphicsFlash > Audio problem in Preview (swf in dreamweaver)


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap