Need help making a button driven orgasm bar.

A place for tutorials on how to get the most out of Flash

Need help making a button driven orgasm bar.

Postby Purplemantis » Thu Jan 29, 2015 6:38 pm

Hey folks. I'm an actionscript noob and would like some advice doing something for an upcoming commission.

The client wants a function where if you click a button, it will play a quick animated clip, make a displayed progress bar go up a bit, and eventually get to a looping orgasm clip after the bar's x value reaches a certain point.

I'm testing the button clicking function and I THINK it's working based on the output window...but the bar graphic isn't moving. What am I doing wrong? Fla attached.
Attachments
Click to Play
(Javascript Required)

marsorg_wip.swf [ 1.78 KiB | Viewed 1549 times ]

User avatar
Purplemantis
 
Joined: Sat Apr 13, 2013 2:53 pm

Re: Need help making a button driven orgasm bar.

Postby Anonymouse » Fri Jan 30, 2015 2:16 am

Can you post the source? (.fla)
User avatar
Anonymouse
 
Joined: Sun Nov 24, 2013 2:47 am

Re: Need help making a button driven orgasm bar.

Postby corta » Fri Jan 30, 2015 3:15 am

a .fla? not here you can't. for whatever reason..

and seeing as PMs are a 10-post premium, for.. probably a good reason
uploading it to an external file-hosting site it your best bet.

mega, mediafire. whatever.
Active Thread: [ Flash Edits ][27th July/19]
Looking to donate? I've got pages for Patreon, SubscribeStar and Paypal.me!
User avatar
corta
 
Joined: Sat Sep 25, 2010 8:43 am

Re: Need help making a button driven orgasm bar.

Postby Zeus Kabob » Fri Jan 30, 2015 4:03 am

corta Wrote:and seeing as PMs are a 10-post premium, for.. probably a good reason


Nah, we mods are just meanies who want to keep all the spam to ourselves!
User avatar
Zeus Kabob
Moderator
 
Joined: Tue Nov 16, 2010 2:16 am
Location: Between some awesome thunderheads

Re: Need help making a button driven orgasm bar.

Postby OwnerOfSuccuby » Fri Jan 30, 2015 8:56 am

What action script version do you use ? Can you post fla file - it will be more simple to say where the problem is.
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm

Re: Need help making a button driven orgasm bar.

Postby Purplemantis » Thu Feb 05, 2015 2:14 pm

Strange, for some reason I wasn't notified that someone responded to this thread. But sure here's the FLA. It is actionscript 3 btw.

Thank you guys in advance for any help you can give.
Attachments
marsorg_wip2.zip
(8.81 KiB) Downloaded 15 times
User avatar
Purplemantis
 
Joined: Sat Apr 13, 2013 2:53 pm

Re: Need help making a button driven orgasm bar.

Postby OwnerOfSuccuby » Thu Feb 05, 2015 5:15 pm

Code: Select All Code
var clickCount:int;
clickCount=1;
var temp:Number=MarsOrg.scaleX;

clickme.addEventListener(MouseEvent.CLICK, clicked);
function clicked(event:Event) {
clickCount+=1;
MarsOrg.scaleX=temp*clickCount;
if(clickCount>=11){
this.gotoAndStop(40);
}
}


Try this on the first page of your *.fla

I little do not understand how it have to work more correctly - so if you will need just write more correctly what where have to change.

By the way what version of flash do you use CS6 or 5 or what ?
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm

Re: Need help making a button driven orgasm bar.

Postby Purplemantis » Thu Feb 05, 2015 7:01 pm

Cs5
User avatar
Purplemantis
 
Joined: Sat Apr 13, 2013 2:53 pm

Re: Need help making a button driven orgasm bar.

Postby Purplemantis » Thu Feb 05, 2015 8:44 pm

OK, it's ALLLLMOST there. It functions properly if you spam the button, but if you wait between clicks, the clickCount variable resets and each subsequent click wigs out the bar from there until you start spamming again. What I need is for it to remember how many click have been done total regardless of the time in between and for the bar to not scale up the way it does after extended time between clicks.

To better illustrate how it's wigging out I did a trace thingy to track clicks and threw in a few old flvs to give a better visual of where you're at on the timeline.
Attachments
PM orgasimbar_almost.zip
(2.76 MiB) Downloaded 18 times
Click to Play
(Javascript Required)

marsorg_wip3.swf [ 1.4 MiB | Viewed 1457 times ]

User avatar
Purplemantis
 
Joined: Sat Apr 13, 2013 2:53 pm

Re: Need help making a button driven orgasm bar.

Postby OwnerOfSuccuby » Fri Feb 06, 2015 8:18 pm

Some thing like that ? I little change structure of your flash.

Do it have to make bar go to 0 too ? Or i little do not understand you again ?
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm

Re: Need help making a button driven orgasm bar.

Postby Purplemantis » Mon Feb 09, 2015 2:24 am

It should start at 0, but it should not return to 0/shrink when it loops back to the neutral animation. Like if I click it once, it should remember I've clicked once and got to two and so on the next time I click it. The player shouldn't have to spam the button to get the bar all the way up. The bar/number is not supposed to reset.
User avatar
Purplemantis
 
Joined: Sat Apr 13, 2013 2:53 pm

Re: Need help making a button driven orgasm bar.

Postby Purplemantis » Mon Feb 09, 2015 2:41 am

I found the issue.

There was a line within the middle movieclip that told the counter to reset to "0". I just deleted that and it functions properly now!

Thank you so much for your help OwnerofSuccby. I owe you one! :D
Attachments
Click to Play
(Javascript Required)

TestCS5_working.swf [ 1.36 MiB | Viewed 1408 times ]

User avatar
Purplemantis
 
Joined: Sat Apr 13, 2013 2:53 pm


Return to Tutorials



Who is online

Users browsing this forum: No registered users