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



Go Back   Dev Articles Community ForumsWeb DesignFlash Development

Closed Thread
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 5th, 2013, 12:42 PM
justasiam justasiam is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2009
Posts: 11 justasiam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 38 sec
Reputation Power: 0
How Do I Use an External MP3 file Without Embedding it? (AS2)

I am using Adobe Flash CS6 with ActionScript 2.0.

I have compiled my project, and due the collection of embedded mp3 files (background music) I am using on various locations, my published swf file is over 12MB.

To reduce the size, I placed all the mp3 fiels in the same folder as the swf file and removed all reference to them from the project.

I then added this code to frame #1
Code:
import flash.media.Sound; 
import flash.net.URLRequest; 
var CreditsMusic:URLRequest = new URLRequest("NineWalkers.mp3"); 
var s:Sound = new Sound(CreditsMusic);
CreditsMusic.setVolume(50);
CreditsMusic.start(0,1);

I am getting an error that says "The class or interface 'flash.net.URLRequest' could not be loaded."

Obviously, this is not working (I would not be posting here if it was).

What am I doing wrong?

Reply With Quote
Closed Thread

Viewing: Dev Articles Community ForumsWeb DesignFlash Development > How Do I Use an External MP3 file Without Embedding it? (AS2)


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