STORY LOOP FURRY PORN GAMES C SERVICES [?] [R] RND POPULAR | Archived flashes: 229671 |
/disc/ · /res/ — /show/ · /fap/ · /gg/ · /swf/ | P0001 · P2596 · P5191 |
This is the info page for Flash #56498 |
Custom Mouse tutorial |
Learn to make a mouse similar to this |
Start |
Start |
Credits |
Credits |
Sound Credits Sound design magical accent swell harp twinkle sparkle science fiction 01 Created By: SFX Bible Dark Atmosphere Created By: celso cano www. soundsnap.com |
Next |
Welcome to the Custom Mouse Tutorial! This tutorial will teach you how to create your very own unique mouse by showing you how you can use code to create unique effects. |
Assuming you have used the flash tools before, click on the square drawing tool and draw to squares of an equal size on the stage. Then, fully highlight one of the squares and go to: Modify/Transform/FreeTransform and put the square on a 45 degree angle. Then put that square directly over the other. It should look somthing like this. |
If it looks like this, turn it into a movieclip called mainImg and go to the next part. |
Now, you will need to go into your property tab and give your new movieclip. a instance name, which will be the same as its movieClip name, mainImg |
OK, now its time to imput our first bit of code. Put this in the mainImg movieClip. onClipEvent (load) //When the movieClip loads { Mouse.hide();//Hides the mouse startDrag("", true);//Starts dragging the object at mouse position } |
The code you previously entered should now hide your current mouse and put the mainImg movieclip in the place of it. Check that it is running properly now too before you continue. |
If it is perfectly fine, copy the mainImg movie clip 7 times, giving them the instance names of follower1 to follower and reduce their width and height so they are smaller than one another. For an example mainImg width and height is 30 and 30 follower1 width and height 25 and 25 follower2 width and height 20 and 20 and so on. If you run into the problem of the width and height are going to be smaller than 0, either dont add them or increase the size of mainImg appropriately. go to the next page to see an example of what im writting. |
The copied images |
Follower 1 and Follower 2 |
These are simply examples of my current custom mouse. Depending on size, yours may vary a little |
If you play this, your mouse still works, but not the other movieClips. This is because we need to implement more code. to each of the follower instances.. IMPORTANT!!: Make sure you erase any other code in the follower instances onClipEvent(enterFrame) { this._x =_root.mainImg.previousX;/*Sets this object xposition to mainImg previous x position*/ this._y = _root.mainImg.previousY;/*Sets this object yposition to mainImg previous y position*/ previousX = currentX;//holds the previous x position previousY = currentY;//holds the previous y postion currentX = this._x;//holds the current x position currentY = this._y;//holds the current y position } |
Once you have inputed that into eacht of the follower instances, your going to have to go back to follower2 to the last follower and change the following lines: this._x =_root.mainImg.previousX;/*Sets this object xposition to mainImg previous x position*/ this._y = _root.mainImg.previousY;/*Sets this object yposition to mainImg previous x position*/ to: this._x =_root.follower1.previousX; this._y = _root.follower1.previousY; BEFORE you go enter this code in each follower, there is a special way you need to do it. If your in follower2, you will need to change the mainImg part to follower1, if your in follower3, change the mainImg part to follower2 and so on. |
We are almost there in making the object follow one another. But now, we need to add more code into the mainImg movieClip... onClipEvent(enterFrame) { previousX = currentX;//saves the previous xposition previousY = currentY;//saves the previous yposition currentX = this._x;//saves the current xposition currentY = this._y;//saves the current yposition } If done correctly, when you run your program, the movieClips will now follow another and if it does, Congratulations for getting this far! |
We now have gone well overhalf way! congratulations for getting this far! But we still arent finished. We still need to give our object constantly changing colors, make it rotate and make small spart to fall from the mainImg. Lets concentrate on getting the movieClips to rotate. In this example, each movieClip is rotating an opposite way, so we need to add: this._rotation +=1; To MainImg MovieClip and this to every odd follower movieclip e.g follower1,3,5: this._rotation -=1; And this to every even follower movieClip e.g follower ,4,5 this._rotation +=1; To the enterFrame clipEvent. If done correctly, your star-like objects will now rotate in the properly |
Great! now, to make the movieClips change color you need to add to the clipEvent enterframe of each of the follower instance and the mainImg instance. red = random(255); green = random(255); blue = random(255); changecolor = new Color(this); changecolor.setTransform({ra:100, rb:red,ga:100,gb:green,ba:100,bb:blue,aa:100,ab:0}); Now, for the last part of this tutorial. creating the sparks of the cursor we have created. Create a small yellow or gold circle approximately 2Width and 2Height wide and convert it into a movieClip called sparkle aswell as a instance name called sparkle0 as in sparkle and the number zero. |
Then add the following code to it onClipEvent(load) { randomXPos = random(_root.mainImg._width/2)-10; this._x =_root.mainImg._x + randomXPos; this._y =_root.mainImg._y + (_root.mainImg._height/2)-7; fallSpeed = 0; this._alpha = random(100); gravity = .1; } |
onClipEvent(enterFrame) { fallSpeed += gravity this._y +=fallSpeed; this._alpha -=1; if(this._alpha < 2) { this.removeMovieClip(); } } |
And this: |
This Code is what will control the spark and tell it what to do, but nothing is initialising it. To initialize it, we need to add the following code on the next page to the mainImg movieClip |
Add this to mainImg's ClipEvent load sparkleCounter = 1; and this to mainImg's ClipEvent enterFrame prevValue = sparkleCounter - 1; _root["sparkle"+prevValue].duplicateMovieClip("sparkle"+sparkleCounter, _root.getNextHighestDepth()); sparkleCounter++; if(sparkleCounter > 5) { sparkleCounter = 0; } And thats everything! if everything works now, congratulations for getting through this rather long and possibly tricky tutorial. so I just want to say.. |
CONGRATULATIONS! |
ActionScript [AS1/AS2]
Frame 1stop(); if (isNaN(firstload)) { creditOpen = 1; firstload = 9; i = 0; while (i < 500) { prevValue = i - 1; _root["star" + prevValue].duplicateMovieClip("star" + i, this.getNextHighestDepth()); i++; } _root.page = 1; var buttonsnd = new Sound(); var snd = new Sound(); buttonsnd.attachSound("twinkle"); snd.attachSound("Dark_atmosphere"); _root.snd.start(0, 999); }Instance of Symbol 4 MovieClip [mainImg] "mainImg" in Frame 1onClipEvent (load) { sparkleCounter = 1; Mouse.hide(); startDrag ("", true); } onClipEvent (enterFrame) { this._rotation = this._rotation + 1; previousX = currentX; previousY = currentY; currentX = this._x; currentY = this._y; red = random(255); green = random(255); blue = random(255); changecolor = new Color(this); changecolor.setTransform({ra:100, rb:red, ga:100, gb:green, ba:100, bb:blue, aa:100, ab:0}); prevValue = sparkleCounter - 1; _root["sparkle" + prevValue].duplicateMovieClip("sparkle" + sparkleCounter, _root.getNextHighestDepth()); sparkleCounter++; if (sparkleCounter > 5) { sparkleCounter = 0; } }Instance of Symbol 4 MovieClip [mainImg] "follower1" in Frame 1onClipEvent (enterFrame) { this._rotation = this._rotation - 1; this._x = _root.mainImg.previousX; this._y = _root.mainImg.previousY; previousX = currentX; previousY = currentY; currentX = this._x; currentY = this._y; red = random(255); green = random(255); blue = random(255); changecolor = new Color(this); changecolor.setTransform({ra:100, rb:red, ga:100, gb:green, ba:100, bb:blue, aa:100, ab:0}); }Instance of Symbol 4 MovieClip [mainImg] "follower2" in Frame 1onClipEvent (enterFrame) { this._rotation = this._rotation + 1; this._x = _root.follower1.previousX; this._y = _root.follower1.previousY; previousX = currentX; previousY = currentY; currentX = this._x; currentY = this._y; red = random(255); green = random(255); blue = random(255); changecolor = new Color(this); changecolor.setTransform({ra:100, rb:red, ga:100, gb:green, ba:100, bb:blue, aa:100, ab:0}); }Instance of Symbol 4 MovieClip [mainImg] "follower3" in Frame 1onClipEvent (enterFrame) { this._rotation = this._rotation - 1; this._x = _root.follower2.previousX; this._y = _root.follower2.previousY; previousX = currentX; previousY = currentY; currentX = this._x; currentY = this._y; red = random(255); green = random(255); blue = random(255); changecolor = new Color(this); changecolor.setTransform({ra:100, rb:red, ga:100, gb:green, ba:100, bb:blue, aa:100, ab:0}); }Instance of Symbol 4 MovieClip [mainImg] "follower4" in Frame 1onClipEvent (enterFrame) { this._rotation = this._rotation + 1; this._x = _root.follower3.previousX; this._y = _root.follower3.previousY; previousX = currentX; previousY = currentY; currentX = this._x; currentY = this._y; red = random(255); green = random(255); blue = random(255); changecolor = new Color(this); changecolor.setTransform({ra:100, rb:red, ga:100, gb:green, ba:100, bb:blue, aa:100, ab:0}); }Instance of Symbol 4 MovieClip [mainImg] "follower5" in Frame 1onClipEvent (enterFrame) { this._rotation = this._rotation - 1; this._x = _root.follower4.previousX; this._y = _root.follower4.previousY; previousX = currentX; previousY = currentY; currentX = this._x; currentY = this._y; red = random(255); green = random(255); blue = random(255); changecolor = new Color(this); changecolor.setTransform({ra:100, rb:red, ga:100, gb:green, ba:100, bb:blue, aa:100, ab:0}); }Instance of Symbol 6 MovieClip "star0" in Frame 1onClipEvent (load) { this._x = random(550); this._y = random(400); alphaModifier = -1; maxAlpha = random(100); this._alpha = maxAlpha; } onClipEvent (enterFrame) { this._alpha = this._alpha + alphaModifier; if (this._alpha < 10) { alphaModifier = 1; } if (this._alpha > maxAlpha) { alphaModifier = -1; } }Instance of Symbol 8 MovieClip "sparkle0" in Frame 1onClipEvent (load) { randomXPos = random(_root.mainImg._width / 2) - 10; this._x = _root.mainImg._x + randomXPos; this._y = (_root.mainImg._y + (_root.mainImg._height / 2)) - 7; fallSpeed = 0; this._alpha = random(100); gravity = 0.1; } onClipEvent (enterFrame) { fallSpeed = fallSpeed + gravity; this._y = this._y + fallSpeed; this._alpha = this._alpha - 1; if (this._alpha < 2) { this.removeMovieClip(); } }Instance of Symbol 4 MovieClip [mainImg] "follower6" in Frame 1onClipEvent (enterFrame) { this._rotation = this._rotation + 1; this._x = _root.follower5.previousX; this._y = _root.follower5.previousY; previousX = currentX; previousY = currentY; currentX = this._x; currentY = this._y; red = random(255); green = random(255); blue = random(255); changecolor = new Color(this); changecolor.setTransform({ra:100, rb:red, ga:100, gb:green, ba:100, bb:blue, aa:100, ab:0}); }Instance of Symbol 4 MovieClip [mainImg] "follower7" in Frame 1onClipEvent (enterFrame) { this._rotation = this._rotation - 1; this._x = _root.follower6.previousX; this._y = _root.follower6.previousY; previousX = currentX; previousY = currentY; currentX = this._x; currentY = this._y; red = random(255); green = random(255); blue = random(255); changecolor = new Color(this); changecolor.setTransform({ra:100, rb:red, ga:100, gb:green, ba:100, bb:blue, aa:100, ab:0}); }Instance of Symbol 23 MovieClip "creditsList" in Frame 1onClipEvent (enterFrame) { if (_root.creditOpen < 1) { this._x = this._x + 10; if (this._x > (Stage.width / 2)) { this._x = Stage.width / 2; } } }Frame 2stop();Frame 3stop();Frame 4stop();Frame 5stop();Frame 6stop();Frame 7stop();Frame 8stop();Frame 9stop();Frame 10stop();Frame 11stop();Frame 12stop();Frame 13stop();Frame 14stop();Symbol 17 Buttonon (release) { _root.buttonsnd.start(0, 1); play(); _root.creditOpen = 3; _root.page++; }Symbol 21 Buttonon (press) { _root.creditOpen = 0; }Symbol 26 Buttonon (release) { _root.page++; _root.buttonsnd.start(0, 1); play(); }
Library Items
Symbol 1 Sound [twinkle] | ||
Symbol 2 Sound [Dark_atmosphere] | ||
Symbol 3 Graphic | Used by:4 | |
Symbol 4 MovieClip [mainImg] | Uses:3 | Used by:Timeline |
Symbol 5 Graphic | Used by:6 | |
Symbol 6 MovieClip | Uses:5 | Used by:Timeline |
Symbol 7 Graphic | Used by:8 | |
Symbol 8 MovieClip | Uses:7 | Used by:Timeline |
Symbol 9 Font | Used by:10 12 13 15 18 20 22 24 27 28 31 32 37 38 39 43 50 51 52 53 54 55 56 57 59 60 61 62 | |
Symbol 10 Text | Uses:9 | Used by:11 |
Symbol 11 MovieClip | Uses:10 | Used by:Timeline |
Symbol 12 Text | Uses:9 | Used by:Timeline |
Symbol 13 Text | Uses:9 | Used by:14 17 |
Symbol 14 MovieClip | Uses:13 | Used by:17 |
Symbol 15 Text | Uses:9 | Used by:16 17 |
Symbol 16 MovieClip | Uses:15 | Used by:17 |
Symbol 17 Button | Uses:13 14 16 15 | Used by:Timeline |
Symbol 18 Text | Uses:9 | Used by:19 21 |
Symbol 19 MovieClip | Uses:18 | Used by:21 |
Symbol 20 Text | Uses:9 | Used by:21 |
Symbol 21 Button | Uses:18 19 20 | Used by:Timeline |
Symbol 22 Text | Uses:9 | Used by:23 |
Symbol 23 MovieClip | Uses:22 | Used by:Timeline |
Symbol 24 Text | Uses:9 | Used by:25 26 |
Symbol 25 MovieClip | Uses:24 | Used by:26 |
Symbol 26 Button | Uses:24 25 | Used by:Timeline |
Symbol 27 Text | Uses:9 | Used by:Timeline |
Symbol 28 Text | Uses:9 | Used by:Timeline |
Symbol 29 Graphic | Used by:30 | |
Symbol 30 MovieClip | Uses:29 | Used by:Timeline |
Symbol 31 Text | Uses:9 | Used by:Timeline |
Symbol 32 Text | Uses:9 | Used by:Timeline |
Symbol 33 Bitmap | Used by:34 | |
Symbol 34 Graphic | Uses:33 | Used by:35 |
Symbol 35 MovieClip | Uses:34 | Used by:Timeline |
Symbol 36 Font | Used by:37 52 53 54 55 56 57 58 61 | |
Symbol 37 Text | Uses:9 36 | Used by:Timeline |
Symbol 38 Text | Uses:9 | Used by:Timeline |
Symbol 39 Text | Uses:9 | Used by:Timeline |
Symbol 40 Bitmap | Used by:41 | |
Symbol 41 Graphic | Uses:40 | Used by:42 |
Symbol 42 MovieClip | Uses:41 | Used by:Timeline |
Symbol 43 Text | Uses:9 | Used by:Timeline |
Symbol 44 Bitmap | Used by:45 | |
Symbol 45 Graphic | Uses:44 | Used by:46 |
Symbol 46 MovieClip | Uses:45 | Used by:Timeline |
Symbol 47 Bitmap | Used by:48 | |
Symbol 48 Graphic | Uses:47 | Used by:49 |
Symbol 49 MovieClip | Uses:48 | Used by:Timeline |
Symbol 50 Text | Uses:9 | Used by:Timeline |
Symbol 51 Text | Uses:9 | Used by:Timeline |
Symbol 52 Text | Uses:9 36 | Used by:Timeline |
Symbol 53 Text | Uses:9 36 | Used by:Timeline |
Symbol 54 Text | Uses:9 36 | Used by:Timeline |
Symbol 55 Text | Uses:9 36 | Used by:Timeline |
Symbol 56 Text | Uses:9 36 | Used by:Timeline |
Symbol 57 Text | Uses:9 36 | Used by:Timeline |
Symbol 58 Text | Uses:36 | Used by:Timeline |
Symbol 59 Text | Uses:9 | Used by:Timeline |
Symbol 60 Text | Uses:9 | Used by:Timeline |
Symbol 61 Text | Uses:9 36 | Used by:Timeline |
Symbol 62 Text | Uses:9 | Used by:Timeline |
Instance Names
"mainImg" | Frame 1 | Symbol 4 MovieClip [mainImg] |
"follower1" | Frame 1 | Symbol 4 MovieClip [mainImg] |
"follower2" | Frame 1 | Symbol 4 MovieClip [mainImg] |
"follower3" | Frame 1 | Symbol 4 MovieClip [mainImg] |
"follower4" | Frame 1 | Symbol 4 MovieClip [mainImg] |
"follower5" | Frame 1 | Symbol 4 MovieClip [mainImg] |
"star0" | Frame 1 | Symbol 6 MovieClip |
"sparkle0" | Frame 1 | Symbol 8 MovieClip |
"follower6" | Frame 1 | Symbol 4 MovieClip [mainImg] |
"follower7" | Frame 1 | Symbol 4 MovieClip [mainImg] |
"creditsList" | Frame 1 | Symbol 23 MovieClip |
Special Tags
FileAttributes (69) | Timeline Frame 1 | Access local files only, Metadata not present, AS1/AS2. |
ExportAssets (56) | Timeline Frame 1 | Symbol 1 as "twinkle" |
ExportAssets (56) | Timeline Frame 1 | Symbol 2 as "Dark_atmosphere" |
ExportAssets (56) | Timeline Frame 1 | Symbol 4 as "mainImg" |
|