inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Sept 14, 2010 8:29:32 GMT -8
Hey everyone, I'm basically looking to see if someone can see whats causing the scroller (only done for male section so far) to jump on this dress up game I'm setting up megaswf.com/serve/47342/My action script is as follows var scrollUpper:Number = 275; var scrollLower:Number = 512;
var mBodyLower:Number = 212; var mBodyUpper:Number = 663;
var scrollRange:Number = scrollLower - scrollUpper; var mBodyRange:Number = mBodyLower - mBodyUpper;
function scroll () { var moved:Number = scroll_mc._x - scrollUpper; var pctMoved:Number = moved/scrollRange; var mBodyMoved:Number = pctMoved*mBodyRange; male_mc._x = mBodyUpper - mBodyMoved }
scroll_mc.onPress = function () { this.startDrag(this,false,scrollUpper,this._y,scrollLower,this._y); this.onMouseMove = scroll; } scroll_mc.onRelease = scroll_mc.onReleaseOutside = function () { this.stopDrag(); this.onMouseMove = null; }
This was initially taken off a tutorial for a vertical scroller so if that Is the problem is there any way to edit this so that it acts on the x axis rather then the y axis?
|
|
inherit
12045
0
Nov 19, 2012 14:52:05 GMT -8
Renegade
As unique as mice pudding milkshake
40,557
August 2003
renegade
|
Post by Renegade on Sept 15, 2010 14:23:59 GMT -8
In the onpress for the mc replace the first line with this: this.startDrag(false,scrollUpper,_y,scrollLower, _y); You have an extra 'this' in there in your version (so I don't know how you even managed to compile it ).
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Sept 15, 2010 22:05:25 GMT -8
Okay - will do and will get back to you
------
Also there's the minor problem of is it possible to get buttons to work on the stage from within the movie clip?
|
|
inherit
12045
0
Nov 19, 2012 14:52:05 GMT -8
Renegade
As unique as mice pudding milkshake
40,557
August 2003
renegade
|
Post by Renegade on Sept 16, 2010 2:20:28 GMT -8
Whut do you mean?
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Sept 16, 2010 10:43:57 GMT -8
Okay basically I have inside the movie clip that's scrolly invisible buttons set over each one. They each have to link to a different frame. The usual on(press){ gotoAndStop(4); } isn't working, is there something I have to do different?
|
|
inherit
12045
0
Nov 19, 2012 14:52:05 GMT -8
Renegade
As unique as mice pudding milkshake
40,557
August 2003
renegade
|
Post by Renegade on Sept 16, 2010 10:46:39 GMT -8
If the frame is inside the same movieclip, it would work fine like that.
If the frame is on the stage it would be _root.gotoAndStop(4).
Although its better to avoid frame based coding if you can.
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Sept 16, 2010 11:53:59 GMT -8
okay - I'll try the _root.gotoAndStop code
I, alas, am limited to solely what my tutor has taught me
|
|
inherit
12045
0
Nov 19, 2012 14:52:05 GMT -8
Renegade
As unique as mice pudding milkshake
40,557
August 2003
renegade
|
Post by Renegade on Sept 16, 2010 12:16:56 GMT -8
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Sept 16, 2010 21:22:44 GMT -8
I play on the CMS and Saybox games a lot I have to admit ^_^
This is just a simple dress up game for my pokemon rpg so that people can fill in the character sheet and HOPEFULLY keep their characters with same style as everyone elses
|
|
inherit
12045
0
Nov 19, 2012 14:52:05 GMT -8
Renegade
As unique as mice pudding milkshake
40,557
August 2003
renegade
|
Post by Renegade on Sept 17, 2010 4:15:33 GMT -8
you do? that's awesome ;d
Did you get everything working now?
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Sept 17, 2010 5:58:54 GMT -8
I did - I do have a question. Without relying on movie clip frame jumping then I'm assuming an on(press){ _root.this(startdrag) } to drag items onto the model on stage is there any other way to allow items to be used to dress up to be displayed solely based on what button is clicked on?
|
|
inherit
12045
0
Nov 19, 2012 14:52:05 GMT -8
Renegade
As unique as mice pudding milkshake
40,557
August 2003
renegade
|
Post by Renegade on Sept 17, 2010 6:11:12 GMT -8
You can't use _root with 'this'. 'This' refers to the current object. for your example it would be startDrag(this)
If frame jumping is working okay then you might as well stick with it now. Personally i would probably use the _visible property for things you can only have one of, and duplicateMovieClip for items you can make more of, like sparkles or something.
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Sept 17, 2010 6:12:17 GMT -8
Okay I was more wondering if there was a more efficient way
|
|