Kill Focus On Components With AS2
Hello,
I'm using MX2004 Pro with AS2. I have used the TextArea, TextInput, and Button components. I can't prevent the green focus boxes from appearing when I tab to these items. Any suggestions would be greatly appreciated.
Ultrashock Forums > Flash > ActionScript
Posted on: 2004-03-04
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Kill Focus?
Please, advice me the way how I can remove focus from all the objects. Not to set it to another object via focusManager.setFocus(), but remove it completely.
How To Kill Focus?
Sometimes it is necessary just to kill focus (e.g. from the TextField instance). But I found no ways to do that. The only solutions is to set focus on another instance that handles mouse events. But this way is not perfect. Any suggestions?
MovieClip Kill Focus
I have a bunch of drag and drop mc's that I want something done after they lose "focus". When I say "focus" I don't mean keyboard focus. I want it to be the same as when a textfield loses focus. I can click on a textfield, type something, then when I click something else, it loses focus. With a textfield this code works:
//When someone clicks something elese after typing in the textfield it traces.
inputText_txt.onKillFocus = function() {
trace("Textfield lost focus");
}
I want the same thing to happen with my mc's. How do I do that?
Kill Focus On A Textfield
Here's a tip I just figured out in regards to killing focus for a textfield:
Scenario:
- You have a form the user is filling out in your Flash site.
- They fill out half the form then go to another area of the site.
- The focus is still in the last textField they were entering information into.
- If there is other functionality that is not using form fields the focus stays on the last typed in textField.
- This can mess up other functionality events for the other movie clips in your site.
Solution:
Kill the current focus of the textField by setting the focus to a given movieClip:
ActionScript Code:
// enable focus for the clip
myMovieClip.focusEnabled = true;
// turn off that big fat ugly yellow highlight border
myMovieClip._focusrect = false;
// code to put inside your event function
Selection.setFocus(myMovieClip);
So in summary:
This code kills the focus on the given textfield and resumes normal functionality for your other interface stuff in your site.
How To Kill Focus In Combobox Component?
Help me!
After I select an item in combobox, I click to a InputTextbox to type some words.When I type a letter is a first leter of the label of an item in combobox, this combobox change to selected this item. it's still in focus. I don't know how to kill focus of it.
Do you know how?
Kill Focus On Input Text?
so there must be a way - I've tried
Selection.setFocus(null) with no avail - anyone know how to stop that dreaded blinking cursor once you've clicked in the box?
ie:
I want to type in some text, submit it, but then, the cursor no longer blinks in that box. (which i assume would mean the focus is killed)
any ideas?
much appreciated as always!
Custom UI - Kill Focus - Flash Authoring Environment?
I am creating a Custom UI because my component has an upwards of 30+ variables. Eeek!
I've already created the Custom UI. Everything works fine... except....
When you click off the custom UI to any place on the flash authoring environment, the variables do not actually get "set."
I set them up so that onKillFocus they call a function that updates the xch object.
For example this is a bit of the code within a movie clip.
It detects when the textInput box named "id" has its focus changed.
id.onKillFocus = function(obj) {
//////passes two variables to the function
/////1 name of component variable to be updated
/////2 the value to be updated
_root.updateVariable("textId", id.text);
};
////this function is on _root
updateVariable = function (nameOfVariable, newValueForVariable) {
_root.xch[nameOfVariable] = newValueForVariable;
};
It works fine, but it only works within the custom UI swf. Blaah!
It doesn't really feel intuitive to click on the custom ui, then continue about your work on the stage.
Is there a way to detect when your mouse clicks on somthing outside of the swf?
Or better yet, just leave the swf?????
Is there a "onKillFocus" of sorts for the entire movie.
If so, I could then set that up as the event that would call my updateVariable function that updates my xch object.
Focus & Tab On MX2004 Components ...
Ok, I know you can do this with TEXT FIELDS ... but could someone tell me how to accomplish this with the component items!?
I've got a listener to listen for the reset button, so on the timeline I have this script:
code:
clippy2Listener = new Object();
clippy2Listener.click = function (evt){
form.nameC.text = "";
form.emailC.text = "";
form.commentsC.text = "";
form.Selection.setFocus("nameC");
}
resetB.addEventListener("click", clippy2Listener);
The form does clear, so the code is working, however, the focus isn't setting.
Any ideas? And also with the tab indexing, can this be done with components.
THANKS TO ANYONE WHO CAN ANSWER!!!
Focus & Tab On MX2004 Components ...
Ok, I know you can do this with TEXT FIELDS ... but could someone tell me how to accomplish this with the component items!?
I've got a listener to listen for the reset button, so on the timeline I have this script:
ActionScript Code:
clippy2Listener = new Object();clippy2Listener.click = function (evt){form.nameC.text = "";form.emailC.text = "";form.commentsC.text = "";form.Selection.setFocus("nameC");}resetB.addEventListener("click", clippy2Listener);
The form does clear, so the code is working, however, the focus isn't setting.
Any ideas? And also with the tab indexing, can this be done with components.
THANKS TO ANYONE WHO CAN ANSWER!!!
Focus & Tab On MX2004 Components ...
Ok, I know you can do this with TEXT FIELDS ... but could someone tell me how to accomplish this with the component items!?
I've got a listener to listen for the reset button, so on the timeline I have this script:
ActionScript Code:
clippy2Listener = new Object();clippy2Listener.click = function (evt){form.nameC.text = "";form.emailC.text = "";form.commentsC.text = "";form.Selection.setFocus("nameC");}resetB.addEventListener("click", clippy2Listener);
The form does clear, so the code is working, however, the focus isn't setting.
Any ideas? And also with the tab indexing, can this be done with components.
THANKS TO ANYONE WHO CAN ANSWER!!!
Problem W/ Components And Focus
Hi everyone,
I have a problem with Flash 8. Whenever I have a component either on stage, or in the library, there is a problem with the focus. For example, I have a text field on the stage. If you click the text field, focus is set to it. And when you click anywhere outside the text field, it should lose focus. But this doesn't happen when the component is there. This causes a big problem if you use onKillFocus on the text field. Now of course, there's no problem when the component is gone from the stage and library. To test this out, make a new movie with a text field. Create an onEnterFrame function to trace Selection.getFocus(). When you click on the text field you'll see that it traces out the instance name of the text field. And when you click outside the text field it traces out "null". Now add a component to the stage and repeat the process. When you click the text field it traces the instance name, but when you click outside the text field it traces "null" for a split-second, then goes back to tracing the instance name.
Can anyone help me figure out how to fix this problem?
Focus & Tab On MX2004 Components ...
Ok, I know you can do this with TEXT FIELDS ... but could someone tell me how to accomplish this with the component items!?
I've got a listener to listen for the reset button, so on the timeline I have this script:
ActionScript Code:
clippy2Listener = new Object();
clippy2Listener.click = function (evt){
form.nameC.text = "";
form.emailC.text = "";
form.commentsC.text = "";
form.Selection.setFocus("nameC");
}
resetB.addEventListener("click", clippy2Listener);
The form does clear, so the code is working, however, the focus isn't setting.
Any ideas? And also with the tab indexing, can this be done with components.
THANKS TO ANYONE WHO CAN ANSWER!!!
Components (green Outline On Focus ?)
Flash MX 2004
Yeah, I'm just in the process of learning how to use components. I have a scrollpane with an SWF in it and it works just fine BUT every time i focus the scroll bar to actually scroll the content I get this ugly green (1 pixel wide) outline to the whole scrollpane. Why is this and how can I get rid of it?
Please and Thankyou.
Ptol
Lil Help? Components, Textfield Selections, And Focus (oh My)
i may've backed myself into a corner, i think.
i'm working on a lite html editor.. i have an input and output/preview textarea: one's regular text, one's html. i'm loading an external stylesheet and throwing the styles into the combobox, and using the combobox elements' data to create span tags with the class set as the selected element's data value.
the only problem is, i'm having trouble figuring out how to keep track of selection focus, down in the input box. i have other buttons for inserting bold, italic, etc tags around the selection, and functions for setting the selection parameters to variables onRollOver for the buttons. it works nicely.. when a button's clicked, focus shifts back to the input field, the original text is selected, no problem.
with the combobox, however, i can't find any reference to a way to keep track of rollover?? is there some alternate way to set the selection parameters before focus on the input textField is lost? i tried adding a listener to combobox.open().. focus is already lost. is there a way to set the selection parameters upon selecting the text? i've looked around pretty thoroughly and can't seem to find anything that quite solves this problem. any info would be much appreciate, thanks
e:// whoops.. mx 2004
Strange Interaction Between Components And TextField Focus
It is very easy to reproduce the problem.
> Create an input TextField dynamically (see attached code). Clicking on the text allows the user to edit it. Clicking away from the text makes it lose focus. All is fine.
> Now, just drag a UIScrollBar component to the Library (the same problem appears with other components as well) and try doing to the TextField what you did before: Click on the text and edit it. Clicking away from the text does NOT remove focus. Or, to be more precise, the TextField loses focus and instantly regains it!
Any thoughts? Is this a known issue?
Attach Code
var mc:MovieClip = this.createEmptyMovieClip("mc",this.getNextHighestDepth());
var tf:TextField = mc.createTextField("tf",mc.getNextHighestDepth(),0,0,0,0);
tf.autoSize = "left";
tf.text = "a string";
tf.selectable = true;
tf.type = "input";
Note On Tabbing/ Focus Issues In Some Flash Components.
I was working on the large flash standalone project. During the development, we found some strange things about the tabbing and focus. Some of you might already know these issues.
Here is the list.please add your finding here so that others dont have to waste their time on research.
1) Flash MX 2004 -- > I disabled a radio button useing radioBtn.enabled = false. So now I can't click & select the radio button. Now press the tab & get the focus on the radio button. press the arrow keys & navigate through radio buttons of that group & you will see that, disabled radio button is also gatting selected. It means disabled radio buttons are not truely disabled. they still can be selected using keyboard.
http://www.balasainet.com/members/cr...it/radio1.html
2) Flash MX -- > I assign a handler function to a combobox using comboBox.setChangeHandler("comboFunc"). When I select any value in the combobox, handler function gets execute, good. Now I remove all the values in the combobox. When I click on that combobox, my handler function doesn't get execute since combobox is empty nothing is selected. Now click the combobox & press the down/up arrow key & you will see that handler function is executed. It means that even if the combobox is empty & there is no value to select, handler function can be executed.
http://www.balasainet.com/members/cr...it/combo1.html
3) Flash MX 2004 -- > Date(calendar) component doesn't receive focus at all. It means you cant select date component using tab.
4) Flash MX 2004 -- > I have three radio buttons r1, r2, r3 with group named radioGroup.
I assigned a handler function 'onRadioSelected' to each of the radiobutton. r1.addEventListener("click", onRadioSelected);, r2.addEventListener("click", onRadioSelected);, r3.addEventListener("click", onRadioSelected);.
When I click any of the radio button, handler function gets executed, good. Now press the tab and get the focus on the radio button of that group & navigate through r1, r2 & r3 using arrow keys. You will see that handler function is NOT getting executed. It means when you select any radio button using mouse, handler function will execute. but, when you select any radio button using tab, handler function doesnt execute.
The work around for this, is to assign the handler function to the group. radioGroup.addEventListener("click",onRadioSelecte d); instead of assigning the handler function to the individual buttons. But what if I want to assign different handler functions to each of the radio buttons?
http://www.balasainet.com/members/cr...it/radio2.html
5) When you import the flash movie in the Director mx 2004, in many situations tabbing/focus doesn't work properly or doesn't work at all.
This is very strange that components behavior is different for mouse clicks and the keyboard hits. We never expected such issues.
regards
Mahesh Kokadwar
Focus Problems On Return Focus To Html Window
Hi all
Im wondering if anybody has come across this problem before while developing with flash and javascript/HTML. Basically I have created a flash interface which accepts user input in the form of keystrokes - left arrow, up arrow etc....
This works fine in the standalone flash player - but when the movie is published into a html page and it loads up the keystrokes don't have any effect unless I a) click first on the flash movie within the html page or b) use JavaScript to catch the onLoad event in the html body tag and manually set focue to the movie using document.keyFocusCheck.focus();.
Ok, I've got this far and its working fine - im loading my html windo and setting focus to my flash movie(nad my keystrokes work straight off)- however here is my problem. If I alt+tab away from my html window and then alt+tab back to my window - my keystrokes don't work again unless I click first in the flash window - I've tried lots of different ways to reset focus to my flash file (eg. Putting an onFocus event handler in my html pages' body tag) but to no avail - I am wondering if it is actually possible to catch the focus event once the html window has lost its focus and then had it returned as everything I have tried doesn't work!
I have included a sample 'dumbed down' version for you guys to check out - if anybosy could point me in the right dirrection of offer any help that would be massively appreciated.
Thanks in advance
DotsC
Browser Focus Vs Flash Focus
If your swf extends the height of the browser, the standard browser scrollbar appears.
If you just opened your site, and have NOT clicked inside the browser, on your swf area, the browser will scroll vertically with the up/down keys.
If you click your swf in the browser, the up/down keys no longer register with the Browser, and you cannot scroll vertically.
Is anyone aware of a way to remedy this problem? My first thoughts are maybe sending external interface commands to a javascript function to simulate the up/down scroll, but I'm not positive if javascript can control a browsers scrollbar, and whether there are problems cross-browsers with that.
Multiple Movieclips Focus / Out Of Focus
Hi!
I'm currently creating a website for a school project, and have some questions regarding this:
I have a website with 6 different links, and a background (7 mc's).
*When the website loads I want the whole page to be in focus
*when I rollover one of the links I want the rest of the movieclips/links incl. background to go out of focus (blur out)
*when the mouse is over the background I want the whole page to be in focus again (no blurring)
When the site loads everything is in focus, this is correct.
problem is; I have to rollover all of the movieclips before the function 'starts'..
example: the website loads, everything is in focus. I rollover one of the links, nothing happens. Then when I go back to the background, the link blurs, which would be fine if I pointed my mouse at another link, but when I point it at the background, I want everything to be in focus again.
For now I have an actionscript inside every movieclip (including the background mc) similar to this:
stop ();
//importere filter
import flash.filters.BlurFilter;
import mx.transitions.Tween;
import mx.transitions.easing.*;
var filter:BlurFilter = new BlurFilter(0, 0, 3);
var filterArray:Array = new Array();
filterArray.push(filter);
//funksjon
skjermbilder.filters = filterArray;
skjermbilder.blurred = 0;
this.onRollOver = function(){
var tw1:Tween = new Tween(skjermbilder, "blurred", Strong.easeOut, skjermbilder.blurred, 0, 1, false);
tw1["onMotionChanged"] = function() {
filter.blurX = skjermbilder.blurred*5;
filter.blurY = filter.blurX;
skjermbilder.filters = filterArray;
}
};
this.onRollOut = function(){
var tw1:Tween = new Tween(skjermbilder, "blurred", Strong.easeOut, skjermbilder.blurred, 1, 1, false);
tw1["onMotionChanged"] = function() {
filter.blurX = skjermbilder.blurred*5;
filter.blurY = filter.blurX;
skjermbilder.filters = filterArray;
}
};
PLEASE HELP!!
Lage.
Multiple Movieclips Focus / Out Of Focus
Hi!
I'm currently creating a website for a school project, and have some questions regarding this:
I have a website with 6 different links, and a background (7 mc's).
*When the website loads I want the whole page to be in focus
*when I rollover one of the links I want the rest of the movieclips/links incl. background to go out of focus (blur out)
*when the mouse is over the background I want the whole page to be in focus again (no blurring)
When the site loads everything is in focus, this is correct.
problem is; I have to rollover all of the movieclips before the function 'starts'..
example: the website loads, everything is in focus. I rollover one of the links, nothing happens. Then when I go back to the background, the link blurs, which would be fine if I pointed my mouse at another link, but when I point it at the background, I want everything to be in focus again.
For now I have an actionscript inside every movieclip (including the background mc) similar to this:
stop ();
//importere filter
import flash.filters.BlurFilter;
import mx.transitions.Tween;
import mx.transitions.easing.*;
var filter:BlurFilter = new BlurFilter(0, 0, 3);
var filterArray:Array = new Array();
filterArray.push(filter);
//funksjon
skjermbilder.filters = filterArray;
skjermbilder.blurred = 0;
this.onRollOver = function(){
var tw1:Tween = new Tween(skjermbilder, "blurred", Strong.easeOut, skjermbilder.blurred, 0, 1, false);
tw1["onMotionChanged"] = function() {
filter.blurX = skjermbilder.blurred*5;
filter.blurY = filter.blurX;
skjermbilder.filters = filterArray;
}
};
this.onRollOut = function(){
var tw1:Tween = new Tween(skjermbilder, "blurred", Strong.easeOut, skjermbilder.blurred, 1, 1, false);
tw1["onMotionChanged"] = function() {
filter.blurX = skjermbilder.blurred*5;
filter.blurY = filter.blurX;
skjermbilder.filters = filterArray;
}
};
PLEASE HELP!!
Lage.
Focus In And Focus Out Problem
Hi all, first time i enter this forum and have my first question about flash mx.
I cut my image into few parts, and within each part, I want to do some focus in, focus out action. So when user pointing on the part, it will shining or some other things and when focus out, it will return to original style.
I try to convert the image into symbol, and using rollover and rollout function, but the outcome is very poor and Im hardly to point to correct spot.
Anybody can help me please ?
Focus Color/Focus MC
I looked for answers on Help and on forums, but i still couldnt make it work. Ok. First. i tried and change focusrect color and it is not working. This is the script i used:
_focusRect = true;
globalStyleFormat.focusRectInner = 0xFF0000;
globalStyleFormat.focusRectOuter = 0xFF0000;
globalStyleFormat.applyChanges();
Im using Flash MX Professional 2004 and I publish it on Flash 6 with Actionscript Ver1. Im guessing its somehow related to this scripting and flash versions. Second, Im having a hard time trying to focus on a button inside an MC. I put this script on a maintimeline frame:
_root.mc1.text1.selection.setFocus();
This are the links to the FLA and SWF:
http://www.freewebs.com/kieserr/add.fla
http://www.freewebs.com/kieserr/add.swf
Please help. Thanks
Focus Color/Focus MC
I looked for answers on Help and on forums, but i still couldnt make it work. Ok. First. i tried and change focusrect color and it is not working. This is the script i used:
_focusRect = true;
globalStyleFormat.focusRectInner = 0xFF0000;
globalStyleFormat.focusRectOuter = 0xFF0000;
globalStyleFormat.applyChanges();
Im using Flash MX Professional 2004 and I publish it on Flash 6 with Actionscript Ver1. Im guessing its somehow related to this scripting and flash versions. Second, Im having a hard time trying to focus on a button inside an MC. I put this script on a maintimeline frame:
_root.mc1.text1.selection.setFocus();
This are the links to the FLA and SWF:
http://www.freewebs.com/kieserr/add.fla
http://www.freewebs.com/kieserr/add.swf
Please help. Thanks
Focus Color/Focus MC
I looked for answers on Help and on forums, but i still couldnt make it work. Ok. First. i tried and change focusrect color and it is not working. This is the script i used:
_focusRect = true;
globalStyleFormat.focusRectInner = 0xFF0000;
globalStyleFormat.focusRectOuter = 0xFF0000;
globalStyleFormat.applyChanges();
Im using Flash MX Professional 2004 and I publish it on Flash 6 with Actionscript Ver1. Im guessing its somehow related to this scripting and flash versions. Second, Im having a hard time trying to focus on a button inside an MC. I put this script on a maintimeline frame:
_root.mc1.text1.selection.setFocus();
This are the links to the FLA and SWF:
http://www.freewebs.com/kieserr/add.fla
http://www.freewebs.com/kieserr/add.swf
Please help. Thanks
Please Help Before I Kill My Cat
I need some help. I am creating a band webpage and they want a flash intro. ok well I want individual pictures to come up in different areas at differnt times. I can do that but I want them to fade in and out. I cant find how to do that. can someone please help me?!?!
Please Kill Me
I "ALMOST" have this working (after something like 25 hours invested into it)
http://members.aol.com/_ht_a/freqfest/formv3/index.htm
My question is to advanced to just post up here, if anyone has a REALLY good grasp of Actionscript would you be so kind as to let me e-mail you some code? Not to mention my head is POUNDING from looking at this screen all day and I'm not even sure I could form a question
also does anyone know where I can get some typewriter sounds?
Frequent-C
http://www.FreqFest.com
Please Kill Me
Hi follow DigiMONs,
I am working on a CD-ROM project, and I have a need to open up boarderless windowS with QTime file, and local htm file in it. I try to use java scripts generator, but it did not work. I was wonder if anyone knows how to make the damn thing work!!!! I have been working on this particular problem for about 3 days, and I think I am going to kill myself if I can't figer it out soon!!!! Any help will be great! Thanks you ssoooooooo much for stoping me to kill myself.
orange
[Edited by orangefish on 07-17-2002 at 06:31 PM]
It Will Kill Me........help Me...
the attachment is my work.
in fact it is a sample movie which i downloaded from here.
i have changed something, but it doesn't work.
i have write down my questions within the file's action scripts.
help me please......
Anyone Know How To Kill TAB?
I have ENTER set to activate my button and check for a correct array after filling out a text entry field, as seen here:
Code:
// The first time, initialize the counter, and pause (stop) at the end of the display time.
// the movie if this option is set
if (nAttempts == undefined) {
nAttempts = 0;
nFrameStart = _parent._currentframe;
bPauseMovie = 1;
nMaxAttempts = 1;
nPauseAfter = 19;
}
bHintPlaying = false;
if( bHandlersInitialized == undefined ){
bHandlersInitialized = true;
// for pausing the movie
onEnterFrame = function () {
if( _parent._currentframe - nFrameStart == nPauseAfter ){
if (bPauseMovie) {
_parent.stop();
}
}
}
// for triggering Hint Captions
onMouseMove = function () {
if( _xmouse < user_input._x + user_input._width &&
_xmouse > user_input._x &&
_ymouse < user_input._y + user_input._height &&
_ymouse > user_input._y ){
if( bHintPlaying == false ){
bHintPlaying = true;
gotoAndPlay("Hint");
}
}
else{
if( bHintPlaying == true ){
this.play();
}
}
}
// For checking text on enter key
var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
if(Key.isDown(Key.ENTER)){
eval(Selection.getFocus())._parent.CheckText();
}
}
Key.addListener(keyListener);
}
But TAB aslso does the same function. I need to disable any use TAB could have on this particular frame. Any suggestions?
I Am Going To Kill Myself
I di my first web page (total beginner) and each page is linked to a main page that contains an intro and a main and a preloader as well.these page are connected with geturl_self basically each page loads onto to the main. It works fine on any op in windows and on the mac osx but in other mac sistem whenever i hit the back buttons the main starts from the intro basically it doesn't read that it has been already loaded.I did publish the swf in flash 6 so maybe i have to republish all in 5? that would increase the size of my swf but is there any other options? is it a browser problem maybe i have to put some kind of tag into the html?
please help
thanking you in advance
max
www.gammacurta.com/flash/index1.html
MC Kill
How do i get this to work inside the Movie Clip?
Attached is my .FLA and my .swf (this has it working outside the MC)
Help, Before I Kill Myself
Hi, I was learning action script 2 at school (Miami Ad School). I was doing more or less fine... then, I purchased Flash CS3 thinking that it was going to be better/best/easier/more fun... And, no, nothing accomplished. Action Script 3 is sort of chinese to me (english is not even my language).
But anyway, I am stuborn, and I won't stop until I get it.
I am not looking to create amazing web sites, just enough to navigate using buttons, uploading movies, pictures and some design stuff. The problem is that I followed a Lynda.com course on how to use action script to navigate with buttons, I copied the code exactly as the instructor was writing it. Everything worked for him, nothing for me.
This is the code for just a miserable button (its instance name is equipo_btn):
----------------------------------------------------
stop();
function onEquipoClick(evt:MouseEvent):void{
gotoAndStop("equipo");
}
equipo_btn.addEventListener(MouseEvent.CLICK. onEquipoClick);
----------------------------------------------------------------
And when I publish it I get this error:
1119: Access of possibly undefined property onEquipoClick through a reference with static type String.
and this one:
1136: Incorrect number of arguments. Expected 2.
Why does the instructor get it right and I don't.
I went 30 time through these 4 lines of code and everything is exactly the same except that I named the frame "equipo" and he named it "home"
I have ready a razor, a gun and I have my head in the oven as I type...
Thank you from the buttom of my heart to those who can help me
Kill Input
how can I stop a flashing cursor in the input field?
is it possible? I still need the ability of changing the mouse to a hand when <a href> is encountered.
Thanks,
Stan
Kill Htm Window From Swf
guys
i do know how to trigger a window from swf.
but how to close window from a swf that is inside a htm?
* the swf is in a htm
thanks in advance
ahmadzombie
Kill The Movieclip
i've crated movies like this in one frame:
amount = 1;
while (amount>0)
{
duplicateMovieClip (_root.cloud, "x" +i, i);
setProperty("_root.x" +i, _x , (-250));
setProperty("_root.x" +i, _y , random(600));
setProperty("_root.x" +i, _alpha , random(75));
setProperty("x" +i, _xscale , random(120));
setProperty("x" +i, _yscale , random(120));
i= i +1;
amount = amount -1
}
and when i come to next frame, i wanna kill these lil' buggers... but just don't know how.
Can u help me?
Key Down Kill Sound, No....
Using MX. I have a sound in the library that has been added to a layer and starts after the preloader. It's set for Stream, and 10 loops. No identifier. The sound works fine, using a button to stop all sounds works fine. Using this code works fine:
Code:
userKey = new Object();
userKey.onKeyDown = function(){
stopAllSounds();
};
Key.addListener(userKey);
Until I test it by opening the generated html page. Then the sound plays, but won't stop. What am I doing wrong?
Kill Counter
Hi
i'm making a little game. And i have made i Dynamic Textsquare with the number 0 written in it. The Var name for this textsquare is kills
every enemy is a movieclip with a button in it. when you hit this button the clip plays and the enemy dies. Then i want the killed enemy to tell my textbox to +1. I dont now know to do that.
can somone please help me!
I Can Kill Flash
Don't know how, but it dies.
http://manassas.insitecorp.com/map_default1.htm
(this URL bypasses the counter and "jump" areas for non-flash users)
Step 1: Go to the "Search DB" tab on the left wall (thing that looks like a grid with a magnifying glass).
Step 2: Go to owner's name. I haven't checked all the combinations, but this is where I found the problem. Put in a last name and submit. Bottom right frame will report owners.
Step 3: Go ahead and check different last names. Flash is still working at this point. Now comes the beginning of the death submit. In the bottom right frame, you will notice a darker button. Hit this one. It will give a detailed listing of someone's property. You will notice a _blank page come up.
Step 4: Close detailed page. Now the main page is dead. I can put another name in but the submit no longer works. I tried going to address based search by street and the pulldown doesn't even list street names. I've even tried (without closing the page) to pump in the url that loads the variables into flash. Still dead. If I close down the page and open it again, it works again in the same way. Kills the page.
Anybody care to take a shot at that one?
The code behind the dark button is:
on (release) {
Acct_String = '../:Acct_Num' add substring(_name,9,5) add '.info';
Acct_Num = Eval(Acct_String);
getURL('detail_sheet.cfm?Acct_Num=' add Acct_Num, "_blank");
}
Kill Count
Is it possible to make a script wich shows how many times a button has been clicked? and then i mean, clicked by anyone at all.
Example:
Alex(In california): What i nice button, i think i will click it.
*Click*
Count: 1
Peter(In Sweden): OMFG! what i nice button, i just gotta click it!
*click*
Count: 2
And so on.
Kill Objects
lets say i have a custom object, foo
when i want one, i say:
var myFoo = new foo();
what do i say when i want to destroy myFoo?
Kill Functions ?
Hello !!! does anybody knows how to delete a function used in onEnterFrame event of a movie clip???
Let's see...
I have a MovieClip which is a preloader. the code is:
onClipEvent(load){
function loading(){
preload = Math.floor(_root.getBytesLoaded()/(_root.getBytesTotal())*100);
};
}
onClipEvent(enterFrame){
loading();
}
How can I quit this function when my preload = 100 ????
Thank's for helping
Guitz
Thats It Im Gonna Kill Myself< Ive Had Enough
god damn it ive simply had enough!!, bin tearing my hair out over three days solid now, and i need someone, anyone.... PLEASE! to help me with a referancing/targeting problem
i have main page for my site with link that is suppossed to open a popup window(javascript) with an embeded swf (no borders), now this works fine locally but not remotely. WHY????
ive tried every different javascript pop up script and it makes no difference
i get the bog standard "page cannot be displayed" message in IE,
because of this and the fact that it works fine locally, it must be to do with the targeting of the link? what do people think?
the link to page im testing is
iamiain/title3
the site name is obviously IAMIAIN.CO.UK but all the files are located on my friends webspace at http://area51.oxygenkiosk.net/htdocs/iain. the domain obviously is programmed to link to this webspace. all the files for site are in that folder mentioned above, so i should just need a relative address to target the html for pop up shouldnt I?
if i did need an absoloute referance what wud it be given the location of the files?
maybe people can test?
PLEASE LET A MAN GET HIS SLEEP TNITE!
XLS - Should I Kill My Client?
I have built a site allowing users to create a unique product.
My client had informed me that the pricing structure for the products would be simple.
I have since recived this 'simple' pricing structure and it is a huge and non simple XLS sheet.
SO GURUS- HOW DO I LINK FLASH TO THE XLS SO IT CAN WORK OUT THE PRICE AND RETURN A VALUE TO FLASH?
note, the end product description and price need to goto pay pal or similar.
Kill Actionscript
I was just messing around making a game one day and I thought to myself, is thier a way to kill actionscript after it has been used.
for example
Code:
function checkKey() {
if (Key.isDown(Key.SPACE)) {
kill checkKey()
}
}
(PS this code does not work so dont try it, its just demonstrating what I mean)
So once the space key has been pressed, it removes that function so it can never be used again when the space key is pressed. Kind of like getting rid of it after use.
I know you could probably use boolean to tell whether the key has been pressed then prevent it from working but I was just wondering if this could be done.
Hit Test Kill
im after a code that when my ship fires a bullet it will explodeand kill the alien
this is what ive got but it doesnt seem to work its on the enemy.
onClipEvent(enterFrame){if (hitTest(this.ship.bullet)){this.play();}}
thanks in advance regards john
Kill Variable Value
I have some variables imported from a text file (ex. v1,v2,v3,v4,v5 and so on...)
The variable quantity is undefined, might be 2 or might be 200. Is there any way I can reset the value of all variables in the movie to null or something like that?
|