Right Click Problem
hi....anyone know how to remove the play,rewind etc on right click.
I would like it to say only `about macromedia flash...`
thanks...QETRET
FlashKit > Flash Help > Flash ActionScript
Posted on: 01-13-2002, 08:32 AM
View Complete Forum Thread with Replies
Sponsored Links:
- Disabling IE/Windows Link-click Sound (the ****ing Click Noise)
- Click Button Once - WORKS FINE- Click It Again - RESTARTS MOVIE?
- Ignoring (passing Up) Mouse Events / Click-through / Click-transparent
- Single Click Button Requires Double Click
- [F8] Click Open Click Close, Multi Menu
- Click To Pick Up, Click To Drop - Error 1136
- Cursor On Click Context Menu(right Click) Issue
- Smooth Scrollbar Need ,,,,,not The Click Click Kind
- How Can I Enable Single Click And Double Click
- How To Differentiate A Single Click From A Double Click
- [Flash MX Prof 2004] Click Down Click Up
- [CS3] Distinguish Between 'click And Throw' And Simple Click
- [CS3] Click Pickup, Drag, Click Drop
- [F8] Single Click Acting Like A Double Click
- How To Make A Button That Responds To Right Click, So That When You Right Click This
- Button Click LoadMovA..click Again LoadB?
- How To Differentiate A Single Click From A Double Click
- Loading A Jpeg... Click Once... Click Twice...
- Respond To Right Click Instead Of Left Click?
- [MX] Less Options On Right Click/ctrl Click
- Buttons Work On First Click. %$@ On Second Click.
- CLICK To PickUp, CLICK To Drop ?
- "Click To Activate And Use This Control" Why Do I Have To Click The Menu Before I Use
- "Click To Activate And Use This Control" Why Do I Have To Click The Menu Before I Use
- Double Click And Right Click
- Button... To Click Or Not To Click
- Double Click And Right Click
- Help? Click ON, Click OFF Buttons...
- Right Click Vs. Left Click?
- One Click: MC's Red, Another Click: MC's Green
- Click Once-good, Click Twice-bad
- Click Once-good, Click Twice-bad
- [F8] Click Me Once...no Problem. Click Me Twice...wtf?
- Right Click, On Click Away Function
- Click ... Do Something ... Click ... Return
- Left Click Plays NEXT Frame, Right Click Plays PREVIOUS Frame?
- To Click ButtonA, Den Click ButtonB And A Line Will Be Draw From ButtonA To ButtonB.
- [CS3] Button That Fades Out On Click And Fades In On Click
- Click Event And Double Click Event
- Click & Drag Baby, Click & Drag
- I Click On A Button , A Line Pops Up Under The Button I Click On A Different Button..
- Can't Make A Right-click Menu? Make A Middle-click Menu
- No More Right Click
- How Too Take The Right Click Off
- >>click Here<<
- Right Click On SWF
- Right Click Pop Up
- Right Click
- Right Click
- No Right Click
- Right Click
- Click
Disabling IE/Windows Link-click Sound (the ****ing Click Noise)
I've just got working a part of my site that has the user rolling over parts of one Flash movie which load a text description of the thing that is rolled over into a side flash movie in another frame. To the best of my knowledge there is no way to accomplish purely in Actionscript (making two separate Flash movies communicate), so I have movie #1 send it's variable to a javascript function on the HTML that calls the movie. This Javascript then sends the value to movie #2. Only problem is, though I am not loading a separate html file anywhere in the process, when IE runs the Javascript code it plays that damn link-click noise.
As you can imagine this is annoying i the extreme for a mouse roll-over (200 click noises in a few seconds)
Anyone know how I can disable that noise?
Or maybe to get IE not to recognize the Javascript as a link?
I'm pretty sure there isn't but who knows?
Thanks.
Josh Kostka
View Replies !
View Related
Ignoring (passing Up) Mouse Events / Click-through / Click-transparent
Hi, is there a way to make a Sprite transparent to certain (or all)
mouse events?
The display object hierarchy is not defined, or I should say that the
only thing I know for sure is that the Sprite I want to make transparent
to mouse events is a direct child of the stage.
I want the Sprite to ignore mouse events and other interactive objects
behind it to be able to catch them, even if the pointer is directly over
the Sprite. Is there a way to achieve this?
View Replies !
View Related
Single Click Button Requires Double Click
I noticed that some buttons in all of my .swf's were taking
two clicks to get them to work. After you double click them
once they work fine. I made a very simple movie to demonstrate
my problem. Please tell me if this problem is occuring for you also.
Thanks,
Anavrin
My .SWF file My .FLA file
View Replies !
View Related
[F8] Click Open Click Close, Multi Menu
I have this header that I am trying to multitask with. I want the windows to open and close on demand, but I cant seem to get them to work right. If you can help me with this, please reply. The link to the header is below:
http://fppl.dyndns.org/fppl_header.swf
View Replies !
View Related
Click To Pick Up, Click To Drop - Error 1136
trying to get the click to pick up & click to drop function working...
getting this error...
"1136: Incorrect number of arguments. Expected 1."
ActionScript Code:
package {
import flash.display.Sprite;
import flash.display.MovieClip;
import flash.text.TextField;
import flash.events.*;
import flash.display.DisplayObject;
import flash.ui.Mouse;
import flash.display.BlendMode;
public class connectWars extends Sprite {
private var gameState = 2;
private var startX = 0;
private var startY = 0;
private var clicked:Boolean = false;
public function connectWars() {
createGrid();
// Call Game Loop
stage.addEventListener(Event.ENTER_FRAME, gameLoop);
}
public function gameLoop(enterFrame) {
switch (gameState) {
case 1 :
//initIntro();
break;
// Choose Player
case 2 :
choosePlayer();
break;
//player 1
case 3 :
//player 2
case 4 :
greyOutBoxes();
pickUp();
break;
case 5 :
//initGameOver();
break;
default :
trace("THE GAME IS BROKEN");
break;
}
}
// choose which player goes first (random)
function choosePlayer(){
gameState = Math.ceil(Math.random() *2+2);
}
// cover the oppenants cards
function greyOutBoxes() {
if (gameState == 3) {
redCardCover.alpha = 0;
blueCardCover.alpha = 1;
} else {
redCardCover.alpha = 1;
blueCardCover.alpha = 0;
}
}
public function pickUp(event:MouseEvent):void {
if (clicked == false) {
event.target.startDrag();
clicked = true;
} else {
event.target.stopDrag();
clicked = false;
}
}
// layout the grid 9x7
public function createGrid() {
var columns:int = 9;
var rows:int = 7;
var xSpacing:int = 66.5;
var ySpacing:int = 65;
var row:Number;
var col:Number;
var num:int = (columns * rows);
var gridArray = create();
for (var i=0; i<num; i++) {
addChild(gridArray[i]);
row = (i % columns);
col = Math.floor(i / columns);
gridArray[i].x = (row * (xSpacing)+105);
gridArray[i].y = (col * (ySpacing)+118);
}
}
public static function create():Array {
var columns:int = 9;
var rows:int = 7;
var arr:Array = new Array();
var pt:MovieClip;
var num:int = (columns * rows);
for (var i:int = 0; i <num; i++) {
pt = new gridBlock();
arr.push(pt);
}
return arr;
}
}
}
View Replies !
View Related
How To Differentiate A Single Click From A Double Click
Hi guys
I'm having a mission trying to differentiate between single and double clicks.
A double click is made up of two single clicks so if i do a trace of when the mouse is double clicked, the result will be:
single click
double click
How can I make the trace just
double click
and not
single click
double click
??
Here's the code that goes on my button:
Code:
Code:
on (press) {
if (!_root.click) {
timer = getTimer()/1000;
_root.click = true;
} else {
timer2 = getTimer()/1000;
}
if ((timer2-timer)<.25) {
trace("double click");
} else {
trace("single click");
timer = getTimer()/1000;
_root.click = true;
}
}
Thanks for any ideas
View Replies !
View Related
[Flash MX Prof 2004] Click Down Click Up
hey guys
i'm working on a thing at the moment which is a news bulliton im having trouble using the movie button you see when you click it plays so the main board drops down. but i want it so as when you click again it goes back up currently im using script like this:
Code:
on(press){
this.gotoAndPlay(2)
}
on(press){
this.gotoAndPlay(15)
}
the dropdown works fine when i emit the last 2 lines of coding but when im using it like it is above i belive the two (press) listeners cancel eachother out.
any help would be fab!
chris
View Replies !
View Related
[CS3] Distinguish Between 'click And Throw' And Simple Click
Hi there,
I'm developing a gallery of images which is essentially a load of polaroids on the desktop which the user can click and 'throw' out the way to see others. The user can also click on any of the images and it increases in scale and comes to the foreground.
Is there a way to distinguish between a 'click and throw' mouse action and a 'scale and foreground' click?
The code I'm using is:
PHP Code:
first.onPress = function()
{
anchorX = this._xmouse;
anchorY = this._ymouse;
this.onEnterFrame = function()
{
lastXMouse = _root._xmouse;
lastYMouse = _root._ymouse;
this._x = _root._xmouse - anchorX;
this._y = _root._ymouse - anchorY;
}
}
first.onRelease = first.onReleaseOutside = function()
{
xDirection = (_root._xmouse - lastXMouse);
yDirection = (_root._yMouse - lastYMouse);
this.onEnterFrame = function()
{
// decay x
if (Math.abs(xDirection) > 0.5)
{
xDirection *= .95;
} else {
xDirection = 0;
}
// decay y
if (Math.abs(yDirection) > 0.5)
{
yDirection *= .95;
} else {
yDirection = 0;
}
//Garbage Collection
if (xDirection == 0 && yDirection==0)
{
this.onEnterFrame = null;
_ismoving = false;
}
}
}
It does what it's supposed to, i.e. it clicks and throws, but I can't distinguish a static click.
Anyone done anything like this?
CHeers
Matt
View Replies !
View Related
[CS3] Click Pickup, Drag, Click Drop
How can I make the following code work so that when I click on a piece it drags when I release the mouse button and then I click again to drop it in place? Thanks in advance!
Code:
piece1.onPress = function():Void {
this.startDrag(true);
this.swapDepths(this.getNextHighestDepth());
xstart = this._x;
ystart = this._y;
};
piece1.onRelease = function():Void {
this.stopDrag();
if (eval(this._droptarget) == target1) {
this.enabled = false;
this.swapDepths(target1);
counter++;
correct = new Sound(soundLoader);
correct.loadSound("Gong.mp3",true);
this._x = target1._x;
this._y = target1._y;
} else {
this._x = xstart;
this._y = ystart;
}
};
View Replies !
View Related
[F8] Single Click Acting Like A Double Click
I am trying to troubleshoot a problem that has come up with some flash-based courses. These have been developed over the last few years, so they've been developed in MX2004 and Flash8, but the basic code (AS2) is the same across the board.
Each course has a series of swf files (pages) that get loaded dynamically, when the user clicks a "next" button. They have been working fine until recently. Now a small number of users are experiencing something odd...
When these users click the next button (a movieClip called mcNext), the next page loads, and then immediately, the page after that loads. It's as if the user clicked twice, or double-clicked.
So far, it looks like it might be a browser version/plug-in version specific error, as it's only happening with I.E. 7 and Flash player 9.0.124.0
here's (a simplified version of) the code:
Code:
mcNext.onRelease = function() {
thisPage++;
pageChange();
};
function pageChange():Void {
pageNum.text = thisPage+" of "+totalPages;
thisMCL.loadClip("page"+thisPage+".swf", mcContentHolder);
}
Anybody experiencing anything similar?
thx!
View Replies !
View Related
Button Click LoadMovA..click Again LoadB?
I saw this code on the tutorials but it was in relation to Random backgrounds. Woud anyone know if I could use this to do the following....
First time a button is clicked, I want it load and play Movie A, if the button is clicked again, load and play Movie B.
Can I control where it loads? Meaning to a movieclip holder or something?
on (release) {
choice = Math.round(Math.random()*2);
switch (choice) {
case 0 :
location.loadMovie("image0.swf");
break;
case 1 :
location.loadMovie("image1.swf");
break;
}
}
Thanks
-M
View Replies !
View Related
How To Differentiate A Single Click From A Double Click
Hi guys
I'm having a mission trying to differentiate between single and double clicks.
A double click is made up of two single clicks so if i do a trace of when the mouse is double clicked, the result will be:
single click
double click
How can I make the trace just
double click
and not
single click
double click
??
Here's the code that goes on my button:
Code:
on (press) {
if (!_root.click) {
timer = getTimer()/1000;
_root.click = true;
} else {
timer2 = getTimer()/1000;
}
if ((timer2-timer)<.25) {
trace("double click");
} else {
trace("single click");
timer = getTimer()/1000;
_root.click = true;
}
Thanks for any ideas
View Replies !
View Related
Loading A Jpeg... Click Once... Click Twice...
I have written the function below to load a jpeg into a mc, which is sized to fit within a 640x480 rectangle. Variables are passed to the movie including the image name to load and the pixel dimensions, which the script uses to fit the image into the rectangle.
Strange thing is... the first call to loadJPEG() puts the image into the mc, but at its original size... a subsequent call to the function reloads it and sizes it correctly to fit in the rectangle. I can't figure out why I need to call it twice!!!
demo is here: http://users.adelphia.net/~ddycus/cropthing.html
clicking the "PRESS" button calls the function once and loads the image at its original size. Click it again to see what it is supposed to do... (ignore all the other non-working interface elements)
****************
function loadJPEG() {
//get aspect ratio of original image
if (imageWidth > imageHeight) {
imageHorizontal = true;
}
else if (imageHeight > imageWidth) {
imageVertical = true;
}
else {
imageSquare = true;
}
//get the percentage reduction necessary
if (imageHorizontal) {
reductionPercentage = ( displayHeight / imageHeight );
} //else if it is vertical or square...
else {
reductionPercentage = (displayWidth / imageWidth );
}
//make the placeholder.mc and the ghost.mc the right size...
placeholder._height = (imageHeight * reductionPercentage);
placeholder._width = (imageWidth * reductionPercentage);
ghost._height = (imageHeight * reductionPercentage);
ghost._width = (imageWidth * reductionPercentage);
//set global width and height
_global.clipWidth = placeholder._width;
_global.clipHeight = placeholder._height;
//load image into mc
loadMovie(theImage, "placeholder");
loadMovie(theImage, "ghost");
//end new function loadJPEG()
}
View Replies !
View Related
Respond To Right Click Instead Of Left Click?
Is there any way to make Flash MX 2004 respond to a right mouse click instead of a left click?
I've got an invisible button over a button on my screen capture. I can, of course, put scripting on the Flash button that says
on(release){
gotoAndStop(frame number);
}
but I really want the user to right click instead of release the left mouse button, since that is the way things works in the system I'm simulating.
It seems like there must be an easy way to do this and I'm just missing it.
TIA,
- Jennifer J. Williams
View Replies !
View Related
[MX] Less Options On Right Click/ctrl Click
I've noticed some websites limit the options a user has when they right click or ctrl click on the flash movie. For example the Zoom In/Zoom Out is not listed as an option. I'd like to apply this to a website I'm working on. Is this an option I've missed in the publish settings?
Thanks!
Dan
View Replies !
View Related
Buttons Work On First Click. %$@ On Second Click.
hi.
i am using flash 8 pro. i know how to script buttons and stuff, but here's my problem. after i export the flash movie, i am able to click on buttons, and the buttons take me to the frames i want to be taken to. however, if i click the same button twice, it will skip to some random frame. how do i stop it from doing it?
is it because i'm using gotoandplay rather than gotoandstop? btw all my frames have stop actions on them (ie no tweened frames).
View Replies !
View Related
CLICK To PickUp, CLICK To Drop ?
Firstly apologies for this being in the AS3 forum, but there seems to be a lot more activity in here rather than the games section… and it’s still AS3 code that can be utilized elsewhere anyway… blah... blah… blah... etc
I’m making an AS3 drag and drop game (all my coding is in an .as) and after some testing it seems that the drag and drop function isn’t suitable enough, is there any way that I can code the mouse function to pick up a selected target on mouse click... then the picked up target sticks to the mouse cursor X & Y position... even if the user takes their finger off the mouse button and moves the cursor around the stage. The user has to then re-click the mouse button to drop the selected target. ???
Here’s my code thus far for the drag and drop function, it works, just really want to try out this other mechanic.
ANY help at all would be ACE! Thanks
My google searches have not given any results
ActionScript Code:
// pick up item
function pickUp(event:MouseEvent):void {
event.target.startDrag(true);
event.target.parent.addChild(event.target);
startX = event.target.x;
startY = event.target.y;
for (var p = 0 ; p <= 6; p = p + 1) {
if (event.target.name == item[p].name) {
bastard[p] = true;
}
}
}
// drop picked up item
function dropIt(event:MouseEvent):void {
for (var p = 0 ; p <= 6; p = p + 1) {
if (event.target.name == item[p].name) {
bastard[p] = false;
}
}
event.target.stopDrag();
if (event.target.y >= 92 && event.target.y <= 540) {
if (event.target.x >= 290 && event.target.x < 415) {
// target area
if (event.target.currentFrame == 1) {
selectTrash = Math.ceil(Math.random()*4);
event.target.gotoAndStop(selectTrash);
trashPos = Math.ceil((Math.random()*170) + 50);
event.target.x = trashPos;
trashPos2 = -(Math.ceil((Math.random()*300) + 100));
event.target.y = trashPos2;
RS1.gotoAndPlay(2);
if (topOfRubbish <= 580) {
rubbish_pile.y = rubbish_pile.y + 5;
topOfRubbish = topOfRubbish + 5;
}
updateHit(25);
} else {
event.target.x = startX;
event.target.y = startY;
}
View Replies !
View Related
Button... To Click Or Not To Click
okay, I'm using Flash MX. My problem is that I have a movie clip with an action inside but it is stopped on frame 1. When it is clicked, like a button, it plays at frame 2 and goes to frame 10 where i have another "stop" action.
I want to be able to detect if it has been clicked already so that if it has and it is on frame 10, if the user clicks it again, it won't go to and play at frame 2.
Simply, if the user has clicked the box once, I don't want them to be able to click again.
How do I do this????
I have tried to use this: on frame 1 of the MC, on the timeline, I put "click = true;" in actionscript. and on frame 10 in the timeline i put "click = flase;". In the movie clip i put "if (box.click = true) { gotoAndPlay(2); }else{ gotoAndStop(1); }
I thought that using that would make what i want possible, but it doesn't.
Please Help me!
View Replies !
View Related
Double Click And Right Click
Does anybody how i can make a double click button and how i can make a right click button...coz i making a windows emulator for my work and i need to use the double click and the right click on my proyect....please help me as faster as you can
View Replies !
View Related
Help? Click ON, Click OFF Buttons...
I'm working on a project that I would like to be able to "turn on" multiple buttons, to return a different result depending which ones are turned on.
Here is my version 1.
www.evjen.ca/WARNING
I would like to be able to illuminate a button, and keep it illuminated until I click it off.
I would like to turn on two buttons, and return a different result than either button alone. (also, when one of the two gets turned off, the result needs to go back to the "on" result")
e.g. If both "L AC BUS FAIL" and "R AC BUS FAIL" annunciators are illuminated, I need to return the checklist items for "L and R AC BUS FAIL"
There must be a million ways to do this, but I am not very savvy with flash. I'm looking for the simpilist way to do this.
I can do simple actionscript. I'm sure IF and THEN statements will be useful.
Help me get brownie points with my boss!
Thanks in Advance
brent@evjen.ca
View Replies !
View Related
Right Click Vs. Left Click?
hello,
does anyone know if you can differentiate whether or not the user clicked the left button vs. the right mouse button?
i'm limited to actionscript 1.0.
my boss would like me to add some functionality if the user decides to use the right mouse button.
is this possible?
thanks!
View Replies !
View Related
One Click: MC's Red, Another Click: MC's Green
I recently started with ActionScript and here's the first problem:
on stage are a button and a MovieClip. The MC is just a circle that's green. When I click the button once the MC turns red. I can do that: script for the button, on (release) etc. But when I click the button another time I want the MC to turn green again. That's too difficult for me. Can anyone help me with a script?
View Replies !
View Related
Click Once-good, Click Twice-bad
hello all.
i have been making a portfolio website which contains different pictures of my designs. I have made a button inside of a movie clip that fades in, slides right and stops. inside this button movie clip, i have placed a stop on the last frame of my actions layer, as well as placing the following actionscript on the button in the last keyframe:
on (release) {
this._parent.gotoAndPlay("115");
}
Now, i have duplicated this button movie clip, and put them on my main scene to navigate to each different picture. Each time I duplicated, I went back in, and changed the frame number to the one that should be correct.
The problem is, when I click once, it does what it should and loads the correct picture. But, once the correct picture is loaded, if I click on it a second time, it jumps to a completely new picture down the timeline (the pic that is one frame over i think). Does anyone know what might be the problem here?
I have also put stops on my main scene actions layer when each picture appears. Dont know if that helps...
thanks
travis
View Replies !
View Related
Click Once-good, Click Twice-bad
hello all. (i am using flash 8)
i have been making a portfolio website which contains different pictures of my designs. I have made a button inside of a movie clip that fades in, slides right and stops. inside this button movie clip, i have placed a stop on the last frame of my actions layer, as well as placing the following actionscript on the button in the last keyframe:
on (release) {
this._parent.gotoAndPlay("115");
}
Now, i have duplicated this button movie clip, and put them on my main scene to navigate to each different picture. Each time I duplicated, I went back in, and changed the frame number to the one that should be correct.
The problem is, when I click once, it does what it should and loads the correct picture. But, once the correct picture is loaded, if I click on it a second time, it jumps to a completely new picture down the timeline (the pic that is one frame over i think). Does anyone know what might be the problem here?
I have also put stops on my main scene actions layer when each picture appears. Dont know if that helps...
thanks
travis
View Replies !
View Related
[F8] Click Me Once...no Problem. Click Me Twice...wtf?
Here's a nasty little gotcha that I finally solved the right way...hope this helps someone
Symptom: Clicking on a movie clip button works once, but then suddenly, clicking on it again doesn't work. Or it does work, but you have to move the mouse (even just one pixel works) in order for the button to register a rollover state.
Cause: A TextField, some component, movie clip or code chunk currently has the focus!
Solution: Steal the focus back!
I have a Flash file that includes 'next' and 'previous' buttons that allow you to move through multiple images. There's also a text field on the interface, allowing you to search. I would type in a search and an image comes up. Then I click the next button and the next image is shown. But then I click the next button again and nothing happens!
What I didn't realize is that as soon as I clicked to enter text into my search box, that Flash had moved the focus over to that text box. The tricky part of this is that clicking the next button (actually a movie clip configured to act like a button) DOES NOT SWITCH FOCUS back to the button. Now I'm not sure how Flash handles focus issues with actual buttons, but for MovieClips acting like buttons, a click on the clip does not actually focus that clip. So if you interact with anything in your movie that actually does claim the focus, it pretty much will stay there.
So what you have is a situation where you click a TextField, Flash moves the focus to that TextField, you then click your movie clip button and it works, but Flash never moved the focus to that button, so you essentially have to manually initialize the onRollOver events by registering new movement over the button!! Jeesh!
I thought to myself, 'whenever you click a button on an interface, the focus moves to that button.' Seems simple - aha! Let my convert the next button symbol in the library to a button! That should force it to become focused when clicked! NOT TRUE
So here's my solution:
my_button.onRelease = function() {
var focus = Selection.getFocus();
if(focus != null && focus != "_level0.my_button") {
Selection.setFocus(my_button);
}
//now do whatever else I
}
kind of ridiculous, but it works. Now any click on this button does what you would expect - it moves the focus over to the button. So, click anywhere else you like in the movie. Once you click the my_button movie clip, it steals the focus and keeps it, so that subsequent presses on the same clip happen as you would expect
Onward!
View Replies !
View Related
Right Click, On Click Away Function
Hi. I would like to make it so that that when the user right clicks on my movie, and then clicks away (to hide the menu) an action happens. Is this possible? I don't care if the right-click menu shows or not, but I want there to be a function when the user clicks away.
Thanks,
Sportzguy933
View Replies !
View Related
Click ... Do Something ... Click ... Return
so here's the basis ...
I have a bunch of buttons on the stage ... when 1 button is clicked i need all the buttons to move position ... but then when the button is clicked from the new place ... i would like all the buttons to return to the original spot.
function loadEventsPage(event:MouseEvent):void
{
new Tween(events_mc, "x", Strong.easeOut, events_mc.x, events_mc.x -200, 3, true);
new Tween(events_mc, "y", Strong.easeOut, events_mc.y, events_mc.y -100, .5, true);
new Tween(about_mc, "x", Strong.easeOut, events_mc.x, events_mc.x -350, 2, true);
new Tween(about_mc, "y", Strong.easeOut, events_mc.y, events_mc.y -100, .25, true);
}
Tweening probably isn't the way to go but any other suggestions would be greatly appreciated.
Thanks,
Michael
View Replies !
View Related
To Click ButtonA, Den Click ButtonB And A Line Will Be Draw From ButtonA To ButtonB.
i am suppose to use actionscript 3.0 to do a flash. the flash is about using 2 buttons, buttonA and buttonB to draw a line.
the idea is to click buttonA, den click buttonB and a line will be draw from buttonA to buttonB.
i am very new to flash and was assign with this task by my prof.
here's my code :
// declaring line
var lineThickness:uint = Math.random()*5+1;
var lineColor:uint = Math.random()*0xffffff;
graphics.lineStyle(5+1,lineColor);
graphics.moveTo(200,250);
// setting buttons to false
var buttonA = false;
var buttonB = false;
// when click buttonA check if buttonB is click
if (buttonA = true) {
(buttonB = true)
}
if (buttonB = true) {
graphics.lineTo(700,250); //draw line
}
after entering this code the line just appear when i test the movie and an warning1100: Assingment within conditional. Did you mean == instead of = ?
for source if(buttonA=true)
so i change the code to :
// declaring line
var lineThickness:uint = Math.random()*5+1;
var lineColor:uint = Math.random()*0xffffff;
graphics.lineStyle(5+1,lineColor);
graphics.moveTo(200,250);
// setting buttons to false
var buttonA = false;
var buttonB = false;
// when click buttonA check if buttonB is click
if (buttonA == true) {
(buttonB = true)
}
if (buttonB == true) {
graphics.lineTo(700,250); //draw line
}
this runs fine but just that when u click the buttons the line did not appear at all.
hoping that some one will be able to help me with this problem
View Replies !
View Related
Click Event And Double Click Event
Hey guys,
I'm looking for a bit of advice on event listeners.
I have a few things on the stage and I'd like to know if a user clicked one or double clicked it.
The only problem is that while a user is in the process of double clicking the first click gets registered.
So even though the user is double clicking a click is registered.
Is there a way to get around this?
In my app at the moment I'm trying to track what a user does. For example if I see a lot of double clicks registered for a non UI display object I can infer that It must seem interactive and might need to be re designed etc.
Thanks,
dub
View Replies !
View Related
Click & Drag Baby, Click & Drag
Ok peeps, check out this page
You can click & drag this map around, also zooming in and out. As you can see it's constrained so you never run out of image area. However when you zoom in & move the map so you can see the bottom edge, then zoom back out, you get a nasty white gap, which rights itself when you click on the map.
I need some way of stopping this nasty white gap appearing, any ideas anyone?
The "Zoom In" button has these actions applied:
on (release) {
_root.map._xscale += 20;
_root.map._yscale += 20;
}
The "Zoom Out" button has these actions applied:
on (release) {
if (_root.map._xscale>=101) {
_root.map._xscale += -20;
_root.map._yscale += -20;
} else if (_root.map<=100) {
setProperty("_root.map", _xscale, "100");
setProperty("_root.map", _yscale, "100");
}
}
While the map has these actions:
on (press) {
startDrag("_root.map", false, stage.width-_root.map._width,
stage.height-_root.map._height, 0, 0);
}
on (release, releaseOutside) {
stopDrag();
}
Cheers
View Replies !
View Related
Can't Make A Right-click Menu? Make A Middle-click Menu
Since so many people are always wanting to make a context menu that appears at the mouse position, and because it's such a pain to get rid of the flash right-click menu (and the methods i've seen are not cross browser) I decided to go about finding a way to make a middle-click menu. Most mice these days have a mousewheel and the vast majority of those mousewheels also act as a 3rd button if you push down on them. So here is the result of my labor. A way to detect the middle mouse up and down actions in Flash.
Code:
Mouse.toggle = false;
setInterval(TestMidMouse, 40);
function TestMidMouse() {
if (asNative(800, 2)(4) == true && Mouse.toggle == false) {
Mouse.broadcastMessage("onMidMouseDown");
Mouse.toggle = true;
} else if (asNative(800, 2)(4) == false && Mouse.toggle == true) {
Mouse.toggle = false;
Mouse.broadcastMessage("onMidMouseUp");
}
}
myListener = new Object();
myListener.onMidMouseDown = function() {
trace("middle button down");
};
myListener.onMidMouseUp = function() {
trace("middle button up");
};
Mouse.addListener(myListener);
In case you're wondering, asNative is an undocumented feature of flash. It refers to the native function table that resides in the flash player. asNative(800, 2)(4) returns true or false depending on weather the middle mouse is down or up respectively. FYI, replacing the 4 with other numbers activates for other buttons (including keyboard keys). 1 is left click, 2 is right click, 3 doesn't seam to do anything, 4 is the middle mouse button, 5 is a 4th mouse button if mouse has one. Here is the most extensive reference for the asNative function that I have found. I suppose you could do the same thing with Key.isDown(), but messing with undocumented stuff is so much cooler .
If anybody does know a way to get rid of flashes right-click menu, reliably and across multiple browsers please post it here because this method could easily be converted into right-click detection.
View Replies !
View Related
No More Right Click
Hello people,
I would have to say the "subject" says it all. I am wondering how to get rid of the mouse's right click on a Flash 5 .swf project.
If someone could assist me on this I would be greatly appreciative.
Cheers,
Zanjan
View Replies !
View Related
Right Click On SWF
Hey guys, just wondering how you can make it so that people cannot right click on your swf and then zoom in all the way. Any one know. Thanks so much for your help guys.
Don
View Replies !
View Related
Right Click
hi,
i wanna disable right click in my flash exe file,is that possible,i gave Fscommand ...still its showing macromedia flash 5..even i want disable that ...pls help ...
thax.
ramm
View Replies !
View Related
Right Click
Hi everyone...
before posting this message i used the search and i was surprised that i found nothing.
I need to know what is the best way to eliminate the right click from the Flash movie.
thank you
View Replies !
View Related
Right Click
When I right click on a flash movie, I get Zoom in, Zoom out, print and so on. Does anyone know how I can remove that from my flash movies so people only can see "About Macromedia" when they right click on my movies?
View Replies !
View Related
Click
This is my question:
is there a way to make a symbol move to a clicked place (not just appear there but move)????
Perhaps with invisible buttons?
Help me please, thanx
View Replies !
View Related
|