A Btn, A Mc And Hit States.. Plz Hlp (link Incl.)
Hey ok so I have this file I'm working on (http://www.geocities.com/zflategraff/index.swf)and I have 3 objects here. I have the dock_Mc that is the dock animation, I have the dock_Btn which is essentially just a hit state to activate the dock_Mc to animate (redundant I know, but not sure where i was going with that at the moment, im fried) and the buttons within the dock that grow and shrink. I want the buttons and the dock to animate at the same time when the rollOver events are triggered and for them to work together. Right now I am only able to have one or the other work. If you could help me out in any way I would really appreciate it!!Thank you!!
Adobe > Flash General Discussion
Posted on: 08/30/2007 02:54:30 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Grindingly Basic: Mailto Link With Over And Down States
Fellow travellers:
I've just spent three (3) hours attempting to create a mailto link with Over and Down states, and failed. Fine. I'm a moron.
Static text with the URL property box correctly filled in (assigned) links like a charm, but there's no mouse states. The same if the static text is in a movieClip. Any script pertaining to the movieClip breaks the URL linkage. Putting the static text in a button produces bizarre flickerings in step with the URL property being assigned, and no linkage. I also haven't been able to create a link using ActionScript.
Not that any of this would be news to y'all. I mention it only to indicate that I've committed as many basic mistakes as intuitively came to mind, and a great many others I had to strain to invent, owing to my limited mental capacity.
Will some kind soul kindly point me down The Way? Or effective documentation, which I also could not find? I am a moron, and I plead for sanctuary.
Any help will be gratefully consumed.
- PF
Attaching A MC- Help Please- Fla Incl.
Sorry to bother you guys (and girls) but im having a bit of trouble attaching a MC. normally I can figure these problems out but I've reached a sticky point here i guess.
I first put the code in the main frame and it didnt work so i created a controller mc but it still didnt work.
any suggestions-
[F8] FLV Dilemma Please Please Help - Code Incl.
hi,
i'm using flash 8 and am importing flvs. i have seriously searched this group (and a few others) and cannot find an answer. in my swf the user can press one of 4 buttons to view a linked flv. the prob occurs when they want to see a different flv half way through watching one, or navigate to a different section the sound stays on. can i unload the flv someway? my code is
Code:
vid1.onRelease = function() {
import mx.video.*;
my_FLVPlybk.contentPath = "Portfolio_1.flv";
trace("vid1"); };
vid2.onRelease = function() {
import mx.video.*;
my_FLVPlybk.contentPath = "Portfolio_2.flv";
trace("vid2"); };
vid3.onRelease = function() {
import mx.video.*;
my_FLVPlybk.contentPath = "Portfolio_3.flv";
trace("vid3");
};vid4.onRelease = function() {
import mx.video.*;
my_FLVPlybk.contentPath = "Portfolio_4.flv";
trace("vid4"); };
var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void {
if (my_FLVPlybk.contentPath == "Portfolio_1.flv") {
trace("Do something here."); } };
my_FLVPlybk.addEventListener("complete", listenerObject);
i really appreciate any help as this is really a difficult one for me. thank you
How To Stop Scrolling? (example Swf/fla Incl.)
Hey,
I have a serious problem. I have a script wich moves an image depending to the y,x mousecoordinates. how can I stop the movement within a square of 15by15px in the center of the stage?
here is the example .swf
http://www.awesome3d.de/needhelp/scrolling image.swf
here is the code:
// variable for the image instance path (symbol: reef_graphic, instance: img)
varimg = _root.img;
// variable for the background instance path (symbol: background, instance: bgd)
varbgd = _root.bgd;
// speed of the mouse scroll (between 0 and 1)
v = 0.16;
// mouse position
mousex = -1*varbgd._xmouse;
mousey = -1*varbgd._ymouse;
// image position
imgx = getProperty(varimg, _x);
imgy = getProperty(varimg, _y);
// distance fom the center to the left, right, top and bottom side hier die/2 ändern
left = getProperty(varimg, _width)/2;
right = (getProperty(varimg, _width)/(-2))+(getProperty(varbgd, _width));
top = getProperty(varimg, _height)/2;
bottom = (getProperty(varimg, _height)/(-2))+(getProperty(varbgd, _height));
// scrolling of the image
setProperty(varimg, _x, (imgx+(mousex*v)));
setProperty(varimg, _y, (imgy+(mousey*v)));
// stop the image on the horizontal side
// left
if (getProperty(varimg, _x)>=left) {
if (mousex>200) {
mousex = 200;
setProperty(varimg, _x, left);
} else if (mousex<200) {
mousex = varbgd._xmouse;
setProperty(varimg, _x, (imgx+(mousex*v)));
}
}
// right
if (getProperty(varimg, _x)<=right) {
if (mousex<200) {
mousex = 200;
setProperty(varimg, _x, right);
} else if (mousex>200) {
mousex = varbgd._xmouse;
setProperty(varimg, _x, (imgx+(mousex*v)));
}
}
// stop the image on the vertical side
// top
if (getProperty(varimg, _y)>=top) {
if (mousey>200) {
mousey = 200;
setProperty(varimg, _y, top);
} else if (mousey<200) {
mousey = varbgd._ymouse;
setProperty(varimg, _y, (imgy+(mousey*v)));
}
}
// bottom
if (getProperty(varimg, _y)<=bottom) {
if (mousey<200) {
mousey = 200;
setProperty(varimg, _y, bottom);
} else if (mousey>200) {
mousey = varbgd._ymouse;
setProperty(varimg, _y, (imgy+(mousey*v)));
}
}
// can be deleted, usefull for adjust your image
set("_level0:x", imgx);
set("_level0:mx", mousex);
set("_level0:y", imgy);
set("_level0:my", mousey);
I think it's just some kind of "if .... then stop movement" programming but I am not familiar with this at all. any help is recommed.
thanks,
Vico
Flashbanner Incl Popup On Mouseover
Hey!
I'm intrested in making a banner in size 234x60 in flash which will open some graphic or an .swf when I go mouseover (and this graphic or .swf or whatever it is, is actually BIGGER than 234x60). I've seen this kind of banner on MSN Messenger, I think it was a banner for Pirates of Caribbean.
VERY greatful for any answer.
/newform
Flashbanner Incl Popup On Mouseover
Hey!
I'm intrested in making a banner in size 234x60 in flash which will open some graphic or an .swf when I go mouseover (and this graphic or .swf or whatever it is, is actually BIGGER than 234x60). I've seen this kind of banner on MSN Messenger, I think it was a banner for Pirates of Caribbean.
VERY greatful for any answer.
/newform
Convert Flash2avi Incl All AS N Subframes
i made an animated flash cartoon (duration: 10 sec) and i want to convert it to .avi
the problem is:
some softwares (magic swf2avi, adshareit) only convert main frames (3 frames in main stage; 2 first frames for preloader n 3rd frame for mc cartoon).
the s/w cant reach subframes and movieclips in the mc cartoon.
i dont want n i dont have time to rearrange the movies in subframes and placed them in mainstage.
anyone know the software that able do convert all frames/subframes and actionscript in flash to .avi? or any other solution?
thx in advance
Control Volume Of ALL Audio (incl. Of Flv)
Hi
I'm creating a flash presentation that contains some externally loaded video's (flv), voiceovers and a background music. I would like to be able to control all these audio streams with one control. So basically I'd like to change the volume of the entire movie. Is this possible?
I know there's something like the Sound object with a setVolume() method, but that's only to control one stream as far as I know.
I just need to know if it's possible to control all audio with one statement. Something like _root.setVolume() or something?
Thanks
Could A Skilled Programmer Please Lend A Hand? (Diagrams Incl)
Hi there, I've been trying very hard over the last few days to get this little interface working, it's apart of a game I'm making and I can't really move forward until I can finish it.
I've posted on various forums (including this one) but no one has been able to help me, and I'm starting to think that maybe I'm just going the complete wrong way about it.
What I'm building is a Unit Queue system, like that in Warcraft or Starcraft.
You may recognize it, it finds its way into most Real Time Strategy games.
I'm doing pretty much a similiar thing, here is mine:
I've uploaded a working SWF of this so far at:
http://www.liquid-visual.com/PanelTest.html
Up until now I have been building it a certain way, with each unit having a collection of images inside the MC. But perhaps I need to rework it completely? If anyone could help me program this, and take a look at my .FLA I would be very very grateful! I'm so stuck right now I can't move any further.
http://www.liquid-visual.com/PanelTest.fla
Thankyou in advance!
Ffwd/rwnd Button Isnt Continuous-my Script Incl.
this is my ffwd script (rwd the same but > and minus 20)
unfortunately i have to keep pressing the button to keep fwding. i have tried to write a counter but have not been so successful. would anyone mind helping me please, thank you
on (release) {
if ((this.haddock._parent._currentframe+20)<=545) {
this.haddock._parent.gotoAndPlay(this.haddock._par ent._currentframe+20);
} else {
this.haddock._parent.stop();
}
}
Button States, Activating Other Button States ?
Brief description as to what Im trying to achieve:
Im creating a map of a town, the map will have a text list of places on the map..
When the user mouseOvers over the place names (buttons) a slight graphic change will occur (box around the text)
Also when the user mouseOvers on the place area on the map another graphical change will occur (tag pops up)
Up until now I have no problems, this is where my knowledge colapses:
I need to be able to have each button activate the other (mouseOver on the place area will also cause the place name to go into it mouseOver state) - and vice versa - mouseOver of the place name button will also activate the mouseOver state of the place area button.
So in a question, is there a way to force button states to action other buttons into their respective states simultaneously?
Any input would be appreciated
Button States
Hello,
How do you get a button to stay in the "Over" state after it is clicked? Because normally if you click the button, it automatically reverts back to the "Up" state.
Thanks in advance
States Of The Mouse ?
hy,
is there any way for a button action to happen if the mouse pointer, while the button being depressed, mooves in and out of the hit area. (something like paintbrush).
drag out and drag over don't do the thing that I want cause the button action hapens if the mouse button is depressed while in the hit area.
thanx
Button States
I have been trying to figure out how to accomplish the different button states used on the praystation calender. after you have been to a section it goes to gray yet you can still rollover it and it goes to its over state and then when you select it again it is selected. Also the button has knowlege of which movie clips have already been selected and the one that is currently selcted gets sent to the hit already state. I probably confused you there. anyways check praystation's calender http://www.praystation.com and look very closely to how the buttons work. i know there must be a short method for doing this without too many if statements.
thanks in advance
Button States
hello. i have a menu with buttons. is there a script way to make it so that when the movie is in the section of the 'pressed' button, the 'pressed' button remains on the ON state? (except the old way which is to place an ON graphic over the 'pressed' button) i try to minimize graphics everywhere by putting the button in a movie and then having a second frame in that movie with the button on the ON state. but then i have to put individual scripting on each movie so it defeats the efficiency purpose.
if you have any suggestions...
thanks
New States In Button ? Other Than UP, OVER, DOWN, HIT ?
Hi All,
when i was just playing around inside a button i have observed this .. i can create other KEYFRAMES inside a button, other than UP, OVER, DOWN, HIT.. flash is naming them like 5,6,7,8..etc...why Macromedia is allowing to create after 4 states of button ? can we make use of this thing ? or just its a bug ??
any comments ??
Button States
Hi,
How do I get a button to stay in a certain state?
1. Let say I've got a yellow circular button.
2. When the mouse clicks on it, the button turns green.
3. After the click the buttons becomes yellow again.
4. What I want it to do is to remain green.
Why do I want to do this?
1. I've got 5 pages.
2. There are 5 yellow circular buttons that represents each page.
3. If someone wants to go to the 3rd page, he'll click on the third yellow button and the 3rd page comes up while the button remains green as a graphical reminder that he is on the 3rd page.
Hope someone can help me out.
Cheers people.
Button States
Hello,
I have a menu system that consists of 10 buttons. When I click on one of the buttons it becomes disabled (which is how I've programmed it), but what I want to be able to do is enable any other buttons that are currently inactive.
Is there an easy way to do this?
thanks
Button States
When I design my buttons, i usually have them animating for the over state. How is it that on some sites, when the mouse is taken off the button rather than the animation just going back to frame 1 (Like in my buttons) A different movie is played. Is there a roll off state or something?
Dynamic Over States
I would like to make a dynamic over state menu in whic a line comes out of text in the over state, then once done, have buttons appear. I attached a swf file to see what I mean.
Can You Add States For Buttons
Is there anyway to give a button different states? I tried extending the frames, calling one of the frames "dsbld_st" and one "tggld_st", and using some script like this:
_root.big_btn.gotoAndStop("dsbld_st");
_root.big_btn.gotoAndStop("tggld_st");
But that just doesn't work. Suggestions are appreciated.
Buttons States
This may be simple to do, but having not used flash for a while i cant figure it out.
I have a simple button, that once you roll over it an element emerges from the button which then has some text fade in over the top of this. This works fine.
I have worked it out so that when you press the button the element stays where it ended up in the over state, but the problem i have is when you press the button and then release it, it replays the over state all over again.
I want it so that the little element stays where it is once you roll over and even when you click until you roll out. In Director MX i could do a within state - anything like this.
Thanks in advance
Mark
Please Help With Button States
Using FlashMX. I have a mc which is essentially an image, that I use a motion tween to blend into a 2nd image, which is the reverse image of the first. I have 2 buttons on the bottom, "Front" & "Back". I have the action of the front button set to:
on (press) {
tellTarget (card_red) {
gotoAndStop(1);
}
}
and the action of the back button set to:
on (press) {
tellTarget (card_red) {
gotoAndPlay(2);
}
}
where the 2nd frame is the beginning of the motion tween, so it goes into it's motion to blend into the 2nd image.
My problem is that once I'm at the end of the motion, the user can still click on the "Back" button, and it will keep replaying this motion, which I don't want.
Is there a way to set the Back button to not play the motion if it's already at the end of the motion tween? In other words, to say "If it's already at frame 20, do nothing, otherwise, gotoandplay(2)"?
Thanks!
Also, I'm transitioning from the "front" of the image to the "back" image, but when I'm at the back image, is there a good method of transitioning back to the "front" again? Currently, clicking on "front" again just goes directly to frame 1 again.
Thanks!
Roll Over States
I'm trying to create bouutons w/ over states that stay until you click another botton, can anyone point me to where I can find the code?
Thanks.
Button States
Hi All,
I have a button (b1) , which I need to disable once I click it, later I enable it again, by clicking another button (b2) .
The code I have used is
******************************
b1.onRelease = function() {
b1.enabled = false;
};
b2.onRelease = function() {
b1.enabled = true;
};
*******************************
The problem is when I click on the b1, the over state of the button is still visible and only when I click again or when I take the cursor out of b1 and come back, only then the button looks disabled.
When i give b1.onPress and the same code, it works immediately, but not on b1.onRelease.
Could someone help on this.
Thanks in advance.
Two States Element.
i am trying to add a two states element to my movie that will change from one state to the other by clicking it , how should i do that?
any help will be apriciated.
Cursor With 3 States
hi there,
is it possible to make a custom cursor which actually has 3 states:
up over down
All states are different. Tnx for your help.
Character States
in reference to this tutorial:
http://www.flashkit.com/tutorials/Ga...1052/index.php
or just in general, how do you change the
graphic in a movie clip or something like that, so that like you can make it look like your character is walking when you press LEFT or another button?
Button States - Help
I have a button right now that is gray. When a viewer hits it, it turns green. Now, when they go to another button, I want that button to go back to gray. Does anyone know how to do this? My button states are currently built as such:
Movie clip, then button states with stop and go to actions.
Each button (which is first a Movie Clip) are all on scene one.
Any help would be great! I would even rebuild to get this to work.
thanks!!
N
Button States Help
I have a button right now that is gray. When a viewer hits it, it turns green. Now, when they go to another button, I want that button to go back to gray. Does anyone know how to do this? My button states are currently built as such:
Movie clip, then button states with stop and go to actions.
Each button (which is first a Movie Clip) are all on scene one.
Any help would be great! I would even rebuild to get this to work.
thanks!!
N
Button States Help
I have a button right now that is gray. When a viewer hits it, it turns green. Now, when they go to another button, I want that button to go back to gray. Does anyone know how to do this? My button states are currently built as such:
Movie clip, then button states with stop and go to actions.
Each button (which is first a Movie Clip) are all on scene one.
Any help would be great! I would even rebuild to get this to work.
thanks!!
N
Two States In One Action
Is it possible to use this constructor with two states?
_root.map_mc.myCity_btn.onRollOver = function(){
county_mc.county_txt.text = myArray[41];
startDrag("county_mc", true)
};
_root.map_mc.myCity_btn.onRollOut= function(){
stopDrag();
county_mc._x = -100;
county_mc._y = -100;
};
The prblem is: when I am drag the mouse out of this button (myCity_btn or a movie clicp as I had before - myCity_mc) the county_mc (the dragged movie clip) "sticks" on my mouse. Is there a way to use what I ahve above but putting the two actions in the same handler? i.e
_root.map_mc.myCity_btn.onRollOut, onDragOUT= function(){
....
Any hints? Thanks.
Button States
Hello, I'm new to this and building buttons for my site. I have the button set up where it's grey in the up state, and red in the rollover state. I want the button to remain red once clicked - how do I do this?
thanks
Buttons States
Hi I seem to be having a blank on such a simple problem but hey here goes.
I have a series of buttons that change text in a box from an external txt file allworks well with this. The problem is that as you roll over the image a light blue section appears great but I cannot get that to stay once the button is clicked, so that the viewer would know where they are.
FLA attached
I have tried attaching the file without success.
Leaving Over And Down States?
Lets say I have a button that loops 40 frames on the up state. When I go into the over state, I want it to play the over state frames, but if i leave the over state, I want it to play frames in a "leave over state" clip before going back to the upsate.
Same with down and back to up.
Anyone have any ideas on how to do this?
Its a lot like the drop down menus at fuzzproductions when you leave the menu.
http://www.fuzzproductions.com/
If Else With States And Zip Codes
I'm having trouble with my script..
I'm making a form that directs you to the proper person in that area.
When I try inputing another state such as NY it keeps outputting "John Doe 2" instead of the proper name.
Here is my script. I don't know if I can't switch up zip and state..
Any help would be greatly appreciated !
on (release) {
if (zip>15000 && zip<16899) {
name = "John Doe";
}
else if (zip>16900 && zip<19699) {
name = "John Doe 2";
}
else if (state = "NJ") {
name = "John Doe 3";
}
else if (state = "NY") {
name = "John Doe 4";
}
}
Button States
Hi,
This should be really simple but for some reason it isnt working:
I have a button entitled Volume Control, inside the button i have inserted a keyframe on the hitframe and swapped the symbol. When the user presses the button i was expecting this to change the state of the button but it doesnt.
Any ideas why?
Buttons And Its States
Hey folks.
I was wondering if someone could tell me how the mouseover and mouse out states works in AS3?
How do i make a button that has a mouseover and a mouseout as well as a on press state. So one animation for mouseover, one for mouseout and a "solid' state when it is pressed (active).
I assume i start out by using a MC as a button?
Thx in advance
Button States
Hi,
I am trying to code my button. Right now, the rollovers, rollouts and onClick states are working. But, if I click on 3 buttons, they all go to the onClick state. I want to click on HOME, have it go onClick, and then if I go to ABOUT, have the HOME button remove the tint. Hope this makes sense.
Code:
home_mc.buttonMode = true;
about_mc.buttonMode = true;
construction_mc.buttonMode = true;
home_mc.addEventListener(MouseEvent.CLICK, newPage);
about_mc.addEventListener(MouseEvent.CLICK, newPage);
construction_mc.addEventListener(MouseEvent.CLICK, newPage);
// mouse click
function newPage(e:MouseEvent):void{
if(menuName != e.target.name){
TweenMax.to(e.target, 1, {tint:0x273555, ease:Back.easeIn});
}
}
Clip Art - 50 States
Does anyone know where I can find some clip art of the 50 states of the United States?
Why Do Buttons With Over States Sometimes...
aloha all,
i notice sometimes my buttons will move a little on their over states. yes i am adding features to the over state but i am not adjusting the buttons location on the stage. sometimes different ones move in different preview modes. for instance, if i do a flash preview of my site buttons #A and #C will glitch a little to the left on a mouse over event. but if i do a html preview of the same site buttons #B and #D will glitch a little to the right. what gives? very annoying. is there something i am missing here.
as a work around i have tried to go and move the over state a pixel in the opposite direction but this always makes matters worse because then it will actually start to move the direction i moved it in.
any feedback is appreciated.
aloha
d~
MC With 4 Button States
Hi -
I' m using an MC for a button. It has 4 states, up, over, down and hold...10 frames apart on the timeline.
The first onRelease brings the mc to the "hold" state. The next on Release would return it to the "up" state. The problem arises when the onRollOver occurs. The mc's timeline jumps to the "over" state so I can't direct it with something like "if on hold then go to up".
How can I do this?
Attach Code
box_mc.onRollOver = function () {
gotoAndStop("over");
}
box_mc.onRollOut = function () {
gotoAndStop("up");
}
box_mc.onRelease = function () {
gotoAndStop("hold");
}
//that's as far as I've gotten.
AS For Button States
I have a menu that consists of 5 buttons. Each button has rollover functionality that changes the text from white to red when the mouse is rolled over them. What I want to happen is that when you click one of the menu options, I want the button to remain red, showing that it's the active section that the user is viewing. I've tried doing this both by using buttons and movie clips but I think my actionscript for reseting the color on roll out is messing me up. Any help?
Two Mouseover States
I have a MC which scrolls out from the side on a rollover event to reveal a submenu withing the MC.
Within this mc are buttons. When the mouse rolls over a button within the mc (which has just scrolled out with a rollover event), the menu tries to scroll back as it detects the mouse is over the button and not the mc. the menu get stuck in scrolling limbo as it hits the button, then the mc, then the button... etc.
Any way around this?
please see my previous thread for more details.
http://www.kirupaforum.com/forums/sh...ad.php?t=78118
Thanks!
Nav Button States
I have a menu with five nav buttons (atcually MovieClips). Each has three frame labels: "on", "stay", and "off". The rollover and rollout animations play flawlessly, but I'm at a loss as to how to give each button a sticky "active" state. I'd like the button to stay in it's active state until another button is clicked, then I would like it to play it's "off" animation.
Each MC has this code:
Code:
onClipEvent(load){
this.btnLabel_mc.btnLabel.text = this._name;
}
on (rollOver) {
this.gotoAndPlay("on");
}
on (rollOut) {
this.gotoAndPlay("off");
}
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = this._name;
_root.content.loadMovie(this._name+".swf");
} else if (_root.currMovie != this._name) {
if (_root.content._currentframe >= _root.content.midframe) {
_root.currMovie = this._name;
_root.content.play();
}
}
}
See the swf in action at:
www.jason-carlin.com
Thanks for your help
Frames And States
Can anyone tell me, when you load data from an XML file, is that data available across the movie (all frames and layers) or just the current frame and layer?
Thanks
If Else With States And Zipcodes
I'm having trouble with my script..
I'm making a form that directs you to the proper person in that area.
When I try inputing another state such as NY it keeps outputting "John Doe 2" instead of the proper name.
Here is my script. I don't know if I can't switch up zip and state..
Any help would be greatly appreciated !
on (release) {
if (zip>15000 && zip<16899) {
name = "John Doe";
}
else if (zip>16900 && zip<19699) {
name = "John Doe 2";
}
else if (state = "NJ") {
name = "John Doe 3";
}
else if (state = "NY") {
name = "John Doe 4";
}
}
Rollover States?
Hi Everyone
Trying to get my buttons/MC to behave like
http://www.wddg.com/johnmarksorum/jms_photographer.asp
how are these chaps getting the "button" to play out like that once the mouse moves off the "button"?
I tried making a MC but the movieclip gets stuck sometimes if I move my mouse really quickly over it.
Suggestions would be much appreciated
RYU
Button States
Hello:
I've been trying to comprehend the buttons states tutorial at -
http://www.zedia.net/making-a-simple...ctionscript-3/
But I get lots of errors. I was wondering if someone could take a look at my file and tell me what the problem is...
|