Topic closed
yambanshee wrote:
Thanx! that helps me alot! another question, can you post a flash document without using something like newgrounds, for example, embeding it into this post? one more, how do i make textboxes move? i made a sort of scrolling effect with everything that shouldent scroll counteracting the scrolling by moving their x and ys, however textboxes with things such as score, life ect... still move.
While im at it, does flash have colour sencing?
1. Yes you can but not in forums. Use http://spamtheweb.com
2. Put the text boxes in MovieClip symbols
3. Yes it does I think, but it is part of bitmap data which is hard to use. Shapeflag hitTests eliminate the need for colour sensing though. Colour sensing isn't that useful in scratch either. I usually only use it for detecting things that are stamped because I can't interact with it any other way.
Offline
thanks! I need to go resurch some shapeflag hit tests!
Offline
http://spamtheweb.com/ul/upload/051108/24349_RPG-scroll.php
Offline
yambanshee wrote:
http://spamtheweb.com/ul/upload/051108/24349_RPG-scroll.php
![]()
Nice!
Offline
archmage wrote:
yambanshee wrote:
http://spamtheweb.com/ul/upload/051108/24349_RPG-scroll.php
![]()
Nice!
thanks!
could you tell me whats wrong with this code?
on (release) { if (_root.level=1) { gotoAndStop(8); } if (_root.level=2) { gotoAndStop(9); } if (_root.level=3) { gotoAndStop(10); } if (_root.level=4) { gotoAndStop(3); _root.level == 1; } }
its for a button, every level is on a difrent frame and the level does change its value after every level is completed, yet it always goes back to level 1 (frame 3)
Offline
on (release) {
if (_root.level=1) {
_root.gotoAndStop(8);
}
if (_root.level=2) {
_root.gotoAndStop(9);
}
if (_root.level=3) {
_root.gotoAndStop(10);
}
if (_root.level=4) {
_root.gotoAndStop(3);
_root.level = 1;
}
}
Try that.
And remember == checks to see if 2 values are equal while = sets a value which is was you meant to use.
Last edited by archmage (2008-11-05 09:08:21)
Offline
archmage wrote:
on (release) {
if (_root.level=1) {
_root.gotoAndStop(8);
}
if (_root.level=2) {
_root.gotoAndStop(9);
}
if (_root.level=3) {
_root.gotoAndStop(10);
}
if (_root.level=4) {
_root.gotoAndStop(3);
_root.level = 1;
}
}
Try that.
And remember == checks to see if 2 values are equal while = sets a value which is was you meant to use.
thanks, I keep making silly little mistakes like forgeting _root.s :S
Offline
Hey, could you tell me whats wrong with this script?
onClipEvent (enterFrame) {
if (_root.life == 0) {
gotoAndStop(3);
}
}
when life =0 nothing happens? (frame 3 exists)
Offline
yambanshee wrote:
Hey, could you tell me whats wrong with this script?
onClipEvent (enterFrame) {
if (_root.life == 0) {
gotoAndStop(3);
}
}
when life =0 nothing happens? (frame 3 exists)
It works fine. Your life variable may be less than 0 though.
Offline
archmage wrote:
yambanshee wrote:
Hey, could you tell me whats wrong with this script?
onClipEvent (enterFrame) {
if (_root.life == 0) {
gotoAndStop(3);
}
}
when life =0 nothing happens? (frame 3 exists)It works fine. Your life variable may be less than 0 though.
its a quiz styled game though. Life is always either 3,2,1 or0
Offline
You code is correct. Maybe you are not referring to the correct variables? Or perhaps you wanted to make the main timeline gotoAndStop() but forgot to put _root. ?
Offline
archmage wrote:
Or perhaps you wanted to make the main timeline gotoAndStop() but forgot to put _root. ?
i didint know that...
Offline
http://www.newgrounds.com/portal/view/471659
Offline
is there anyway of getting a similer thing as the repeat until block? at moment im making a script that cheaks 2 conditions, 1 a hitTest and 2 a keypress. If both of these are true then it repeats a script untill the hittest is false. It wont work continually running the script as the keypress will need to be continuasly done. I thought of setting a bollean value to true when both the hittest and keypress is clicked and setting it to false when the key press is fake, but is this the most effective method or are there better methods?
script uptill now
onClipEvent (enterFrame) { _x = _root.scrollx+347; _y = _root.scrolly+128; if (this.hitTest(_root.char)) { if (Key.isDown(Key.SPACE)) { //the loop here. } } }
thanx for the help!
Offline
yambanshee wrote:
is there anyway of getting a similer thing as the repeat until block? at moment im making a script that cheaks 2 conditions, 1 a hitTest and 2 a keypress. If both of these are true then it repeats a script untill the hittest is false. It wont work continually running the script as the keypress will need to be continuasly done. I thought of setting a bollean value to true when both the hittest and keypress is clicked and setting it to false when the key press is fake, but is this the most effective method or are there better methods?
script uptill nowCode:
onClipEvent (enterFrame) { _x = _root.scrollx+347; _y = _root.scrolly+128; if (this.hitTest(_root.char)) { if (Key.isDown(Key.SPACE)) { //the loop here. } } }thanx for the help!
I dunno, use if statements I guess.
Offline
Cool1 Thanks archmage
Offline
wowww.... cool.
imagine a website completely dedicated to providing the action script codes for every scratch block / blocks.
Offline
Dibbo222 wrote:
wowww.... cool.
imagine a website completely dedicated to providing the action script codes for every scratch block / blocks.
There are tons of website that tell you how to code in actionscript.
Once you learn the codes you can translate the blocks yourself.
Offline
Topic closed