Rotating Symbol On Perfect Axis?
I'm having lots of trouble rotating a symbol/graphic on a perfect axis, and also it does not spin smoothly. It looks somewhat like a pinwheel, and when it spins it becomes very jagged and choppy.
Can anyone provide me some ideas as to how I can go about creating this spinning symbol the proper way?
Thanks so much!
FlashKit > Flash Help > Flash MX
Posted on: 04-13-2003, 07:50 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Rotating On Axis
Hello once again! Hope all is well. I am having a problem with rotating a circle. Now I know that if you draw a flat circle and put a rotate on it, it would'nt look like it is rotating, So I added some lines to it, and a sphere in the center. When I add a rotation on it, It does'nt spin on its axis. You can see it move slightly off course. Now the circle is perfectly round, not oval. Can someone help me with rotating this circle in one spot on its proper axis.
Axis Rotating
can someone give me a step-by-step explanaition of how to make a graphic or text rotate around it's own axis (diagonally, horizontaly, vertically etc.). i know this is a common and easy thing...i'm just very new to flash.
THANX!
Rotating On An Axis...
I developed a short intro for a site, and am sure I did it the hard way... look at the link below ( http://www.mdredlinerz.com/ ) and in the intro you'll see the rpm needle moving... I did it by cutting and pasting and manually rotating each frame so that it looked "about right" .... I'd like to, however, learn how to be able to have the needle rotate on an axis of a pre-deignated axis point, either using the tools within flash, or action scripting. Any help with this would be greatfully appreciated. Thanks in advance...
RC
Rotating Around Y Axis
Hi, I have a prolem, lets say I create a regular circle that looks like a coin and I convert it into a MovieClip, how can I make that the coin whill rotate around the Y axis, so I could see a coin turning around?
Rotating Cube -- X-axis Only
i THINK this should be fairly simple but i can't seem to find tut's or help for it anywhere.
i want to create a cube-style site or menu that rotates on the x-axis only...kind of like the user-switching in the new Mac OS X if you've seen that.
any help would be great!
thanks
CB
[F8] Rotating Pics On Y Axis
Can anybody help me? I am new here but I am glad I found this forum. I am using Flash 8. What I am trying to do is take two pictures and have like they are back to back. I want to rotate them on the y axis so one shows and during the rotation the second will appear. Spinning in a 360 degree circle like a revolving sign. I know some flash, is this something that can be done or is there a program that will do this? Thanks for the help.
Rotating Square Around X Axis
i want to rotate square around x axis. this is the code for rotating 1 point(draw a circle or something like that and copy code):
Code:
var centar:Object = new Object();
centar.x = 250;
centar.y = 250;
var angle:Number = 0;
var radius:Number = 50;
var speed:Number = 4;
var size:Number = 100;
function rotationX() {
this._y = Math.sin(angle*Math.PI/180)*radius+centar.y;
z = Math.cos(angle*Math.PI/180)*radius+size;
this._xscale = this._yscale=z;
angle += speed;
}
_root.MC.onEnterFrame = rotationX;
but i want to rotate square.for that i need 4 points(actually angles because i`m using sin and cos), and then i need to rotate each point individualy and connect the points. but i doesn`t work. if anybody knows the solution please tell. any other ways of rotating a square(around x axis of course)are also welcome
here is the code i wrote:
Code:
//vars
var point:Array = new Array();
var speed:Number = 4;
var radius:Number = 100;
var centar:Object = new Object();
centar.x = 250;
centar.y = 250;
_root.createEmptyMovieClip("square", 1);
_root.square.lineStyle(2, 0xff0000, 100);
//square points, they are actually angels
point = [135, 45, 315, 215];
function rotation() {
for (n=0; n<=point.length; n++) {
y = Math.sin(point[n]*Math.PI/180)*radius+centar.y;
z = Math.cos(point[n]*Math.PI/180)*radius+size;
this._xscale = this._yscale=z;
point[n] += speed;
if (n == 0) {
this.moveTo(z, y);
} else {
this.lineTo(z, y);
}
point[n] += speed;
}
}
_root.square.onEnterFrame = rotation;
How Design Rotating On Axis
First, i'm running on Flash 5.
Can anyone tell me how to design a flash for couple pictures that will be line together and then it will rotate on the vertical axis 360 degree.
Thanks.
Rotating 3d Menu Along X-axis
hi i was wonderin if anyone has an idea how to creat a menu system such as the one in www.napkindesign.com under portfolio. i have tried the scrolling menu tutorials by pom and the one on kirupa but this menu is different because of the 3d perspective it provides and i would appreciate any help i can get. im either just too new to flashmx and actionscripting or im just plain dumb
Help With 3d Rotating Nav (depth, Axis, Mouse Etc)
ok I am not even sure where to begin on this one...I am sure I have seen one like it before used on a website but can't remember where.
anyway I want something like this http://www.flashkit.com/tutorials/3D...-801/index.php
where the mouse controls the depth and axis of the buttons.
what I want is this to be the menu system, where the buttons are sort of floating, rotating....and if you mouse over a button, it rotates to the front, it should get bigger when near the front and the back buttons smaller, if clicked on a sub mav should pop out...is there a fla out there or tutorial better than the flower one that has depth etc?
Rotating On Same Axis Menu Buttons
Hi
Well I'm off to a good start ... first post is a question.
I've been trying to figure this menu out for a while and I just can't. What i'm trying to do is to have a similar menu to this http://www.templatemonster.com/flash...tes/12947.html
So far, I created some buttons with each different instance name (Example_btn).
ActionScript Code:
This is the code I'm using right now or at least experimenting on.
import fl.transitions.*;
import fl.transitions.easing.*;
import fl.motion.*;
import fl.motion.Animator;
import fl.transitions.Tween;
var btnTween:Tween
Nouveaute_btn.addEventListener(MouseEvent.ROLL_OVER, rotateIn);
ProduitsServices_btn.addEventListener(MouseEvent.ROLL_OVER, rotateIn);
Portfolio_btn.addEventListener(MouseEvent.ROLL_OVER, rotateIn);
Contact_btn.addEventListener(MouseEvent.ROLL_OVER, rotateIn);
function rotateIn(e:MouseEvent):void{
btnTween = new Tween(e.currentTarget, "rotation", Strong.easeOut, -150, 3, .25, false)
}
Nouveaute_btn.addEventListener(MouseEvent.ROLL_OUT, rotateOut);
function rotateOut(e:MouseEvent):void{
btnTween = new Tween(e.currentTarget, "rotation", Strong.easeOut, -150, 3, .25, false)
}
I can't make the button rotate only. When I mouse over, it will be moved in a "circular" motion, which is not what I'm trying to make it do.
Anyone?
ps: sry for my terrible english.
Change Symbol Axis?
I'm working out a tutorial online that I found for object rotation
onClipEvent (enterFrame) {
i=getProperty(this,_rotation);
setProperty(this,_rotation,i+5);
}
but it doesn't seem to rotate on the center of the object, rather the corner. I am assuming I need to change the axis, but am not quite sure how to do this, i'm new to flash 2004.
Stetching A Symbol On One Axis Without Distortion
I'm new to Flash. I'm have a graphic symbol drawn in Flash with rounded corners. I want to expand it horizintally only. But my corners distort. How can I expand the shape and keep the corners from distorting.
Thanks
Rotating A Symbol...
Hey,
I want to rotate a symbol by a specific amount of degrees, rather than just inaccurately just using "Modify - Transform - Rotate".
So i go to "Windows - Panel - Transform" and enter 10.0 degrees into the 'Rotate' box and it doesn't change the symbol at all.
What am i doing wrong?
Thanks.
Rotating Symbol
How can i set a symbol to rotate slowly constantly in the background? I am sure there is some ActionScript to do this but I know very little about that sort of thing.
Any ideas?
Rotating Symbol With Mouse Question
hello,
i have a symbol that i'm using this code on:
onClipEvent(mouseMove){
_rotation = 360*(_root._xmouse/Stage.width) - 180;
}
....to make it rotate depending on the mouse position. is there any way to make it have inertia, i know i have seen this but i don't know all the algorithm stuff and will never comprehend it. is there a line of code i can just add into what i already have that's pretty simple? i'd appreciate any input, thanks in advance!!
I Need A Rotating Anti-clockwise Nav Symbol To Rotate Clockwise With Same Easing.
Hi,
I've got this navigational emblem (symbol or object or whatever) that rotates anti-clockwise 90 degrees when the mouse rolls over an invisible button that's placed over the top and bottom part of the emblem.
Check out the attachment - you'll see what I mean.
Now, I'm trying to get the emblem to rotate "clockwise" 90 degrees when the mouse rolls over the bottom part of the emblem (I want the top part to stay anti-clockwise). To do this I have split the invisible button into 2 separate buttons. The top button called "Top Hit Panel" and the bottom button called "Bottom Hit Panel".
Now, it seems to me that I need an action script to go on the bottom button that will cause it to play backwards on the "Nav Bar" timeline. The only thing is, is that it must have the same easing as when the emblem rotates anti-clockwise. It will need to ease out +100 so it will have the same 'slow down before it stops' effect.
If anyone can help with this, then that will be absolutely MAGNIFICENT!!!!
Thanks heaps and HEAPS!
Blastbum
I Need A Rotating Anti-clockwise Nav Symbol To Rotate Clockwise With Same Easing
Hi,
I've got this navigational emblem (symbol or object or whatever) that rotates anti-clockwise 90 degrees when the mouse rolls over an invisible button that's placed over the top and bottom part of the emblem.
Check out the attachment - you'll see what I mean.
Now, I'm trying to get the emblem to rotate "clockwise" 90 degrees when the mouse rolls over the bottom part of the emblem (I want the top part to stay anti-clockwise). To do this I have split the invisible button into 2 separate buttons. The top button called "Top Hit Panel" and the bottom button called "Bottom Hit Panel".
Now, it seems to me that I need an action script to go on the bottom button that will cause it to play backwards on the "Nav Bar" timeline. The only thing is, is that it must have the same easing as when the emblem rotates anti-clockwise. It will need to ease out +100 so it will have the same 'slow down before it stops' effect.
If anyone can help with this, then that will be absolutely MAGNIFICENT!!!!
Thanks heaps and HEAPS!
Blastbum
I Need A Rotating Anti-clockwise Nav Symbol To Rotate Clockwise With Same Easing
Hi,
I've got this navigational emblem (symbol or object or whatever) that rotates anti-clockwise 90 degrees when the mouse rolls over an invisible button that's placed over the top and bottom part of the emblem.
Check out the attachment - you'll see what I mean.
Now, I'm trying to get the emblem to rotate "clockwise" 90 degrees when the mouse rolls over the bottom part of the emblem (I want the top part to stay anti-clockwise). To do this I have split the invisible button into 2 separate buttons. The top button called "Top Hit Panel" and the bottom button called "Bottom Hit Panel".
Now, it seems to me that I need an action script to go on the bottom button that will cause it to play backwards on the "Nav Bar" timeline. The only thing is, is that it must have the same easing as when the emblem rotates anti-clockwise. It will need to ease out +100 so it will have the same 'slow down before it stops' effect.
If anyone can help with this, then that will be absolutely MAGNIFICENT!!!!
Thanks heaps and HEAPS!
Blastbum
Rotating Anti-clockwise Nav Symbol To Rotate Clockwise With Same Easing.
I've got this navigational emblem (symbol or object or whatever) that rotates anti-clockwise 90 degrees when the mouse rolls over an invisible button that's placed over the top and bottom part of the emblem.
Check out the attachment - you'll see what I mean.
Now, I'm trying to get the emblem to rotate "clockwise" 90 degrees when the mouse rolls over the bottom part of the emblem (I want the top part to stay anti-clockwise). To do this I have split the invisible button into 2 separate buttons. The top button called "Top Hit Panel" and the bottom button called "Bottom Hit Panel".
Now, it seems to me that I need an action script to go on the bottom button that will cause it to play backwards on the "Nav Bar" timeline. The only thing is, is that it must have the same easing as when the emblem rotates anti-clockwise. It will need to ease out +100 so it will have the same 'slow down before it stops' effect.
X Axis, Y Axis, Location Problem
Hello Friends,
I am having an alignment problem.
I have 5 buttons (actually they are pages of text turned into to buttons), my stage is 780x420. I have the first page (their size is w=109.7 h=151.8) coming in at x=379.7 - y=291.8 on the stage, I am using motion tween to get the first page to point x=59.9 - y=291.8, thats fine, now, I want to put a movie clip in the over state of the button that when the mouse moves over the page, the page will move back to center and go from 25% (which is the height and width of the page now) to 100% on of its size.
Ok
So, when I am setting up my movie clips motion tween in the edit stage of the movie, I use the same coordinates as the actual page has on the stage (stage size is the same), but when I put the movie together, they don't line up and it just goes crazy on the stage. I have a "stop" action on the last frame of the movie clip but still don't work properly.
Any advice would be appreciated
Thank you
Thorrax
Sliding Stuff On X Axis Vs. Y Axis
hi everyone,
i did a tutorial on sliding menus from the kirupa site, it's here: http://www.kirupa.com/developer/mx20...ith_slider.htm
i've made a lot of great stuff with it, my menus are sliding all over the place as we speak, but only on the x axis.
now i'm trying to make one that slides up and down on the y axis, and i can't get the coding to make it work right. i have seven buttons this time instead of 5, and i've changed all the "x's" in the actionscript to "y's"
it still slides along the x axis!!!!! what's going on. does flash not like using the y axis. perhaps this is impossible?
this is the code, maybe someone can tell me what i'm doing wrong?
easeSpeed = 5;
slider_mc.onEnterFrame = function() {
this._y += (yMove1-this._y)/easeSpeed;
};
button_1.onPress = function() {
yMove = button_1._y;
};
button_2.onPress = function() {
yMove = button_2._y;
};
button_3.onPress = function() {
yMove = button_3._y;
};
button_4.onPress = function() {
yMove = button_4._y;
};
button_5.onPress = function() {
yMove = button_5._y;
};
button_6.onPress = function() {
yMove = button_6._y;
};
button_7.onPress = function() {
yMove = button_7._y;
};
This Is Perfect
Just what I need!
I've been doing lessons and tutorials (like the ones that come with Flash MX) that seem to assume you already know where everything is and can easily find it.
Someone pointed me in the direction of THIS website today, and most of the tutorials I looked at seem basic enough for me.
I need PICTURES and where something is! Not just "go to_________ and set this" etc.
I did a button tutorial and actually got it to work,(2nd try) but had to import sound from my Coffee Cup html editor- which went into the FLASH library, and I found it and dragged it onto the work area, with the frame I wanted it in selected.
Amazingly it worked! I had little choice of sounds and picked on that sounds like a cash register. One I could have picked was a cow MOO.
Either I couldn't figure out where to find the sounds in FLASH (going by the tutorial, which even had pictures) or, the tut was for another version of FLASH?
I've noticed this a few times, something won't be where the tutorial says, or will be a little bit different. Which usually stops me, but I find another to try and will get back to it.
One thing that stumped me in one, that seemed to have good, clear directions was in one place it was adding a button (to stop the action) and had a script to copy/paste. It said "add the script to (one of) the frames". Without any clue as to HOW one adds a script?
Since then I have seen clues about this, so maybe either adding a keyframe and right clicking (for options and a place to paste the script) or just right clicking and finding options?
Plan to go back and try it again at some point.
But that's what I mean about the tutorials, some of them will say "select a certain frame and add the sciript to it". (for example) like how on earth do you do THAT?
I look in all the tools and right click everything I can think of and look in FLASH HELP (Index) etc.
Some things I have worked out on my own. Some I gave up on for now.
I've been interested in this for a long time, but haven't really gotten into learning it till last week. And I think it's kind of addictive
I've been sitting up till 1-2 AM (like I did when I was learning to make webpages, finding all the ways it didn't work) Just trying to get something to WORK!
I got a ball to bounce across the screen. And a button to click. And also a ball to go around a word, but it does't go behind it on one side. I got confused with that, too. I think I have the idea, though. You have to delete the frames (on one of the layers)so the ball does't SHOW when it goes over that part.
I don't know how much I'm learning but I'm starting to feel a little smarter
And it's such a great feeling to finally get something to work!
One more question (for now) when it's done, I save it and publish it- do I have to copy all the layers onto one? (ONE tutorial I did said this at the end) THEN save it and click PUBLISH.
When I got to my html editor to upload it, there are 3 files with the name of the flash. One is the html one, one is the fla file and I don't know what the other is. Maybe the image in some way?
I have discovered all 3 have to be uploaded for it to show on the webpage.
So, I guess that answers my own question about that.
I have to get off this computer and get something else done, and see if I can still walk.
~ Carrie
Convert Graphic Symbol To Button Symbol
Howdy,
I have a graphic symbol on stage. I then create a button symbol from the graphic symbol and the registration point jumps up a tad? Why would the registration point move?
Thanks,
mperla
SYMBOL NAME PROBLEMS In SYMBOL PROPERTIES PANEL
hey,
i'm tring to go thru a tutorial for scripting a scrollbar to a movie clip. please take a look at the attached file: container_4.fla
i can't get the btm rt scroll bar to move the movie clip (title list), and i've checked all of my work vs. the tutorial and they seem to jive.
except...
when i inspect the "scroll_target" symbol thru the library, i notice that the symbol name in the top field (Name: scroll_target) is not the same as in the bottom Source/File section (Symbol Name: Symbol 10).
what gives? when i check the tutorial file (which works...) all the symbol names jive in both areas. now i'm wondering if there is a corruption in my app (Flash MX v.6.0) that is mis-assigning symbol names at a code level.
please help.
thanx.
b
Class To Generate New Symbol From Base Symbol
I've searched but can't find a reference to what I need. I'll try to explain the best I can. I have a single symbol that is a "gear tooth" which is in the library and exported for Actionscript with the identifier name "geartooth." I'm trying to create a Class called "gear" which accepts the following parameters: numGears as Number and gearTooth as movieclip. The purpose of the class is to dynamically create a gear based on the geartooth symbol and the number of teeth requested. The class has methods to determine the radius of the gear, to duplicate the original geartooth, and then to rotate each new geartooth instance the requisite angle around the calculated center to create a seamless gear. I want there to be a getter method to return this new gear as a single symbol that can be manipulated as such. Is this possible? If so can someone point me to some relevant examples of similar code? Thanks much.
Newb Help? Putting A Symbol Inside A Symbol.
All I want is to have a man blink.
The man is a symbol, and there is another symbol inside of him. (his eyes.) Which I already set to blink.
Anyways... It doesn't work. It works when I preview it in symbol editing mode, but nothing else.
I am sorry if I was too vague, I'm still learning. Any help?
[MX2004] Movie Symbol As A Button Symbol
I have a scrollout menu for my flash movie, but each of the buttons have to be movies symbols. I try to attach:
on (release) {
gotoand stop(4)
}
But I get the error that this script only works for buttons. Anyone able to lend some assist? I suck at actionscript. ;p
Newb Help? Putting A Symbol Inside A Symbol.
All I want is to have a man blink.
The man is a symbol, and there is another symbol inside of him. (his eyes.) Which I already set to blink.
Anyways... It doesn't work. It works when I preview it in symbol editing mode, but nothing else.
I am sorry if I was too vague, I'm still learning. Any help?
[MX2004] Movie Symbol As A Button Symbol
I have a scrollout menu for my flash movie, but each of the buttons have to be movies symbols. I try to attach:
on (release) {
gotoand stop(4)
}
But I get the error that this script only works for buttons. Anyone able to lend some assist? I suck at actionscript. ;p
The Perfect Fade
praystation has the perfect fade but i have tried many ways to get this...scripting etc. does anyone know how......
Help With The Perfect Menu
I've been searching for just the right nav for a site I'm building for a non-profit free of charge. Bit of a flash newbie so flashkit has been great. I came across my ideal menu at www.weca.net Does anyone know if they did this in-house or if an agency created it? Anyone have a similar menu laying around?
Please e-mail if you can help! Thanks! kp003a4345@blueyonder.co.uk
Ummm... Its Not Perfect
http://www.delaforcephotoworks.com/weddings.html
btw 56k ers please be aware that there is a full song to be loaded... may take some time!
thats what i have, it works great, but its not exactly how i want it
currently everything loads into a container_mc and the slideing pannel is ontop of that in another layer... but when you click the buttons below just for a split second you see the background miage... how do i get the slider to go over the image 1st and then change . that way it allows a smooth flow between images
Making Perfect Gif
i want make perfect gif file from my swf.......
Bcause currently i am not not getting gif file which is animating as
good as swf and also good colors too.......
what should be the properties in publish setting for perfect gif file
The Perfect Preloader?
Is it possible to really preload the entire movie?
I ask this because some of the stuff I am doing, the preloader will completely load, play for about 2 seconds and have a slight pause or seem jumpy. My file sizes range from 10k - 35k.
Does anyone know what might be causing this?
Thanks so much for your help!
/z
Perfect Setinterval?
I want a piece of code to activate every 1000 milliseconds. However, when I check with getTimer() how many seconds actually pass between activating the function, i get a lot of 1000's but also a lot of 1009's and 1050's. How can I rewrite my function here to get it perfect?
Code:
sitime = new Object();
setInterval(sitime, "interval", 1000);
sitime.interval = function() {
box2._x+=1
lasttime = marktime;
marktime = getTimer();
timepassed = marktime-lasttime;
trace(timepassed);
updateAfterEvent;
};
Picture - Not Perfect
Hi all!!
something strange is happening to my images. My image files are in movie clips and I use an easing equation in AS2 to tween them into the stage.
When I test the moving using Control - test, the images are displayed perfectly. But when I export the swf and view the movie in IE7, the images are all jagged and distorted.
Any suggestions? anyone? will be much appreciated!
Cheers!
Perfect Circles?
In the Flash IDE, is it possible to draw perfect (or at least better than the circle tool) circles? I ask because I'm applying math-based physics to an arc and it doesn't quite match up to the visuals in the background.
The Perfect Rollover
Hi, i'm not so familiar with as3 but i decided to take the step and forget as2.
I am now trying to make perfect rollovers. Not the play over on rollover and play out on rollout but play forward on rollover and play backwards on rollout.
Why? because if you have a long animation on that rollover and you go quickly over the button with your mouse the forward and backward technique is the only way to have something that doesn't skip frames.
I found some code on this forum that did almost what i wanted :
var whoami:MovieClip;
var over:Boolean;
over = undefined;
button1.addEventListener(MouseEvent.MOUSE_OVER,ove rHandler);
button1.addEventListener(MouseEvent.MOUSE_OUT, outHandler);
button2.addEventListener(MouseEvent.MOUSE_OVER,ove rHandler);
button2.addEventListener(MouseEvent.MOUSE_OUT, outHandler);
button3.addEventListener(MouseEvent.MOUSE_OVER,ove rHandler);
button3.addEventListener(MouseEvent.MOUSE_OUT, outHandler);
button4.addEventListener(MouseEvent.MOUSE_OVER,ove rHandler);
button4.addEventListener(MouseEvent.MOUSE_OUT, outHandler);
function overHandler(e:MouseEvent):void {
over = true;
whoami = MovieClip(e.currentTarget);
whoami.addEventListener(Event.ENTER_FRAME, playForwards);
if (over) {
whoami.dispatchEvent(new Event("overEvent",true, false));
}
}
function outHandler(e:MouseEvent):void {
over = false;
whoami = MovieClip(e.currentTarget);
whoami.addEventListener(Event.ENTER_FRAME, playBackwards);
}
function playForwards(e:Event):void {
if (over == true) {
whoami.nextFrame();
}
}
function playBackwards(e:Event):void {
if (over==false) {
whoami.prevFrame();
}
I liked that code very much because the same functions are used for all the buttons (overHandler,outHandler,playForwards and playBackwards) but it had a bug : when you go quickly from one button to the other, the animation doesn't have time to finish and the previous button the mouse was on stops in a position between the over and out state.
I fixed this making different functions for each button and i'm quite happy with that but now the code is much longer and if there are more buttons it will get even longer :
var over1:Boolean;
var over2:Boolean;
var over3:Boolean;
var over4:Boolean;
over1 = undefined;
over2 = undefined;
over3 = undefined;
over4 = undefined;
button1.addEventListener(MouseEvent.MOUSE_OVER,ove rHandler1);
button1.addEventListener(MouseEvent.MOUSE_OUT, outHandler1);
button2.addEventListener(MouseEvent.MOUSE_OVER,ove rHandler2);
button2.addEventListener(MouseEvent.MOUSE_OUT, outHandler2);
button3.addEventListener(MouseEvent.MOUSE_OVER,ove rHandler3);
button3.addEventListener(MouseEvent.MOUSE_OUT, outHandler3);
button4.addEventListener(MouseEvent.MOUSE_OVER,ove rHandler4);
button4.addEventListener(MouseEvent.MOUSE_OUT, outHandler4);
function overHandler1(e:MouseEvent):void {
over1 = true;
button1.addEventListener(Event.ENTER_FRAME, playForwards1);
if (over1) {
button1.dispatchEvent(new Event("overEvent",true, false));
}
}
function outHandler1(e:MouseEvent):void {
over1 = false;
button1.addEventListener(Event.ENTER_FRAME, playBackwards1);
}
function playForwards1(e:Event):void {
if (over1 == true) {
button1.nextFrame();
}
}
function playBackwards1(e:Event):void {
if (over1==false) {
button1.prevFrame();
}
}
function overHandler2(e:MouseEvent):void {
over2 = true;
button1.addEventListener(Event.ENTER_FRAME, playForwards2);
if (over2) {
button2.dispatchEvent(new Event("overEvent",true, false));
}
}
function outHandler2(e:MouseEvent):void {
over2 = false;
button2.addEventListener(Event.ENTER_FRAME, playBackwards2);
}
function playForwards2(e:Event):void {
if (over2 == true) {
button2.nextFrame();
}
}
function playBackwards2(e:Event):void {
if (over2==false) {
button2.prevFrame();
}
}
function overHandler3(e:MouseEvent):void {
over3 = true;
button3.addEventListener(Event.ENTER_FRAME, playForwards3);
if (over3) {
button3.dispatchEvent(new Event("overEvent",true, false));
}
}
function outHandler3(e:MouseEvent):void {
over3 = false;
button3.addEventListener(Event.ENTER_FRAME, playBackwards3);
}
function playForwards3(e:Event):void {
if (over3 == true) {
button3.nextFrame();
}
}
function playBackwards3(e:Event):void {
if (over3==false) {
button3.prevFrame();
}
}
function overHandler4(e:MouseEvent):void {
over4 = true;
button4.addEventListener(Event.ENTER_FRAME, playForwards4);
if (over4) {
button4.dispatchEvent(new Event("overEvent",true, false));
}
}
function outHandler4(e:MouseEvent):void {
over4 = false;
button4.addEventListener(Event.ENTER_FRAME, playBackwards4);
}
function playForwards4(e:Event):void {
if (over4 == true) {
button4.nextFrame();
}
}
function playBackwards4(e:Event):void {
if (over4==false) {
button4.prevFrame();
}
}
does anybody have an idea to make this code shorter, maybe by using something similar to the previous code but still fixing the bug. I really need to find a way to make a lot of buttons without writing tons of code.
Another thing i'd like is to have a hand cursor on those buttons, i know i can place a transparent button inside the movie clip but i don't like that, i tried to use useHandCursor but couldn't get it to work.
Picture Perfect
Hey guys...real simple question here!
IN the "cool sites" section there's this post...
http://www.purdesign.ca/
If you enter the flash site you'll notice the big,bright,beautiful background pics
of plants (cool idea)
My question is ...What is the best way to achieve such great looking pictures in Flash?
I've tried photoshop "save for web" gif,png format and jpeg. When imported into flash my pics lose thier vibrance and look "washed"
Anybody?
Perfect Timing
after much deliberation over my goldfish, I'm lost!
nothing seems to work!?
Just for a test run, I have 2 MC's, 1 is of a bland fish swimming happily, and one is is the same fish, fast asleep... I enter the code,
Code:
onClipEvent (enterFrame) {
time=new Date();
seconds = time.getSeconds()
minutes = time.getMinutes()
hours = time.getHours()
if (time.hours >13) {
gotoAndPlay(2);
}
}
in frame 1... and
Code:
onClipEvent (enterFrame) {
time=new Date();
seconds = time.getSeconds()
minutes = time.getMinutes()
hours = time.getHours()
if (time.hours >14) {
gotoAndPlay(1);
}
}
before even testing, I checked for errors, and the output gave me...
Quote:
**Error** Scene=Scene 1, layer=actions, frame=1:Line 2: Clip events are permitted only for movie clip instances
onClipEvent (enterFrame) {
Total ActionScript Errors: 1 Reported Errors: 1
which threw me off course, So I tried removing the onClipEvent, and well the output was fine, but it was 13:20 and the fish was still awake!?
OK, question time
1) Why wont my fish go to sleep?... (i.e fix my code!!!)
2) At the moment he goes to sleep after 1PM (13 hours)... but what if I want him to sleep at say 1:35 (13 hours, 35 minutes) how would that fit in the code??
THANKS!
Perfect Circle
After taking Senoculars (wonderful) trig tutorial, I started messing with trig, and came up with a method to make a perfect circle using ActionScript. Check it out!
The Old Perfect Fade
I'm using the perfect fade for a menu. It's not fading in, it's sliding it. On the rollover, the menu slides out, then the buttons appear at the end.
Everything works fine until I rollover the buttons. They frantically blink on the Rollover. It's almost like the mc is trying to go to the prevFrame but can't.
Anyone know of anyway to make this stop?
The Perfect Preloader
http://www.versusmediagroup.com/kirupa/preloader/
Okay first off I am not going to even try to take credit for this great preloader. I got it from the Macromedia Developers site and its free there but I have been looking for one that had this much freedom and here it is.
When you open the '.fla' file you will see, in the library, a movie clip called progress_mc. The great thing about this preloader is that you can put whatever animation you want and it will play it as the preloader and it will slow it down as needed. It also playes the entire movie clip so you see it smoothly go all the way threw your animation.
Again i did not create this code here is a link to who did...write him and tell him how much you love him!
http://www.macromedia.com/devnet/mx/...preloader.html
Perfect Background
This is driving me crazy. Im doin a FBF and I wanna have a 100% picture in the background. Th problem is, when I scale the flash I want the picture to scale "untouched" with it.
Good examples:
http://www.diesel.com/
http://www.gskinner.com/site2_5/
Ok example
http://www.setvariable.com/elastic/
NO GOOD EXAMPLES:
http://www.secondstory.com/
http://www.revolvercreative.com/flash.html
can somebody PLEASE help me - Im goin crazy!!!
What Is The Perfect Size?
what is the perfect size i should work with? im not too fimilar about sizes and stuff this is going to be for a webpage. Should i be working with a 800x600 template ? and if so does that mean i just set it as 800 x 600 on flash or does it need to be bigger. Kinda confused..like what is the header for the size of this site now? thats the size i need
|