CTRL + F In Flash...
I want to make a custom class for searching the text on a stage - like you do when you hit Control + F in firefox or IE.
I found this code for finding out all of the paths to all of the Text Fields on the stage - dymanic and static.
Now I need a way to select a portion of text. Is there anything out there that would select a snippit of a text field?
Here is what I have so far:
ActionScript Code: MovieClip.prototype.listOfTextFields = function (){ var i, paths = []; for (i in this) { if (this[i] instanceof TextField) { paths.push (this[i]); if (recursive) { paths = paths.concat (this[i].listOfMovieClips (true)); } } } for (var i = 0; i < paths.length; ++i) { for (var j = i + 1; j < paths.length; ++j) { while (paths[i] == paths[j]) { paths.splice (j, 1); } } } return paths;};trace ( "this.listOfTextFields: " + this.listOfTextFields() );
That effectily returns all of the paths to every text field on my stage. Now I just need a way to highlight a portion of a text field.
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 11-15-2006, 01:45 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
- Unable To Listen For Ctrl+a, Ctrl+z, Ctrl+x, Ctrl+c, Ctrl+v In Flash
- Enable Browser Shortcuts (Ctrl-W, Ctrl-N, Ctrl-L, Ctrl-T)
- Browser (Firefox) Keyboard Shortcuts Focus (ctrl+w, Ctrl+n)
- Browser (Firefox) Focus For Ctrl+w, Ctrl+n...
- How To Capture Ctrl-A, Ctrl-Z
- Flash, IE And Ctrl+N
- Flash + IE + Ctrl+B Keypress
- How To Simulate Ctrl+C In Flash?
- 'Undo' (ctrl +Z) In Flash MX 2004
- Flash Kiosk (Disabling ESC & CTRL ALT DEL)
- Flash CS4 - Annoying Ctrl Button
- Preventing Users From Using CTRL Keys In Flash
- [F8] I Think I Broke Flash 8? (Ctrl+Alt+2 Stopped Working)
- Does Flash Not Pick Up On Ctrl + C If Its Not Held Down Long Enough?
- How To Disable The Ctrl+enter Key In Flash Player
- Ctrl + C?
- Ctrl + C
- Can We Use ALT+key And CTRL+key?
- HELP PLEASE Disable Ctrl-Alt-Del
- How To Disable ALT-F4 + TAB + ESC + ALT-CTRL-DEL ?
- Capture Ctrl-c
- Ctrl+c = Button
- Key Press Ctrl + B In Ie
- Want To Disable That Ctrl+W Or Alt+F4
- How Do I Capture Ctrl + Another Key?
- Lists And The Ctrl Kay
- CTRL + Up Or Down Not Working
- Capturing CTRL+S?
- Releasing CTRL KEY
- Is There A Way Around The Ctrl+# Problem? (IE)
- Ctrl Key To Duplicate Gone?
- SWF File : CTRL+RIGHT
- Ctrl-clicking
- How Do I Capture Ctrl + Another Key?
- CTRL+P Problem
- Disable Ctrl+R.
- CTRL + Enter
- How Do I Capture Ctrl + Another Key?
- Disabling Ctrl+ V
- Capturing Ctrl-Z
- CTRL + ENTER <<<< Not >>>> UPLOAD
- Ctrl+Enter Prob
- Global Sound Ctrl...
- Lost Properites Ctrl+F3 Does Nothing
- Game Show (ctrl.....)
- MX Ctrl + Enter Preview
- Capturing Keypress <Ctrl>+key?
- Copy Text ( Ctrl + C) - PLease Help
- Holding Down SHIFT And CTRL
Unable To Listen For Ctrl+a, Ctrl+z, Ctrl+x, Ctrl+c, Ctrl+v In Flash
Any one have any ideas why? (Please note that I have disabled keyboard shortcuts in the flash compiler.) I imagine it's because of the built in application shortcuts in windows but I don't see any documentation on this. I can trace ctrl and I can trace 'a' separately but I cannot get a successful trace otherwise. When Embed into HTML, the problem is fixed but this is obviously very cumbersome to debug.
I am listening for the keyCodes directly on the event object.
Enable Browser Shortcuts (Ctrl-W, Ctrl-N, Ctrl-L, Ctrl-T)
The flashplayer catches all keys pressed by the user. I'd like to know if there's a way or workaround to pass them to the browser. For instance, Ctrl-T (open new tab in firefox). I'd like to re-enable this shortcut. Maybe with javascript?
Thanks in advance,
Bultot
Browser (Firefox) Keyboard Shortcuts Focus (ctrl+w, Ctrl+n)
I have a Flash movie which fills the whole browser window. This means that always the key events are catched ("stolen") by the Flash movie only, when using Firefox. IE7 seems to be working as I want.
I want for example ctrl+w (close window), ctrl+n (new window), ctrl+t (new tab) to work in Firefox while the focus is on my Flash movie. How to accomplish this?
Browser (Firefox) Focus For Ctrl+w, Ctrl+n...
I have a Flash movie which fills the whole browser window. This means that always the key events are catched ("stolen") by the Flash movie only, when using Firefox. IE7 seems to be working as I want.
I want for example ctrl+w (close window), ctrl+n (new window), ctrl+t (new tab) to work in Firefox while the focus is on my Flash movie. How to accomplish this?
How To Capture Ctrl-A, Ctrl-Z
Hi I'm trying to build a flash application, and having trouble capturing key combinations such as Ctrl+A or Ctrl+Z.
I'm doing stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler)
and keyDownHandler checks event.ctrlKey and event.keyCode.
Ctrl+Y works, but most of other Ctrl + Key combinations don't work, I think because those key strokes are
captured in Flash Player / Browser before captured by AS3.
Does anyone know good solutions?
Flash, IE And Ctrl+N
I would like to know how to pass Ctrl+N (new window in IE)
to Flash and at the same time kill the new window.
The idea is to simulate software behaviour in a Flashmovie embedded in IE, and have Flash handle all the keystrokes.
Oeyvind
Flash + IE + Ctrl+B Keypress
Hi,
Does anyone know of a way to disable IE's default handling of ctrl+Key combinations, and passing these directly to flash? I've just spent a full day trying to get this to work without any luck.
For example, ctrl+B pulls up the favorites manager in IE if flash is focussed.
Thanks,
F.
How To Simulate Ctrl+C In Flash?
Last edited by mkit : 2004-11-02 at 10:24.
Hi all...
This problem is giving me a headache...
I am trying to use Ctrl + C/V/A/Z/X in flash, just as the normal copy/paste shortcut ...
But When the next keypress AFTER ctrl key is pressed and held, flash is not giving any responses....
(when the next keypress is any of the keys other than C/V/X/Z/A, flash is giving me a response...
seemingly... windows or the system is listening to it... or it is reserved...
I tried keyListener, and onEnterframe methods... both are not working under authorizing / swf...
any good idea of getting around? or there's actually some ways to do it that I dunno?
thanks alot for reading this post
MKit
'Undo' (ctrl +Z) In Flash MX 2004
I just started using flash mx 2004.
Can anyoner tell me if there is a way to use the old way of undooing?
I mean that i want to undo actions for each MC / Library item / Scene specific, like in all the older versions of Flash.
Flash Kiosk (Disabling ESC & CTRL ALT DEL)
Hello All,
We have created a game and we need to run it fullscreen on a kiosk.
The game requires the user use the spacebar however we would like to disable ESC and CTRL+ALT+DEL so the user cannot stop the .exe from playing.
Does anyone know how to do this?
Flash CS4 - Annoying Ctrl Button
I have just recently bought Adobe Flash CS4 Professional and I love it. However, there's this small thing that bugs me. Every time I press the Ctrl button on my keyboard in Flash, the hand tool appears, is there any way to change this? It appears when I press Ctrl+G, Ctrl+C, etc. Thanks in advance.
Preventing Users From Using CTRL Keys In Flash
Is there any wat I can do this? I don't want users to be able to press CTRL+[arrow right or left] in swf files because they can step forward through parts of my game (cheat). So how can I prevent users from pressing ctrl? thanks!
[F8] I Think I Broke Flash 8? (Ctrl+Alt+2 Stopped Working)
Oh my goodness what have I done? A while back I was working on something and suddenly the "center horizontally" and "center vertically" options which I use A LOT just stopped working. Not just the shortcuts (ctrl+alt+2 and ctrl+alt+5) but actually choosing it from the modify>align menu doesn't work either. I've closed Flash and reopened it dozens of times, and my computer has been shut down and restarted and it still has this problem. Did I somehow manage to "turn off" the centering feature? Please help if you can!
UPDATE: Nevermind everybody. It's fine. I did a search and found someone else with the same problem a while ago. I'm okay! Can I delete my own posts? I don't see the option anymore. Kill this thread please.
How To Disable The Ctrl+enter Key In Flash Player
Hi All,
Let me explain the problem, I have to validate the user using a password which is hard coded into the flash application.
I am doing the password checking in the first frame of the file, if the password is ok then jumping onto the next frame.
The password checking is working alright but when I press ctrl+enter in the flash player then it is not checking the password and playing the file...
so I need to disables the ctrl+enter, any help from any of you is very helpfull.
Thanks and regards,
Vikas.
Ctrl + C?
Hello,
can flash replicate ctrl + C or right mouse + copy????? from a button using actionscript?
thanks in advance
steve
Ctrl + C
Does anyone know how I can capture 2 key presses? I'm trying to create a shortcut, so I fire off a function when the user presses "Ctrl + c". It currently seems that if 1 key is pressed that the second is either blocked or ignored.
Anyone know a way of getting round this?
Cheers All
Mat
Can We Use ALT+key And CTRL+key?
Hi guys!
I was just trying to assign ALT+some key and CTRL+some key to a button on(release) event..but realised that flash doesn't recognise ALT and CTRL key press combinations for buttons events ??
Is there any way to do that ?
thankx
Mav
HELP PLEASE Disable Ctrl-Alt-Del
I am trying to disable ctrl-alt-del keys. I am finding that using onclipevent(keydown) and key.getcode will work with the individual key presses but I am unable to find commands that work with combination key presses..so that the ctrl-alt-del keys can't be used.
Can anybody help me please!
Capture Ctrl-c
Is it possible to capture the keystroke "control-c" ? I know how to code capture keystrokes however this one doesn't seem to work. Here's my code:
keyListener = new Object();
keyListener.onKeyDown = function() {
if(Key.isDown(Key.getAscii() ==(0)) && Key.isDown(Key.getAscii()==(99))){
trace ("cut captured");
}
}
Key.addListener(keyListener);
or alternatively:
keyListener = new Object();
keyListener.onKeyDown = function() {
if(Key.isDown(Key.CONTROL) && Key.isDown(Key.getAscii() ==(99))){
trace ("cut captured");
}
}
Key.addListener(keyListener);
Any clues?
thanks
Ctrl+c = Button
Hi there!
The question is:
When we press Ctrl+c in our computers it copies anything that's selected.
I now want to create a button that executes the command "Ctrl+c".
Is there anyway?
Key Press Ctrl + B In Ie
Can get keypress ctrl + b working fine in flash but when I play this in IE it ignores flash and tries to add a bookmark (Ie default for this keystroke).
I must be dim and missing something?
Any quick ideas?
Want To Disable That Ctrl+W Or Alt+F4
Hi Forum!!
I need some help from all experts out there. I am making a presentation in Flash MX where I want.....If any user presses Ctrl+W or Alt+F4 will not be able to close the window. There will be a separate button for closing that window (fscommand("quit")).
I just want to disable that Ctrl+W or Alt+F4 functionality. I have already done that for that Esc button. Is it possible? Can I get your help?
Thanks.
Kallol
How Do I Capture Ctrl + Another Key?
I want to be able to capture Ctrl + another key.
How do I do this?
I've got the following code from help:
var keyListener:Object = new Object();
keyListener.onKeyDown = function()
{
trace("DOWN -> Code: "+Key.getCode()+" ACSII: "+Key.getAscii()+" Key: "+chr(Key.getAscii()));
};
Key.addListener(keyListener);
But I can't seem to be able to capture key combinations like Ctrl + another key.
For what I need to do, I really need to capture several key combinations.
At the very least, I want to be able to capture Ctrl + another key.
Any help would be appreciated.
Thanks.
OM
Lists And The Ctrl Kay
Is there a way to make the rows of this list to be selected without the necessity of holding the Ctrl key down? Or I should use check boxes insted of the list componente?
var myCounties: LoadVars = new LoadVars();
myCounties.onLoad = function() {
//this populates my list with the names of the counties
for (i=1; i<=myCounties.total; i++) {
counties = eval("myCounties.c" + i);
countiesList_lb.addItem(counties);
}
};
myCounties.load("counties.txt");
var countiesList_lbListener:Object = new Object();
countiesList_lbListener.change = function(){
index_txt.text = countiesList_lb.getSelectedIndex(); //this aids me to see the out put
label_txt.text = countiesList_lb.getSelectedItem().label;
selectedCounties = new Array(); //the multiple selections arre stored in this array
selectedCounties = countiesList_lb.getSelectedIndices();
selected_ta.text = selectedCounties;
}
countiesList_lb.addEventListener("change", countiesList_lbListener);
CTRL + Up Or Down Not Working
Does anyone know where the setting is to be able to CTRL + up/down items to mke them move a pixel at a time?
I can only use the shift key and its in larger increments.
The left and right work fine....
Capturing CTRL+S?
I am trying to capture ctrl+s for saving in my swf.... but i cant seem to capture any other kepresses when CTRL is being pressed, therefore i cant detect ctrl+s.... I can detect s+ctrl but not vice versa.... any ideas?
Releasing CTRL KEY
Is there a way to release the ctrl key so flash doesn't cripple peoples use of shortcuts?
Is There A Way Around The Ctrl+# Problem? (IE)
Flash can detect ctrl key presses fine, but when used in conjunction with another letter like Ctrl+A, flash can't detect it whatsoever and IE intercepts it (to perform its own tasks). In firefox this isn't a problem.
So does anyone know a way to block IEs key detection? With javascript or something maybe. I would want flash to do something on the event of Ctrl+F (instead of that annoying ie find dialog box popping up).
Ctrl Key To Duplicate Gone?
on MX I used to use the ctrl key to duplicate stuff on the stage. It seems to be gone in 2004. Is there a way to restore it? I looked in preferences but i don't see anything there!
SWF File : CTRL+RIGHT
I did a flash RPG game,and I do not want people forward with "ctrl+right"(the "right" is on keyboard) How can I do
Edited: 04/10/2007 at 05:22:53 AM by profess1onaL
Ctrl-clicking
I need help making the actionscript to make it When somebody Ctrl-Clicks, they are taken to my 3rd frame.
Because in my game. People can cheat and make the targets stop when they Ctrl-click. And my 3rd frame is the Game Over frame
P.S. Ctrl-clicking is for the mac. It is almost the same as right-clicking.
I tried using
if (Key.isDown(2)){
gotoAndStop(3) ;
}
But it didn't do anything
Edited: 04/25/2007 at 10:42:23 AM by DarthTurtle
How Do I Capture Ctrl + Another Key?
I want to be able to capture Ctrl + another key.
How do I do this?
I've got the following code from help:
var keyListener:Object = new Object();
keyListener.onKeyDown = function()
{
trace("DOWN -> Code: "+Key.getCode()+" ACSII: "+Key.getAscii()+" Key: "+chr(Key.getAscii()));
};
Key.addListener(keyListener);
But I can't seem to be able to capture key combinations like Ctrl + another key.
For what I need to do, I really need to capture several key combinations.
At the very least, I want to be able to capture Ctrl + another key.
Any help would be appreciated.
Thanks.
OM
CTRL+P Problem
so, i have this code:
Code:
var keyObj:Object = new Object();
keyObj.onKeyDown = function() {
if (Key.getCode() == 80) {
/////////////////
var pj = new PrintJob();
var success = pj.start();
if(success)
{ pj.addPage (0, {xMin : 0, xMax: 1, yMin: 0, yMax: 1});
pj.send(); }
delete pj;
//////////////////
}
//trace(Key.getCode());
}
Key.addListener(keyObj);
which essentialy prints a blank page for a user.
my trouble is that, if I press "P" -defined by ascii=80, all is good, but if i press CTRL+P (as most will do by default), the routine doesn't work anymore.
Been trying to replace 80 with 16, as i found in some ascii charts but to no avail..
any suggestions?
Disable Ctrl+R.
I know that the command "Stage.showMenu = false" can be used to disable the menus in flash. However the play, rewind, step forward, step backwards controls are still available by key shortcuts. Is there anyway to fully disable these, especially Ctrl-R (rewind).
CTRL + Enter
I've got a password loggin and if you press CTRL + Enter then it automatically goes to the next frame !
Is their any way to disable the CTRL + Enter keys from working?????
Thanks
Appels
How Do I Capture Ctrl + Another Key?
I want to be able to capture Ctrl + another key.
How do I do this?
I've got the following code from help:
var keyListener:Object = new Object();
keyListener.onKeyDown = function()
{
trace("DOWN -> Code: "+Key.getCode()+" ACSII: "+Key.getAscii()+" Key: "+chr(Key.getAscii()));
};
Key.addListener(keyListener);
But I can't seem to be able to capture key combinations like Ctrl + another key.
For what I need to do, I really need to capture several key combinations.
At the very least, I want to be able to capture Ctrl + another key.
Any help would be appreciated.
Thanks.
OM
Disabling Ctrl+ V
Hello!
I would like to disable the paste function in a input texfield. I googled it and saw that it was possible to modify the menue that appears when you rightclick in a texfield, but I canīt figure out how to make this work.
I have an input textfield in my root named "password2".
I found this resorses
http://www.adobepress.com/articles/article.asp?p=102024
http://livedocs.adobe.com/flash/9.0/...=00002217.html
I would be very thanksful for any help given.
Regards Arian
Capturing Ctrl-Z
Does anyone know how to capture key-presses that use Ctrl such as Ctrl-Z?
I am trying to add an undo function to my project and the following code (using Shift instead of Ctrl) works:
keyListener = new Object();
keyListener.onKeyDown = function() {
if (Key.isDown(Key.SHIFT) && Key.isDown(90)) {
undoer.undo();
}
};
Key.addListener(keyListener);
But if I change that to Key.isDown(Key.CONTROL) && Key.isDown(90) then it will only work if I press Z first and then CTRL! That's not exactly conventional. My guess is that CTRL-Z must be registered as something else. Is there a way to use it though - or must I invent a new undo shortcut for my users?
Thanks,
Withnail.
CTRL + ENTER <<<< Not >>>> UPLOAD
when testing my movie (ctrl + enter) and then (ctrl + enter) "show streaming" my preloader works fine...
It shows the bytes loaded and when done it goes to the third frame...
But when I upload the file it wonīt go, or start already there, on frame 3...
Does anybody know something about it?
Thanks!!!!
Ctrl+Enter Prob
I've just discovered that in a flash swf or projector exe, pressing Ctrl+Enter causes the stop(); command to be ignored, and it jumps to the next keyframe, or scene.
I've tried trapping the Ctrl+Enter key press...but flash won't let me. Can someone tell me how to do ot...or suggest a way around it?
Thanx
Global Sound Ctrl...
hi all,
i have a MC that has my global sound in the 2nd frame, the first has a stop action. the sound is event > looping 99999 times....
on the play button i have the following:
on (release) {
tellTarget ("_root.sitemusic") {
play ();
}
}
it works fine...
on the stop button i have the following:
on (release) {
tellTarget ("_root.sitemusic") {
stop();
}
}
it doesnt work....
Also, how do make the play and stop buttons smart...so if the sound is playing it disables the button..???
Cheers
Lost Properites Ctrl+F3 Does Nothing
Is this a bug or did I disable by accident the ability to view Properties?
Even when I go to Window -> Properties
It doesn't want to check so it's not like it's floating out of view.
Game Show (ctrl.....)
I have made a game show consisting of 12 questions where in the player wins money for each right answer.I have created this using Flash5....The problem is when anyone hold on "ctrl+the right arrow" he can see the next frame.....is there any code by which i can disable this......I have given the buttons the random actions i.e; to jump to any question starting from 1 to 12.....I also wated to know is there any method by which it can add up all the money won even in random picking of questions?Plz. help me
MX Ctrl + Enter Preview
Hi
We are using MX on a Windows 2000 network and are experiencing some intermittent problems when attempting to preview movies.
Some machines display a blank screen when Ctrl + Enter are pressed. On others it seems to work alright. Has anyone experienced this problem and if so do you have any suggestions for solving it?
Thanks
Richard
Capturing Keypress <Ctrl>+key?
Hi,
Does anyone know how to use multiple keypresses like <ctrl>+B or something like that for the button on() function?
Thanks
Mav
Copy Text ( Ctrl + C) - PLease Help
Hi there!!!
-- I'm not talking about serial numbers, I will just mention it to better explain what I need, ok?? --
Have you ever seen those software crackers that generate serial numbers and there's a button "COPY" right beside the generated serial number???
So, I'm working on a website about POEMS & LITERATURE and I'd like to put a button named "COPY IT" at the end of the text and this button would do the same as selecting the text and pressing Control key + C.
The user would be able to copy the text without having to press that key sequence....
Is that possible??? I know it's possible because I have seen it before but that wasn't flash though.
--- CAN ANYBODY HELP??? ---
tks
Holding Down SHIFT And CTRL
Okay, so I want to make a button (can do that), but I want it to activate when ALL of the following conditions are true...
1. The user has the CTRL key pressed down (left CTRL or right CTRL).
2. The user has the SHIFT key pressed down (left shift or right shift).
3. Only when those two are met, can the user right CLICK on the button, and it takes them to frame x.
I've tried messing around with the action script myself, all to no avail
|