TheElSalvador's Banner

TheElSalvador

Reviews Favorites Art Audio Flash News Main
TheElSalvador

Age/Gender: 54, Male

javascript:account_e dit.Edit();

Newgrounds Stats

Sign-Up Date:
11/6/07

Level: 21
Aura: Dark

Rank: Portal Security
Blams: 215
Saves: 196
Rank #: 22,973

Whistle Status: Normal

Exp. Points: 4,630 / 4,900
Exp. Rank #: 5,947
Voting Pow.: 6.28 votes

BBS Posts: 41 (0.03 per day)
Flash Reviews: 63
Music Reviews: 2
Trophies: 0

Latest News

TheElSalvador

Fuckity fuck(need as3 help of the .as variety!)

Posted by TheElSalvador Dec. 13, 2011 @ 7:02 PM EST

So I built a game using a generic framework with .as files. I can upload the .swf just fine but the mp3 files cannot load. Is there a way I can URLRequest the pages that the songs are on (they're all in the audio portal.)? I have only used local mp3 files thus far so I guess I'm not sure what is possible when loading from a URL.

Basically it looks something like this(focusing on the sounds only)
package{
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.net.URLRequest;

Main{
private var sc:SoundChannel;
}

private function addGameScreen():void {
var gameTune:Sound = new Sound(new URLRequest("gameTune.mp3"));
sc=gameTune.play(0, 99);
blah blah
blah blah
}

Can I do something to the addGameScreen function to make it load from the audio portal or is that beyond the realm of possibility?

(Basic framework of the game just in case it matters):
-Folder containing the following<
myGame.fla
Main.as[framework for the game and music control]
Game.as[bulk of the game's code]
Enemy.as[blah blah]
Bullet.as[blah blah blah]
song1.mp3
song2.mp3
song3.mp3
song4.mp3>

I can post my main.as in it's entirety if it helps resolve this.

All News Posts 1 comment | Log in to comment! | Share this!

Favorite Art