The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.36 / 5.00 33,851 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 12,195 ViewsForget it, I managed to find a somewhat roundabout way of doing this... it included root variables, nesting movieclips and a bunch of torture for a programming newb such as me but... it worked xD
EyeColorSelectorRightArrow.addEventListener(MouseEvent.CLICK , fl_ClickToChangeEyeColor01);
...
...
...
this.removeEventListener(Event.ENTER_FRAME,fl_ClickToChangeE yeColor01);
Before anyone mentions this... yeah, I just noticed that dumb move... I'm gonna change that now xD
Hello gurus and mighty flash programmers of the forum... It's been a while since I was here, so I came today with a pretty strange question today (why not?).
Basically, as the title implies... I'm trying to find out a way (if there is one, I hope) to affect an instance INSIDE another instance (or more specifically, an instance INSIDE a symbol... sorry, I sort of mix them up, but listen to my question and you'll understand my point... I guess.)
Thing is as follows:
I'm developing (or at least trying to...) a very very alpha sort of ''Dress up'' game. I created the model of this girl as a symbol composed of many other symbols inside it (like frontal hair, eyes, shoulders, arms, etc.). The animation cycle is all fine and dandy, no problem with it.
Thing is that now I want to put that symbol (the ''girl'' symbol) in the main timeline, and add (into the main timeline) two buttons (two arrows, left and right) for the user to click in order to, for now, change her eyes color from ''blue'' to ''golden'' (I want it to work like this because I'll go on adding more options from which to choose, but this serves just right as a testing of the mechanic.)
The ''girl'' symbol, among all the other symbols she's composed of, has two ''sets of eyes'' overlaped, being the first set the ''blue eyes'' at a default alpha transparency of 1, and the second set, the ''golden eyes'', at a default transparency of 0. I named both instances of both sets of eyes ''ModelBlueEyes'' and ''ModelGoldenEyes'' respectively.
Once I put the ''girl'' (with those two declared instances INSIDE her) symbol into the timeline, I created two arrow buttons, naming their instances both ''EyeColorSelectorLeftArrow'' and ''EyeColorSelectorRightArrow'' (I know it's a lengthy name, but I like knowing which thing is which clear as day so... yeah...), and then proceeded to create a simple AS3 code for it to work (I already knew it wouldn't, but I wanted to give it a shot, just for the hell of it).
My actual code for those buttons stands like this:
EyeColorSelectorRightArrow.addEventListener(MouseEvent.CLICK , fl_ClickToChangeEyeColor01);
function fl_ClickToChangeEyeColor01(event:MouseEvent):void
{
if (actualeyecolorblue==true){
actualeyecolorgolden = true;
actualeyecolorblue = false;
ModelGoldenEyes.alpha = 1;
ModelBlueEyes.alpha = 0;
this.removeEventListener(Event.ENTER_FRAME,fl_ClickToChangeE yeColor01);
}
else if (actualeyecolorgolden==true){
actualeyecolorgolden = false;
actualeyecolorblue = true;
ModelBlueEyes.alpha = 1;
ModelGoldenEyes.alpha = 0;
this.removeEventListener(Event.ENTER_FRAME,fl_ClickToChangeE yeColor01);
}
else{
}
}
EyeColorSelectorLeftArrow.addEventListener(MouseEvent.CLICK, fl_ClickToChangeEyeColor02);
function fl_ClickToChangeEyeColor02(event:MouseEvent):void
{
if (actualeyecolorblue==true){
actualeyecolorgolden = true;
actualeyecolorblue = false;
ModelGoldenEyes.alpha = 1;
ModelBlueEyes.alpha = 0;
this.removeEventListener(Event.ENTER_FRAME,fl_ClickToChangeE yeColor02);
}
else if (actualeyecolorgolden==true){
actualeyecolorgolden = false;
actualeyecolorblue = true;
ModelBlueEyes.alpha = 1;
ModelGoldenEyes.alpha = 0;
this.removeEventListener(Event.ENTER_FRAME,fl_ClickToChangeE yeColor02);
}
else{
}
}
Obviously, as soon as I intended to test it, the error messages popped up telling me that the program was unable to find where the ''ModelGoldenEyes'' and ''ModelBlueEyes'' instances where declared (since they're declared INSIDE the girl's symbol, not in the main timeline).
My question is... is there a way to tell (in AS3 language) something along the lines of: "Look, goddamit, you have to look for those instances INSIDE the instances that compose the whole of the ''girl'' symbol''? (I know it sounds rudimentary, but that was what I mummbled while scratching my head in front of the computer so... true facts...)
If the question sounds stupid or whatnot, please excuse the crudeness... I'm no programmer, so it's like writting in Ancient Noldor for me...
Anyway, thanks for your tips and help, they'll be greatly appreciated :D
Fate out!
At 1/28/13 01:52 AM, M-Vero wrote: If they didn't care about money they wouldn't have sold it, and given it out as freeware. Stop twisting things to vaguely relate to what you want to do, they are completely different things with completely different goals.
You've said what you're doing, and have gotten offers from people interested. What is the point of trying to convince people who aren't interested?
I'm not trying to convince anyone really. I just answer from my point of view to observations I can or can't agree with because it's what I feel like doing. Nobody is forcing you to give your opinion, and nobody can force me to not give my own as well, so what's your problem with me talking about an issue or topic that popped up on a thread I created?
But you know what? Fortunatelly I had (and still are) recieved offers and deals I'm evaluating alongside the artists who got interested in the proposal, so I'm more than satisfied. It's just a shame to see so many people in this site focus on the commercial point of view of art and storytelling (there are obvious exceptions of course, but this thread has shown many of these kind of people). I even haven't denied a monetary compensation, as long as it seemed reasonable for the work recieved in exchange, but all I read is demands on commercialization, focus on material profit that the project might bring as an outcome. Don't get me wrong, everyone is in their right of trying to make some kind of profit out of their work, but when the WHOLE thread is reduced to "WHAT'S THE PROFIT?" and, if there's none, "YOUR PROPOSAL IS OBSOLETE GARBAGE, GO DIE IN A FIRE" kind of comments... what can I say... it's just sad to see ALL the other aspects that a visual novel creative process implies, such as personal experience, teamwork, storytelling, artistic critique... ALL BUTCHERED by one single question:
"Where's my check".
That's it, there's no prior question. No "What's the story about", "what's the setting like", "how will my work be intended to be used inside the project", "what's the audience it aims to like", "do you have past experiences in developing teamwork"... nah, just "what's in for me", that's all I care for...
Suit yourselves guys... It's ok to want to make a living out of your art, but this is just downright moneygrubbing... I've got no interest in working with people whose only goal is to make as much profit as possible. I just wanted to create an interesting work envoirment for a creative project...
Whatever, I'll consider this thread as closed for me. Thank you and goodbye.
P.s: Curious how this problem hasn't appeared in any of the other 3 sites I posted it, mainly DA... just a curious observation.
At 1/28/13 01:06 AM, Aigis wrote:At 1/28/13 12:21 AM, Fatelogic wrote: The VN called "Tsukihime" is a nice example of that. Almost no budged, but genious content... I'm looking for people who can understand that.Tsukihime was sold though. This is a free game you're describing. There's not even the opportunity to make money once it's released.
Oh, and BTW, it was retroactive profit. If the game bombed, then no money would have been made. Goes to show the creators wanted to tell a story, regardless of the possible profit it could provide. This is the same. I want to tell a story. If it ends bombing or being a great hit, I do not know yet. But I can't promisse profit from it, just the same way Project Moon couldn't at the time.
At 1/28/13 01:06 AM, Aigis wrote:At 1/28/13 12:21 AM, Fatelogic wrote: The VN called "Tsukihime" is a nice example of that. Almost no budged, but genious content... I'm looking for people who can understand that.Tsukihime was sold though. This is a free game you're describing. There's not even the opportunity to make money once it's released.
True, but the creative process took no budget whatsoever (they even used filtered generic photos for BG). Project Moon was formed by a mere group of two or three people with no real intention of profit in the beginning. Of course, once it was released, it became such a big hit that contracts for sponsoring and even an anime representation were offered, but they didn't knew that until it happened. My point remains: money isn't necesarilly the motivational focus of every project. I'm not interested in going for what could make a profit, but what me and those who work with me might enjoy while doing it.
Come on, it's a simple concept, it can't be that hard to understand.
At 1/27/13 11:11 PM, Template88 wrote: This is exactly what i wanted to happen when I asked if you wanted to know why no one was interested.
This entire thread summarizes the reason.
Ah, and I almost forgot... you're wrong. I've already recieved a couple offers which I'm evaluating through PMs as I stated before...
So... yeah. Sorry to say, but money doesn't necesarilly runs every aspect of life... The VN called "Tsukihime" is a nice example of that. Almost no budged, but genious content... I'm looking for people who can understand that.
At 1/27/13 11:11 PM, Template88 wrote: This is exactly what i wanted to happen when I asked if you wanted to know why no one was interested.
This entire thread summarizes the reason.
Really useful observation.
At 1/27/13 07:40 PM, KiwiSundae wrote: Whatever's going on here, please stop it.
Here's how I would do it: MAKE YOUR TERMS AND CONDITIONS CLEAR FROM THE GET-GO!
Or better yet, just ask people from around the Art Forums and the Portal if they're interested in the job. Stop posting ads and just ask people. I can tell there's currently a flame war going on, and my guess is that you're not making your terms and conditions clear.
Maybe I should have clarified that I intended to answer the doubts and details this propossal might arise via personal PMs. It's just that all the proposals that came to me since I posted this did so through PMs, so I thought it was self explanatory -.-
Anyway, those reading this, just in case, please redirect your doubts and such to me through PMs ^^
At 1/27/13 07:20 PM, TurkeyOnAStick wrote:
I'd side with your argument better if you didn't resort to undermining others as "kids".
You're right. That appelative can be interpreted as agressive. I do apologize. I just lost part of my composure for a moment due to such an elaborated insult, but I should know better when to let it go.
At 1/27/13 07:08 PM, Escalus wrote: For one, you come in expecting people to work for nothing, not only that but you first say:
" if you consider yourself a decent BG artist, go on and ask whatever you feel like asking. I'll answer the best way I manage ^^"
Wrong from the start. I worked half my whole career as an illustration in exchange for promotion and opportunities to learn about my now chosen trade. Even more, I never said I wouldn't consider payment. I said that, if payment is required, it must be accessible, and the work must be worth it (40 U$D each BG becomes unaffordable for independant, non profit focused projects).
Nobody is forcing anyone to work under non desired conditions, so stop whining. If anyone doesn't like it, they can walk away without any problems. I don't hold hostages kid -.-
Okay great, someone who's "Decent" might come along and want to work for you, but what's this??
"But truth be told, unless some really friggin awesome BG artist that BLOWS MY MIND appears (which is really rare), I'm not in any position to offer a payment"
That throws out any credibility that you have as a person willing to work for, and it turns off any chances of you getting any "decent" background artist to work with you, because if a pro BG artist looked at this proposal, they will most likely laugh their asses off.
Wrong again. First of all, I'm not requiring professionals. I'm requiring people with enough skills. As I said, I'm working on a project without profit in mind. I'm sorry you only seem to care about money, but that's your choice. I really couldn't care less though. Each proposal is evaluated in terms of compatibility and quality. Again, you must be pretty easygoing with money, but I'm sorry, normal indie developers and artists have to keep their options realistic. I can't put money where I don't consider it's worth it.
But that's not the nail in the coffin here:
"paying high prices for BG is not really worth it since I can work my way out and create the BGs on my own with mixed techniques of Photoshop and SketchUp models."
If you could do it yourself, then there was no point in wasting other people's time And potential takers's time for your smut visual novel)
Wasting time? Well, you clearly are pretty free as to nitpick and complain over a request you're supposedly not interested in... besides, you know nothing of the project, so your attempts at qualificating it are just failed troll attempts. Better luck next time.
I've worked with people like you who waste the time of others only to brush them off later on because their work wasn't GOOD ENOUGH by your high standards. It's a fuckin' pain putting time and effort in something, only to hear someone say "You know what, I have the necessary skills to do it myself and you aren't needed anymore, you can forget about payment, thanks for wasting your time though"
No serious artist in his right mind would work IN ADVANCE kid. Who ever said anything like that!? Stop putting words I didn't say on my mouth... Goes to show your inexperience. I never mentioned that those interested would have to do the artworks, give them to me, and THEN IF I DECIDE THAT I LIKE THEM I AGREE OR NOT... that's just stupid, and anyone who considers that a viable way of doing a collaborative work is a newbie...
Let me explain how I've handled the proposals that came to me so far:
The artist contacts me via PM, I ask them were can I see samples of their work as to KNOW IF THEY'RE WHAT I'M LOOKING FOR, and then, if their previous works convince me that it would complement the project on a positive way, ONLY THEN I ASK THEM FOR THEIR CONDITIONS AND REQUESTS (crediting, use limitations, payment, etc.). Once they answer me, I consider the pros and cons, and then answer back telling them if I'm ok with the conditions or if they exceed my posibilities.
So, to make things clear, I NEVER WASTE ANYONE'S EFFORT IF I'M UNSURE IF I'll BE ABLE TO MAKE GOOD USE OF THEIR SKILLS. I work as an independant illustrator since 2006 more or less, so I'm totally aware of the effort it takes to create each piece. I would never consider making someone work without being able to guarantee their efforts won't go to waste, nor would I drop them midway through... that's your just self deluded paranoia... I'm sorry you had to work with such douches, but don't put me on the same box because you know jack squat about me...
All this ramble about wasting other artists effort and such sounds like resentful whining. If you have choosen your previous work partners with a poor judgement, then that's your problem. Solve it on your own, but don't drag people you don't even know into your personal bad experiences.
your proposal is bullshit, and no self respecting background artist should have to put up with people like you/
Think whatever you want, I couldn't care less. People have mind of their own. Rest assured that if someone isn't interested in the proposal, they won't bother themselves with it and move on. Just pointing out that they don't need your enlightening guidance, so stop underestimating other artists and focus on gaining more experience yourself as one.
And please, if you're not interested in the proposal (not that I'd be interested in what you'd have to offer after such an ammount of disrespectful comments), move on with your life. I created this thread with productive outcomes in mind, not useless attempts at trolling.
At 1/27/13 06:23 PM, Escalus wrote: PS: If you can do it on your own, then don't ask for others to do it for you, this just shows that you are lazy and very inconsiderate of other people willing to do work for you.
You obviously don't know what you're talking about AT ALL. First of all, yeah, I'm expecting that, in the case someone requires payment for his job, then his job must be fitting to the task. What? You want me to pay for any kind of work, regardless of how bad it could be? I don't know which rich family pampers you, but I have just the bare minimum resources to live from what I like to do. I can't throw money at half assed works, and my bet is that you wouldn't do it either, so don't come at me pretending to be the defender of the poor and absent, it reeks of troll.
Second, I said I can work my way out of it if it comes to that, something I'm trying to avoid because it would overwhelm me with all the work needed to do, and even then I know that, even if decent, there are people out there better than me at BG design. You don't talk me about lazy, kid. I've spent months working on my last game all by my own. I'm my own character designer, programmer, storywritter, sound editor, illustrator, etc. I had to learn AS3 scripting from scratch through months of hard work just to be able to cover each area needed to create a game on my own.
This search isn't intended to do ''my work for me because of lazziness". All good games are composed of a team of workers, and I'm looking for people more fitting than me who are interested in participating on a joint project. I have to handle the artistic department, the storywriting, the programming, the distribution, the sound editing... and you call me lazy? Who are you, the president of the UN...? Give me a break...
Your manners leave much to be desired kid. Don't jump into conclusions and accuse people at random just because you started the day with the wrong foot.
At 1/27/13 05:54 PM, Tomsan wrote:
is there a payment? (im not interested, but I know people wanna know)
It's debatible, but the offers I recieved till now rounded the 40U$D and above, and that's just unacceptable (unless you're a BG illustration master, and even if some of the offers were decent, they certainly weren't worth the price for each piece (by my standards, of course. Some others might differ, but that's not in discussion here.)
But truth be told, unless some really friggin awesome BG artist that BLOWS MY MIND appears (which is really rare), I'm not in any position to offer a payment, mainly because the project is intended to be released as a free game (I won't make a profit either). Besides, paying high prices for BG is not really worth it since I can work my way out and create the BGs on my own with mixed techniques of Photoshop and SketchUp models. I just wanted to see if:
1) I would be able to delegate some work (I'm doing the entire work of a whole game developement team alone).
2) If someone would be interested in aquiring collaboration experience and promotion.
Hope this cleared some of your doubts.
Well... looks like no one is interested or up to the task -.- Too bad :(
Come on guys, don't be shy... I can almost hear the crickets -.-
BTW, when I manage to get some spare time, I'll upload a couple photos I slightly altered as to give an insight about the kind of specific cityscapes needed, but still, if you consider yourself a decent BG artist, go on and ask whatever you feel like asking. I'll answer the best way I manage ^^
Ssup people. First of all, sorry for the horrendous thread title (it's that 35 character limit thingy fault -.-)
Allow me to introduce myself:
I'm Fatelogic, an anime style illustrator, and a life long Visual Novel fan. I'm here today looking for artists (digital artists if possible) who can defend themselves when it comes to Background illustration.
Thing is I'm preparing all that's needed to start a Visual Novel project, with the main ideas figured out and all the knowledge needed to create it... but my weak point is BG creation. I know how to program under Ren'Py script language (a special program focused on VN developement), I consider myself a rather good illustrator (you can check my gallery if you want), I know good sources for BGM and sound effects with free royalty and under CC license, I did two short hentai (pretty shallow storywise though) games, and I'm working over the storyline and script as we speak, so as you can see, I've got pretty much all that's needed... EXCEPT BG DESIGN SKILLS.
So basically, I'm looking for someone with good skills at background illustration (especially structural designs, such as buildings, cityscapes and such). When I say good, I really mean it. Ok, you don't need to be RK Post or Ciruello (that'd be awesome though... but that's just a dream xD), but you have to at least be able to show you know your trade ;)
The details of the storyline and such are being worked out (it's still on it's early stages), but the game will be heavily narrated on a full screen display textbox (not ADV, for those who understand what I'm talking about xD), and I'm still wondering if there will be Adult Rated content (hentai). I do not intend to make of this a mindless porn game, mind you, so take into account all those details and, if you're up for the task, contact me ;) We will figure something out.
Thanks for your time, and I await your answers!!!
Fate out!
At 1/20/13 06:41 PM, cownose-ray wrote: I still think making pornography out of a show/toy line for girls is just fucked up.
You have a point about the humanoid thing though.
People have to start to realize that pornography isn't a big deal at all...
Guys, people have libido. People fuck. If people did not fuck, we wouldn't exist as a species. Erotism is a natural thing, and erotic fantasies beyond normal pornography (be it furry, antrho, whatever) are just that, fantasies without any other implicancies than that.
If a cartoonish character turns you on, there's nothing wrong with it, as long as, when you decide to have sex IRL, you choose another human being (at their legal age too xD) with mutual consent, and not try to hump a real horse.
Judging someone's state of mind because of the material he/she uses to stimulate their fantasies (again, as long as that material isn't harmful or illegal) is just unfounded prejuidce. A cartoon won't influence you to hump a horse. If you want to hump it IRL, you were messed up beforehand. Don't blame the material.
At 1/20/13 05:59 PM, CrackerJack30 wrote:At 1/20/13 01:57 AM, Fatelogic wrote: Glad to see all that effort paid off in the end.I didn't support it or like it that much (voted 3/5) but...
For those who supported the project and/or liked the game, thanks a bunch! :D
For those who can't belive it managed to get "Daily Feature"... get over it, you'll live xD... you are right, there is nothing you have to be sorry about. No one is forced to watch anything on NG!
Fate out!Jack in! Good luck for the future!
Glad to see someone who can understand my point without becoming a zealous fan or a flaming hater ^^ That's the principle of plurality.
And for the kid who went "I fucking hate cloppers": I really don't mind cloppers. Even when I myself aren't one, what you do on your private life, as long as it isn't harmful or plainly illegal, isn't something I should judge, and neither should you (unless you wanna be labeled as a simple minded troll/hater, and with good reason).
But aside from that, humanoids aren't considered clopping material, but more like common fapping material...
... you know...
... cause they're mostly human...
Get your facts right please... it's for your own good xD
Glad to see all that effort paid off in the end.
For those who supported the project and/or liked the game, thanks a bunch! :D
For those who can't belive it managed to get "Daily Feature"... get over it, you'll live xD
Fate out!
Thanks for all the help and tips buds. However, I finally found a really simple way to solve it. I just had to set the library publication details as "merge into code". :D
I don't even know what that means/is/works xD
Ssup people. Fate here, as always. Today I have for you, oh flash gurus, a serious question, since it's breaking my brain in half and I can't seem to get it right...
Ok, let me explain a little what my problem is all about.
A while back (kinda 5 months or so), I did my very first flash game. A simple set of scenes linked by a set of buttons, nothing special. As a way to preload it, I used a preloader tutorial at "Republic of Code", and it worked fine for me. It showed a simple bar filling up until the game was fully loaded, then made a "play" button visible, and once clicked, the game started. All fine and dandy.
Since this worked well the last time, I decided to do exactly the same for the new game I'm near to complete this days. I even copied the exact same script from my last game (and made sure that all the variables were referencing objects that existed in this new game, obviously).
This is the code for the preloader used in my new game (at frame one):
stop();
this.addEventListener(Event.ENTER_FRAME, loading);
function loading(e:Event):void{
var total:Number = this.stage.loaderInfo.bytesTotal;
var loaded:Number = this.stage.loaderInfo.bytesLoaded;
barra.scaleX = loaded/total;
if (total == loaded){
play();
this.removeEventListener(Event.ENTER_FRAME, loading);
}
}
However, for my big surprise... it didn't work AT ALL.
I thought WTF!? I did exactly the same thing I did on my last game and everything was working fine! What could be the problem?
Well, it came to my attention on a later research that internal preloaders seem to fuck up when your game contains TLF text inside it. Instead of starting on the preloading screen with the bar on it's ZERO state, and gradually filling up, the game automatically uses the ''default'' loader that comes with flash CS6 (five intermitent dots over a black background... yay...). Once that shitty loader finishes... loading, of course, the game FINALLY displays my loader screen... but with the bar fully loaded (of course, the default loader took all the work), rendering my custom preloader useless.
I use TLF text as a way to display all the dialogue that takes place in the game, since it's required that the text changes it's alpha value, scale and some other things on a motion tween (like if it were a graphic symbol, for example).
Now, I'm shocked to know that the only options I've found to get around this issue were: either remove all TLF text (and replace it with something else, IDK) OR create an external preloader SWF... Dear god... It might sound simple for you guys who work with this all day, but both options are a serious problem for me... Changing all TLF text would take EONS to do, and creating an external preloader SWF is way beyond my comprehension... I've looked up for tutorials and such, but even the simpler ones look like total gibberish for me -.-
So, for now... is there a simple way to make MY customized internal preloader work instead of the Flash default "shitty dots" one without having to resort to remove my TLF text nor create an external preloader?
Thanks in advance.
At 12/21/12 04:35 PM, MintPaw wrote:
Ok, a couple things there.
"currentVol = currentVol-0.01" can be written as "currentVol -= .01"
"this.removeEventListener(Event.ENTER_FRAME, fadeMusic);" is all wrong, you have to remove the event that you added, so it'd be:
"myFadeTimer.removeEventListener(TimerEvent.TIMER, fadeMusic);"
It's really a miracle that doesn't give you an error.
Also variable don't normally start with capital letters.
What can I say... it works perfectly :s
Besides, aside from the event removal... The rest sounds a bit like nitpicking... I don't need it to be scientifically perfect, I need it to get the work done... and it does pretty well actually :D This project started as an art poll, so it's natural that it's source isn't professionally coded... the professionalism is in the imagery (well, that's what I do for a living, so yeah, kinda obvious). All the programming and such is just "secondary added value" as means to reach a wider audience (and look at my works actually moving, which is kinda cool).
And let's face it... hentai games usually are nothing more than animated sequences put together via simple buttons... the interactive value of these kind of games is the bare minimum required for it to be called "a game".
So yeah, the code might be "techincally flawed", but as long as it doesn't reflects a detriment in the playing experience, it's the same as a perfect code. It gets the work done without dragging problems along the ride.
Thanks for the tips, everybody!
Well, thanks for the hints and tips everybody ^^ I managed to create a bit of code quite simple that did the trick without problems. Here it is:
var currentVol:Number = 1;
var myFadeTimer:Timer = new Timer(25, 0);
var MusicChannelTransform = new SoundTransform();
myFadeTimer.addEventListener(TimerEvent.TIMER, fadeMusic);
function fadeMusic (e:TimerEvent):void{
if (currentVol>=.01){
currentVol = currentVol-0.01
MusicChannelTransform.volume = currentVol;
MusicChannel.soundTransform = MusicChannelTransform;
}
else{
myFadeTimer.stop();
this.removeEventListener(Event.ENTER_FRAME, fadeMusic);
}
}
myFadeTimer.start();
Yeah, it was simple to write, but I had to mix a little out of everything to figure it out xD Thanks again bros, I wouldn't have made it without your help :D
At 12/21/12 01:53 AM, MSGhero wrote: The SoundManager lib makes playing/stopping/muting/changing volume of sounds very easy. Not sure if you can fit learning how it works and changing everything into your timeframe, but it's extremely useful to learn for the future.
I'll keep that in mind, thanks. ;D
At 12/21/12 01:43 AM, MintPaw wrote: Use TweenLite or a Timer event or something to constantly apply a new SoundTransform with the volume property ranging from 1-0.
var mySound:Sound = new Sound("whatever");
var currentVol:int = 1;
var myChannel:SoundChannel = mySound.play();
var myFadeTimer:Timer = new Timer(30, 0);
myFadeTimer.addEventListener(TimerEvent.TIMER, fadeSound);
myFadeTimer.start();
function fadeSound(e:TimerEvent):void
{
currentVol -= .01;
var t:SoundTransform = new SoundTransform(currentVol);
myChannel.soundTransfrom = t;
if (currentVol <= 0)
{
myFadeTimer.stop();
}
}
If you can't figure it out PM me, it's surprisingly complex.
I think this bit of code, along with some modifications, could do the trick... I'm not sure, but for what I grasp about it, I think I can make it fit inside my already built code...
I'll try it tomorrow and post the outcome ^^ Thanks for the support.
If I'm not mistaken, this kind of explains how to alter the sound... but it doesn't make it progressive. I need to "fade out" the music channel, not just mute it. (Again, I might be missing the point... I'm a toddler at AS3, so just pasting codes isn't much of a heads up for me... It still looks like alien language to me xD)
I appreciate the help though. I'm just slow for this kinda thing... That's why I usually stick to illustration and art production xD
Hey guys! Fate here, as always. Let's get down to business cause I'm kinda in a hurry xD
I created a start menu for my game, and it plays fine and dandy. Thing is, when the menu appears, BG music starts playing (that's fine, it was intentional), here's the code for the BG music play:
var BGmusic:Sound = new mainsoundtrack();
var MusicChannel:SoundChannel = new SoundChannel();
addEventListener(Event.ENTER_FRAME, asignarcanal01);
function asignarcanal01(event:Event):void{
MusicChannel = BGmusic.play(0,9999);
this.removeEventListener(Event.ENTER_FRAME, asignarcanal01);
}
After some basic animation passes and the buttons appear, the game stops until the player picks a button. When he does (in this case, the start game button), this code enters into action:
var startgame:Boolean = false
var snd:Sound = new gamestart();
startbutton.addEventListener(MouseEvent.CLICK, start01);
function start01 ( m:MouseEvent )
{
startgame = true;
snd.play();
play();
}
Everything is going as planned. Once the start button is clicked, it emmits a "start" sound and the menu begins to fade to black to let the game begin. However, obviously, the BG music keeps playing full force as the menu fades. How do I manage to fade out the music once a button is chosen? (I mean fading out until the last frame of the menu, not just simply stop on an abrupt halt)
Sorry for the rushed explanation, but as I said, I'm kinda in a hurry, but I wanted to leave this here so maybe someone can answer this and have a solution for when I get back xD
Thanks as always for the wisdom, oh wise ones -.-
Fate out!!!
Thanks for the support guys. I think I found my way around this issue. ^^