Right Click In A Specific Area
Does anyone know how in the world to make the menuItems that appear on right-click be different depending on where the user's mouse is over?My idea is a mouse over if statement, but that seems cumbersome.
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 12-01-2006, 06:50 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Load External Swf Into A Specific Area And Confine Interactivity To That Area... ?
Hello again,
I have a problem I've been trying to solve below.
I have a file that loads external swf files onto the screen, but I need these swfs to load into a specific 1024x644 area in the main movie.
I need the external swfs to maintain their interactivity while the mouse is over their area, but not when the mouse is over other parts of the screen (I need other buttons to still be accessible outside the area of the loaded swf.
As it is now, the mouse properties of the loaded swf take over the entire movie and render the buttons useless.
Below is some code I'm using. Can anyone provide examples of code that positions an external swf into a specific area and contains its interactivity?
I'm still very new to AS, so it's difficult for me to understand how to do things without specific code examples to look at. Also, if my code is inefficient or sloppy, please let me know.
Thanks.
var loader:Loader = new Loader();
function buttonPush1(event:MouseEvent):void {
var url:URLRequest = new URLRequest("mousetrail_644.swf");
loader.load(url);
this.addChild(loader);
}
Btn1.addEventListener(MouseEvent.CLICK, buttonPush1);
function buttonPush2(event:MouseEvent):void {
var url:URLRequest = new URLRequest("magnify2.swf");
loader.load(url);
this.addChild(loader);
}
Btn2.addEventListener(MouseEvent.CLICK, buttonPush2);
function buttonPush3(event:MouseEvent):void {
var url:URLRequest = new URLRequest("mapcursor_644_2.swf");
loader.load(url);
this.addChild(loader);
}
Btn3.addEventListener(MouseEvent.CLICK, buttonPush3);
function accessDenied(event:MouseEvent):void {
gotoAndPlay("scanner_denied");
}
Btn4.addEventListener(MouseEvent.CLICK, accessDenied);
Zooming In To Specific Area
Hi,
I have a movieclip which contains an image. What I want to happen is when an area of the image is clicked, the mc zooms in on the area that was clicked.
I don't know the best way to do this - does it make sense?
Load MC's To Specific Area
Im trying to create a simple gallery and yes, I know there is tutorials here, but thats not exactly what im looking for. Im not trying to use any xml and stuff. Anywho, here is my question.
I want to have some buttons that loads MC's from the library and onto a specific area on my stage. If thats possible.
Lets say I have a container on stage and a "button 1". And in the library I've got a "MC 1". When I click on "button 1", "MC 1" will be loaded from the library and into the container. And so forth with button 2, 3, 4 and MC 2, 3, 4 etc.
See what im aiming for? I understand we need some linkage here and some interesting code on the buttons. But I don't know what and how!
Peace!
Zoom Into Specific Area
have got a map 600 x 600 pixels. when the mouse clicks i want to centre the point clicked and zoom in 3 times.
I can't seem to figure it out. I've had to settle for this zoom function but its not good enough.
there must be an easy way using _xmouse and _ymouse?
i thought at first something like
prop._x = prop._x - (_root._xmouse*3);
prop._xscale = 300;
but it doesn't seem to wwork out.
am i missing anything obvious?
cheers dan
ActionScript Code:
function zoomin() {
if (_root._xmouse<prop._x+200) {
prop._x = prop._x;
} else if (_root._xmouse<prop._x+300 and _root._xmouse>prop._x+200) {
prop._x = prop._x-300;
} else if (_root._xmouse<prop._x+400 and _root._xmouse>prop._x+300) {
prop._x = prop._x-600;
} else if (_root._xmouse<prop._x+500 and _root._xmouse>prop._x+400) {
prop._x = prop._x-900;
} else if (_root._xmouse<prop._x+600 and _root._xmouse>prop._x+500) {
prop._x = prop._x-1200;
}
if (_root._ymouse<prop._y+200) {
prop._y = prop._y;
} else if (_root._ymouse<prop._y+300 and _root._ymouse>prop._y+200) {
prop._y = prop._y-300;
} else if (_root._ymouse<prop._y+400 and _root._ymouse>prop._y+300) {
prop._y = prop._y-600;
} else if (_root._ymouse<prop._y+500 and _root._ymouse>prop._y+400) {
prop._y = prop._y-900;
} else if (_root._ymouse<prop._y+600 and _root._ymouse>prop._y+500) {
prop._y = prop._y-1200;
}
///
prop._xscale = 300;
prop._yscale = 300;
}
function zoomout() {
prop._x = 0;
prop._y = 0;
prop._xscale = 100;
prop._yscale = 100;
}
How To Get A Movie Clip Into Specific Area?
Hi,
Another dumb question from a newbie.
I've got a 750x450 Flash movie. Within this flash movie I have a menubar movie which I placed onto the main movie. So basically what I have is a horizontal menu placed at the top of the main movie.
What I want to do is on clicking the menu buttons is to be able to get a movie clip into an area underneath the menubar. The movie clips would be the "homepage", the "about us" page etc. What kind of actionscript should I put on the buttons?
Is this the best way to do it? By "best" I meant most modular so that it would be easy for me to make changes.
Please help.
Loading External Swf Into Specific Area?
Hi guys,
I would like to loadMovieNum into a specific area, without having to recompile and fix the positions of the original movies.
How could i possibly do that?
Thanks
Loading Movie To Specific Area
Greetings,
I have my main movie, it's 740x460. I would like to load a movie that is 200 x 200 (as an example) to a specific area of the main movie. How do I do that?
Loading Movie In Specific Area
Hi there,
I'm new to the forum, not really that new to flash but I have never tried to make a website in which the seperate sections get loaded seperately when you click a specific link to them. I'm now making a website dedicated to artwork, so there are a lot of bytes to be loaded. Could someone explain me what is the most easy way to make a website that loads seperate parts, with seperate preloaders, when you click on the links to that section? I have read a tutorial about loading and unloading movies in a specific space, but it just doesn't make sense to me. And since I do not know that much about action scripting yet, I reaaaaaally could use some help, or a link to a very clear tutorial, with action scripting already there for me to copy and paste! Thank you very, very much!!!
Have a great day!!!
ROB
http://www.robjacobs.nl
[F8] Randomising Objects Within A Specific Area
Hi everyone, flash newbie here. Currently I'm doing this game where the character's main objective is to walk along a path leading into rooms (picture them from top view) to collect objects.
My question is
a) How do I make the objects appear randomly within a specific area (ie, the room and not any other part of the screen) every time I restart the game? I've searched tutorials on these and all I got was having the object appear randomly for the whole screen, and not specific areas.
b) How do I make the character walk along a specific path and not outside of it? Meaning, the character is only able to enter the room through the opening and not through the wall, etc.
If anyone needs the fla file, I'll be happy to attach it.
Thanks a million if anyone can help out; I've searched many tutorials but didn't find what I want.
[F8] Randomising Objects Within A Specific Area
Alright everyone, sorry for this repeated post from flash newbie, but I thought it more appropriate to post here... tried to delete the other one but couldn't, so if any mod could do me the favour it'd be much appreciated, thanks.
Okay, currently I'm doing this game where the character's main objective is to walk along a path leading into rooms (picture them from top view) to collect objects.
My question is
a) How do I make the objects appear randomly within a specific area (ie, the room and not any other part of the screen) every time I restart the game? I've searched tutorials on these and all I got was having the object appear randomly for the whole screen, and not specific areas.
b) How do I make the character walk along a specific path and not outside of it? Meaning, the character is only able to enter the room through the opening and not through the wall, etc.
If anyone needs the fla file, I'll be happy to attach it.
Thanks a million if anyone can help out; I've searched many tutorials but didn't find what I want.
[F8] Member Area Specific To Each User?
Hiya,
I would like to create a member area on my site which displays specific content to certain members.
Is this possible? If so, how can i acheive this?
Thanks in advance
Move To Specific Area Of MC OnRelease?
Hi, I am new to actionscripting, so please be gentle!
On my stage, I have a movie clip called "main." Inside "main," I have 4 other MC symbols (named "green" "red" "blue" and "orange").
I have the MC's placed so that only the "green" MC is showing in the center of the stage. The other symbols are off the stage, out of view.
On the main stage, I also have a navbar, with 4 buttons (named "green_btn" "red_btn" "blue_btn" and "orange_button").
What I want to do is: When you click on "blue_btn" the MCs will rotate clockwise so that "blue" is showing in the center of the stage. When you click on "red_btn," the MCs will rotate clockwise so that "red" is showing in the center of the stage, and so on.
Does that make sense?? I will include an .FLA of the setup.
I don't know how to do this with actionscript. I can only do it with tweening, and that only works if I click the buttons in order. Please help. Thank you in advance!
Fade Out Within A Specific Area Of The Stage
hi guys i've been tinkering AS 3 for a quite some time and i just got stuck in making this kind of effect.
here is what i have so far
ActionScript Code:
import gs.TweenLite;
import gs.easing.*;
var aSideNumN:Array = new Array(num01N, num02N, num03N, num04N, num05N, num06N, num07N, num08N, num09N, num10N, num11N);
var aSideNumP:Array = new Array(num00, num01P, num02P, num03P, num04P, num05P, num06P, num07P, num08P, num09P, num10P, num11P);
stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveY);
function mouseMoveY(event:MouseEvent):void {
trace(mouseY);// check mouse X location
//positive numbers
var Pcount:Number = aSideNumP.length;
for (var p:Number = 0; p<Pcount; p++) {
TweenLite.to(aSideNumP[p], 1, {y:mouseY - p*70, ease:Back.easeOut});
}
//negative numbers
var Ncount:Number = aSideNumN.length;
for (var n:Number = 0; n<Ncount; n++) {
TweenLite.to(aSideNumN[n], 1, {y:mouseY + n*70+70, ease:Back.easeOut});
}
}
i made a group of movie clips follow my mouse's Y coordinate. now i want my movie clips to fade out their Y coordinates is below 300 and if their Y coordinates is above 600. what is a good approach is making this kind of effect in AS 3?
Cut The Image Inside A Specific Area
Hi,
I am trying to create a project similar to facethemonkey.com. People can upload their image and copy their head and paste into somewhere else. I know how to copy the area in square shape but unlike the facethemonkey, you can cut only the head out. Is there anyone know how to do that or can point me to the right direction?
Thank you.
Printing A Specific Area In Flash
can ne help me out, i have created a colouring application and i want to print out a specfic area of the colouring application. does ne1 know how to do this,??????
Loadmovie Into A Specific Area On Screen?
When you click on the link to the left, it loads a 'game' swf file.
What I need to know is how to have it load within the 'Content' box.
http://members.shaw.ca/mccall1/flash...size(web).html
- Mike
Print A Specific Area Of Flash ?
Hi there
Im trying to print just a part of a movie. is that posible ?
with this : printAsBitmapNum(0, "bframe") print the whole document size and I don't need that. I need to specify from whwre to where to capture the movie :
example print form y10 to x350 ;
is that posible ?
thank you very much
Edited: 11/22/2006 at 06:00:19 PM by costin
Mouse Follower In Specific Area?
I'm not sure if I can explain this clearly enough because I'm not familiar with all of the terms but I will try.
I have created a flash banner to act as a meter. The 'brain' logo is to move up and down the mercury of the thermometer according to the placement of the mouse on the text a long side the banner.
Right now I have the 'brain' logo set as a tween in that area; however this is not what I want. I also have a 'brain' logo follower which is pointless that I only made trying to figure this stuff out.
If someone could please point me in the right direction, I would really appreciate it.
For an idea of what I'm talking about the flash banner is located here.
Keep in mind that it is only a concept right now.
Thanks.
Zooming To Specific Area Of Entire Swf?
Hi,
I'm totally pulling my hair out on this one. I need to implement setZoom() to zoom into a specific area of my swf. I have searched everywhere but cannot find a working example of this. Sorry but baby steps required on this one!
thanks for your help!
rasoo
Follow Mouse In Specific Area Help
I understand that the custom mouse would be on all of the flash document, but is there a way to make the mouse work in one specific area?
http://www.whosid.co.uk/new/Website.html
I want the Mouse to only appear within the Box.
Thanks, much appreciated.
Caption Displayed In A Specific Area.
Hi all.
What I am after is when rollover button for a caption to be displayed in a particular location that has been prepared, rather like the caption tutorial, except this will be revealing more than a word but rather a sentence. I already have an effect for the rollovers and would like to know a good way of doing this. I have four buttons and require a caption for each on rollover,
anyone have ideas??
T
Swap Cursor Over Specific Area On Stage?
Can anyone tell me how to swap the cursor with a different image over a "specific area" within the stage.
I found the tech notes on macromedia.com to swap the cursor within the "whole stage", but nothing that tells me how to do it in just a specific area. I want to replace the cursor with an image of a magnifying glass over a specific image, and click to enlarge it the image.... Thanks in advance...
rickcornett.com
How Do I Get A Code To Activate Only When Mouse Is In A Specific Area?
This code is supposed to make a movie clip follow the mouse which it does. However, how do I get it to work only when the mouse is in a specified area instead of anywhere in the movie?
onClipEvent (enterFrame) {
//x movement
mx=_root._xmouse;
if (mx<_x) {
dx=_x-mx;
}
else {
dx=mx-_x;
}
moveSpeedx=dx/10;
if (mx<_x) {
_x=_x-moveSpeedx;
}
else {
_x=_x+moveSpeedx;
}
}
Print Specific Area Problem ARRRG
ARRRG
I am following the be book on useing #P #B. It just prints everything and anything in the file. Am I not getting Bounding Box. I created a square movie clip athe the size needed and labeled that fram with #B.
Help!
Are there some better tutorials out there?
Kyle
1/17/03
Now that I have looked at things further, it seems that swapdepth is messing things up and the fact that the print function stops the play head. Everything gets ignored. Is there a way to put it all into a director shell, to get it to Print????
please help
Constrain Drag Mouse Within Specific Area
Your help is much appreciated...
I would like to use start drag on the button but it has to constrain within an irregular area...
Any idea please?
attached fla for shape to constrain to.
Codeing To Drag Symbols To Specific Area
Flash MX
I have created several symbols for a school website and want to allow the user to be able to drag and drop them to a specific area on the screen but not all the symbols go to the same area.
They must be allowed to put them in the wrong one and then told how many they got wrong and option of retrying.
After 3 tries if still not right then the answer should be provided.
Please help me!!!
[F8] Anyone Have A Suggestion For Replacing My Cursor In A Specific Area?
Anyone have a Suggestion for replacing my cursor in a specific area?
Hi,
Anyone have a cool trick for replacing my cursor in a specific area or were I can find a good tutorial?
Here’s what I’d “like” to do….. I have an MC that has a dragable section. I’d like the cursor to change to my hand.jpg when it’s over the dragable area.
In advance thanks for any help; everyone on the forum is super helpful.
Thanks
Print A Specific Area Of An MC On The Stage - IFBIN Example
Hi,
First time to use the print command in flash, I would like to know how I can print a specific mc that is alwayes centered on my stage. I am using the following modified example from IFBIN to print as a Bitmap which doesn't do it ofcourse, I need to modify it properlly so it works right, but the print area thing in flash is driving me crazy.
The mc is about 800px X 518px centered on the stage, if I tell it to print, it tries to print the whole stage starting from the far top left corner on my screen and crops the rest. I can't get it to print only the area of that mc!.
Here is what I am playing around with:-
Code:
function PrintScreenShot (target:MovieClip)
{
_screenshot = new BitmapData ( target._width , target._height , true , 0xFFFFFF );
//_screenshot = new BitmapData ( Stage.width , Stage.height , _bTransparent , _bgColor );
// Attach a new movieclip named screenshot_mc to _level0 at next highest depth
_screenshot_mc = _level0.createEmptyMovieClip ( "screenshot_mc" , _level0.getNextHighestDepth () );
// Attach our bitmap to the screenshot
_screenshot_mc.attachBitmap ( _screenshot , 1 );
// Draw level0 into our bitmap - this will capture all the action in our movie
_screenshot.draw ( _level0 );
// Create a new printjob
_printJob = new PrintJob ();
//trace(target._x + " " + target._y + xw + " " + yh);
/*var topLeft = 0;
var topRight= _screenshot_mc._width;
var bottomLeft= 0;
var bottomRight= _screenshot_mc._height;*/
var topLeft = target._x;
var topRight= _screenshot_mc._width;
var bottomLeft= target._y;
var bottomRight= _screenshot_mc._height;
// Fire off the print job and test for success
if ( _printJob.start () )
{
var xw = _screenshot_mc._width;
var yh = _screenshot_mc._height;
//if ( _printJob.addPage( _screenshot_mc , { xMin:topLeft , xMax:topRight , yMin:bottomLeft , yMax:bottomRight } , { printAsBitmap:true } ) )
if ( _printJob.addPage( _screenshot_mc , { printAsBitmap:true } ) )
{
_printJob.send ();
}
}
// Delete our print job when finished
delete _printJob;
// Get rid our our screenshot movieclip
_level0.removeMovieClip( "screenshot_mc" );
// Free up the memory used for the bitmap so we can do it again
_screenshot.dispose ();
}
any help is much appreciated.
Thank you
CS4 Deco Tool Within Mask Or Specific Area?
So far, I've used the deco tool to animate some interesting background patterns. However, I would like to use it for something other than backgrounds. For instance, rather than a vine and leaf pattern on an entire page, could I instead fill a specified area? If I was to use the deco tool to create grass, for instance, I wouldn't want to fill the entire stage, but just a specified area.
If I use a mask... my concern is that its not animating just that section, so elements will be cut off.
Edited: 01/18/2009 at 08:36:06 AM by hzp1
How To Scroll To Specific Area In Text Field?
I am wondering if there is a way to scroll down to a specific area of a text field aside from directly using the scrollV property (specifying the line #). The example would be clicking a "D" button in a glossary and having the text field scroll down to the the beginning of the D terms. Obviously a simple thing in HTML with named anchors, but how to emulate with Flash AS3?
Zooming Specific Area Of Panned Image - Help
Hello,
I've been working on a virtual tour idea which uses a large image that is masked by a smaller square. Buttons or the mouse basically control the x and y coord.s of the large image allowing you to scroll and view it inside the smaller square.
My problem is, I want to be able to scale the larger image(sets of 10% up to maybe 250%) to zoom in, but as the image scales, the viewed area inside the mask shifts.
Does anyone know how to readjust the images x,y coords while zooming so that the area inside the mask remains in view? I'm thinking its a calculation based on the new height and width of the image as is scales, but I cant figure it out.
Any help on this would be greatly appreciated.
Thanks,
-E
A Question About Loading Swf Files Into A Specific Area On The Stage
i want to create a flash presentation for university.
i have a lot of imformation.
Images
movies.
text
.........
i want to create 3 to four sperate swf files with imformation on them, like images. i want to then load the swf files into a main menu screen (acting as a mother to all).
how can i load swf files when told into the right hand corner of my main flash file.
if this isnt clear plz ask.
How? Tween User Manipulated Object To Specific Area.
I have a mc(movieclip) that is able to be dragged by the user around the stage(startdrag, stopDrag). When the user finishes manipulating this mc, they click a button and the mc needs to animate to a specific place on the stage (this button also triggers the movie to continue playing at a specific frame further down the timeline). Thanks for the help.
Adding An Event Listener On A Specific Area In A Video..
Hello everybody,
I am sure this is supposed to be very simple. I want to use only ActionScript (No editing through CS4).
All I want to do is to place some sort of mouse click event listener on a certain area (that I tried defining with a shape object).
Lets say the video is 640x480. So I want a shape where the 4 point are (100,150), (120,150), (150,150) and (90,150).
I want to trace a message when the user clicks inside that area.
Thanks!!!!!
OML
If Click In Certain Area Then
i would like to actionscript a part of my movie to say the following:
"if the mouse is clicked over the left third of the screen then do something."
i would like to do this without using any buttons.
any ideas???
tnx
Navigating From HTML Page Back To Specific Area Within Flash Movie
I have a flash file sitting within an html page.
At certain times i navigate from a movie that is about 2 layers down within my flash file to another html page (not flash).
If the users go to this new html page, but then want to navigate back to the flash file, and to the exact movie within that flash file, what can they do? Hitting the 'back' button simply takes them back to Scene 1, frame 1, while i would like them to go to... (for example) Scene 1_movie1.movie2.frame10
let me know if this doesn't make sense!!
thanks
Dragbox With Specified Area For Click And Drag
I have a mc that loads in my movie, it is basicly emulating a pop-up window. I want to be able to specify a area on the mc for the user can click on and drag the mc. Right now i have a box that i can drag, but the whole mc can be clicked and draged. I need to be able to specify the area that should be clicked.
This is thew current code i am using:
Code:
this.contactBox_mc.onPress = function() {
this.startDrag();
};
this.contactBox_mc.onRelease = function() {
this.stopDrag();
};
Trigger From Click In A Defined Area?
Is it possible to use actionscript to say
if mouse up in x10, y10,x100,y100 do this
sort of like how you define a drag area, I want to register a click in a certain area without having a button there
thanks
mark
Visible Area User Click
Hello everyone, is there any way to detect user click on all visible area and not just on button or movie? Thanks in advance.
Restricting Click Area On VCR Timeline
Hi guys, I'm working on an interface for our online courses using Flash 8/AS3. I have a little scrubber bar timeline, and I have the player head moving correctly, it's draggable, and works fine. I want to be able to click anywhere on the timeline and have the player head jump there. It works, but what's happening is that no matter where I click on the flash stage, whether I am over the timeline or not, it jumps to that time. The other problem is that if I click to the right of the timeline, it jumps back to the beginning. I had this all working in AS2, but AS3 is new to me. Thanks so much! Here is the code for the timeline:
//////////////////////////
//---TIMELINE CLICKER---//
Controls.Scrubber.timeLine.addEventListener(MouseE vent.CLICK, clickMove);
function clickMove(Event):void {
var progLineX = Controls.Scrubber.timeLine.mouseX;
var progLineXrd = Math.round(progLineX);
var newPosClick = progLineXrd * barPos;
var newPosClickRd = Math.round (newPosClick);
if (progLineXrd >= 482) {
gotoAndPlay(newPosClickRd - 1);
} else {
gotoAndPlay(newPosClickRd);
}
}
Action On Click Outside Button Hit Area.
I want to make a button which will lead the user onto another page when clicked on - no problem... but then loads a movieclip with help details if they click completely outside the hit area.
Is this possible?
The on(releaseOutside) is not helping as that supposes that they have hit within the hit area and then released outside it - whereas I am trying to react if they have clicked anywhere on the page bar where they should!
I am wondering if this might be accomplished by replacing the button with a movieclip. I have found some examples using hitTest, but this only seems to test if two movieclips have intersected, whereas I am trying to test the position of the mouseclick against the target movieclip?
Any help please would be very gratefully received - I am fairly new at this and have searched the tutorials in vain.
Right Click Menu While Over Text Area
I have a simple application where a user is given some text to copy from a text field. I'm using Selection.setFocus and Selection.setSelection - both of which are working fine. But for some reason when the user right clicks to copy the text, the menu comes up as the flash options right click menu, not the text field right click menu, unless you click outside of the swf and then right click again inside of the text field.
This only happens in IE. In mozilla/firefox, this works fine. The correct menu comes up allowing the user to copy the text.
Anyone know how I can fix this?
Click Through A Transparent Area Of A Bitmap
Hey all,
I am importing some graphics on the fly, and want to be able to drag them around the stage, which all works great. My issue is that if I add a large element, like a border around the edge of the stage, this covers up all the other items so that clicking on them is not possible. I can see them, but when I click, the large item gets the event, even though visually, it is transparent. There are things I could do if I was doing all the development of the graphics in the IDE, but these items load at runtime, so it has to work with bitmaps. Any ideas?
- B
Scrollbar 'scroll-area' Click Problem...
I am trying to make a bunch of scrollers work when you click on the area below and above the actual scrollbar (the scroll-area), the scrollbar goes to it (easing would be nice too) Any advice/help?:
see my scroller here:
http://www.josimar.com/scrollbar_fk.swf
the Flash MX (not 2004) .fla is here:
http://www.josimar.com/scrollbar_fla
thanks
spumker
Display Movie When You Click In A Defined Area
i'm writing to see if anyone can advise on this objective....
i basickly want to create something where if i click on a piece of art, a small color pallete appears where ever mouse is.....and when i click on a color in the pallete the piece of art changes to that color......
make sense?
i already know some parts of this, i just dont know how to get the pallete to appear on clivk where the mouse cursor is......i know i can create a tell target area......which will define the area right? but how do i get the mouse to bring the pallete up.....at a specific area.....
Button Click Area, Whats Wrong?
So far with flash, as soon as I think I understand something it doesnt work or make sense.
I thought it was simple...
There are 4 states to a button:
1. Up
2. Down
3. Over
4. Hit
Hit being the state where the button "hotspot" area is defined. I had read that it is defined by a simple box, or shape drawn over the area you want to be "clickable".
Well I have these 4 buttons I made at the top of my navigation system. 2 of the buttons' click areas work fine. Two of them dont. When you mouseover the button just the TEXT is clickable, so the mouse flickers between pointer and clicker finger as you move over the button. The other two are fine, and the square hotspot area seems to be working.
I cant for the life of me figure out why this is.
I was thinking maybe I have a movie or another object on top of the button covering it or something...but as far as i can tell the only thing in the area is the button and i made sure the button was sent to the front.
If anyone has advice on this please help. If you need me to send the .fla I can do that too. I dont want to post it to the public however because it is for my company's website.
Selection.setFocus After Click On Stage Area
I have a program which accepts the Selection.setFocus so the cursor begins in an input text box.
I have the Selection.setFocus command in my buttons which returns the cursor back to the same input text box after a button is pressed.
What I DON'T have is a method to Selection.setFocus if the stage area is clicked, or any object which is not the input box or a button.
How can I have my program return the cursor to the input text box IF THE STAGE AREA is clicked? Can I check for cursor's location IF NOT in input box, thereby return cursor to input box?
Thanks!
SetMask And Filters : Click Area Problem?
Hi !
I have a curious thing.
Look at www.marciacq.org/TestMask.html
(first activate the flash activex by clicking in it)
Rollover the mouse on the picture
The flash cursor goes to the hand cursor on the whole picture
Now click on the black round
It applies a mc.filters=
Now roll over again !
Surprise ! The flash cursor is no more the hand cursor on the whole picture !
Any idea ????
(Don't work at all when Ctrl+Enter on Flash8, must publish first, then dbl click on the .HTML to see it)
FLA is available at
www.marciacq.org/TestMask.zip
Thanks for your help !
Finding A Specific Result[] On Click
I am trying to handle my results from a amfphp remoting call... this is probably really easy problem, but one of my last problems to work on.
when I click on a product or image, I want to take all the details of that result[] and display elsewhere or set as a current product... this is kind of what I have...
Code:
public function handlesearchresults(results) {
var rslength = results.length;
for (var x= 0;x<rslength; x++) {
//create productholder for each product
var productholder:productholder_mc = new productholder_mc();
//set thumbnail position for this product
productholder.y = 20+(270*int(x/2));
productholder.x = (270*(x%2))+50;
productholder.productinformation_mc.prodtitle_txt.text = results[x].Title;
productholder.productinformation_mc.proddesc_txt.text = results[x].Description;
productholder.productinformation_mc.prodprice_txt.text = "$ "+results[x].Price;
productholder.addEventListener(MouseEvent.CLICK, buttonclickfunction);
function buttonclickfunction(event:MouseEvent):void {
//this is where I'm not sure what to put to track for each click
}
}
I have tried things like this, thinking I could point the information I click on to the correct stage location... but I think the [x] is always changing:
Code:
stage.getChildAt(0).productdetailsmain_mc.productdetails_mc.producttitle_txt.text = event.target.results[x].Title;
is there something easy to go in there that I'm missing that will allow this. equivilant in AS2.0 was as easy as productholder.thisone = x; then I could use the recordSet class to pull it with getItemAt(this.x) on an onRelease;... I know, I know, it's not there now...
thanks
|