Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Redeclare After Delete



Hi!
Is it possible to re-declare this.onPress after delete (this.onPress) is called?

I have input texbox in this mc that needs to get focused when pressing on mc, after setting focus it deletes the onPress but I need it to be back when the textbox loses focus(another mc is pressed)

Please help!



ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 02-27-2004, 04:03 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

How To Delete Movieclip From Delete Key And Backsp
how to delete textfield movieclip from delete key and backspace

Delete Var
Hi all,

I made a simple mailscript in ASP and I managed it to work with Flash. It simply gets all vars from Flash and mails it to the specified address.
The problem is that I don't want ALL the vars to be send. A status check var for example shouldn't be mailed.
Is there any way I could delete (or deconstruct) a variabele in Flash?

Greets Rik.

Please Delete
Made a mistake !

Sorry

Delete Me Please
Sorry, didn't mean to post a new thread!

Delete This.?
Good Morning, Afternoon, Evening FlashKit. Ive got a menu/menu slider (with jazzy fx) that works like a charm on my maintimeline (frame 1). Problem: when it jumps to frame 2, Im still left with my menu slider sitting, smiling at me . Ive been researching types/ways to eliminate this and do not have the creative fortitude this morning to be able to apply such methods effectively any help would be greatly appreciated. ThankYou.
Geoff


Code:
menuButton = new Array();
menuButton[1] = "standard";
menuButton[2] = "negative";
menuButton[3] = "singlesample";

for (i=1; i<=4; i++) {
_root[menuButton[i]].onRollOver = function() {
if (!_root.slider) {
_root.attachMovie("sliderID", "slider", 1);
_root.slider._y = _root[menuButton[i]]._y+145;
}
_root.attachMovie("fxID","fx"+i,2);
_root["fx"+i]._y = this._y;
_root["fx"+i]._x = this._x;
_root.slider.xtarget = this._x;
slider.onEnterFrame = function() {
this._x += (this.xtarget-this._x)/4;
if (Math.round(Math.abs(this.xtarget-this._x))<.5) {
delete this.onEnterFrame;
}
if (_root.slider.xtarget) {
_root.attachMovie("flashesID", "flashes", 3);
_root.flashes._x = _root.slider._x;
_root.flashes._y = _root.slider._y;
}
}
}
_root[menuButton[i]].onRollOut = function(){
_root.removeMovieClip(_root["fx"+i]);
removeMovieClip(flashes);
}
_root[menuButton[i]].onPress = function() {
gotoAndPlay(2);
}
}

Delete
I have a dude and a star.
When the dude walks against the star the score rises with 100.
But the star also has to be deleted.


Code:
onClipEvent (enterFrame) {
if (this.hitTest(_parent.dude)){
_root.score += 100
}
}


Please adjust this script so the star will be deleted if the dude walks against it.

DELETE ME
Nevermind, wrong forum. Kill me now

Delete
Mistake

Delete Everything
How would you say "delete all the movieclips on the stage except for _"?

Delete
Mis Post - Admin, Please Delete

Delete Mcs
how do i delete movie clips?

i know ive seen this some where before...

Delete Me
please delete

Delete Me
I'm not sure how you can do a roll off, what I'm talking about is buttons, I'd like to play animation when you roll off a button.

Delete AS With AS...
Is it possible to delete Actionscript on a movieclip by hitting a button?
What I want to move something around in my animation while it is playing with the arrow keys, which is easy enough. But then, when I hit enter (or some other button) I want it to remain stationary until it gets deleted later on (since I'm probably going to put in another movieclip that is moved with the arrow keys, remains stationary, and then gets destroyed). So I was thinking that I would delete the actionscript inside of the movieclip once I get it to where I want it to be.
Is it possible to delete lines of code using lines of code, or is there an easier way to solve the above problem that I'm not thinking of?

P. S. Using Flash 8

Delete This...
Curse my bad internet connection and its double-postitis.

Delete Me
sorry for posting this, delete me!

Delete BTN
I have a movieClip that has two actions on it 1. a drag and drop 2. and enlargement when released

My issue is I have a BTN that will delete the movie clip, but I need an action that will make the BTN visible on release of the movieClip and delete it's self(the BTN) when it deletes the MC.

any help thanks


http://www.gardengatestore.com/flashTest.html

Will You Delete Please?
hi, Today, I would like to know how to delete a variable.



i have a abc.as


Code:
class abc
{


function delme()
{
trace("prepare to delete...");
this=null;
delete this;
}

}
im my scene:



Code:
var del:abc=new abc();
abc.delme//output prepare to delete ...
abc.delme//output prepare to delete ... <<I do not want this...
...but HOW? thanks!

Web --> XML Delete ?
im building a web and im targeting different frames to show contents... son frame 15 im building a Signature Book by AS3 ... the problem become when i return to previous frames, the xml document are still IN.
Its supposed to be a delete method on change frame?
my code more or less is like :

Code:
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, loadXML);
loader.load(new URLRequest("text/book.xml"));
function loadXML(e:Event):void
{
var xml = new XML(e.target.data);
Firmas(xml);
}
function Firmas(firmaInput:XML):void {
var textio:TextField = new TextField();
var textf:TextFormat = new TextFormat();
var fuente:Font = new Font1();
textf.font = fuente.fontName;
textf.size = 13;
textio.defaultTextFormat = textf;
textio.embedFonts = true;
textio.width = 400;
textio.height = 400;
textio.y = 50;
textio.text = "DEJA TU FIRMA";
var textio2pos:Number = 0;
for each (var item in firmaInput.firma){
var textio2:TextField = new TextField();
textio2.defaultTextFormat = textf;
textio2.embedFonts = true;
textio2.text = item;
textio2.height = 400;
textio2.width = 400;
textio2pos += 100;
textio2.y = textio2pos;
this.addChild(textio2);
}
this.addChild(textio);
}
? maybe can i make some IF statement on changing frame to delete all variables ?

How Do I Get Rid Of A Delete...
Code:
_root.nowPressed = " ";
buttons = [SX1, nokia6600];
if (_root.nowPressed == " ") {
for (j=0; j<buttons.length; j++) {
buttons[j].onRollOut = function() {
SX1._alpha = 100;
nokia6600._alpha = 100;
nokia3650._alpha = 100;
};
}
}
SX1.onRollOver = function() {
nokia6600._alpha = 50;
nokia3650._alpha = 50;
};
Nokia6600.onRollOver = function() {
SX1._alpha = 50;
nokia3650._alpha = 50;
};
SX1.onPress = function() {
delete this.onRollOut;
delete this.onPress;
_root.nowPressed = "SX1";
attachMovie("c01", "c01", "this");
c01._x = 412;
c01._y = 158;
//nokia6600._visible = 0;
//nokia3650._visible = 0;
};
Nokia6600.onPress = function() {
delete this.onRollOut;
delete this.onPress;
_root.nowPressed = "Nokia6600";
attachMovie("c02", "c01", "this");
c01._x = 412;
c01._y = 158;
endX = 372;
//SX1._visible = 0;
//nokia3650._visible = 0;
};
The button stops working but how do I get it to rework again?

How To Delete
i have created many shared objects remotely and i wonder if there is anyway i can delete them from the server?

Using The Delete Key
I seem to be having a problem using the delete key to trigger events. The code I'm using is to call a delete function and I've tried it with other keys and they work. I've written

listener = new Object();
listener.onKeyDown = function() {
if (Key.isDown(Key.DELETEKEY)) {
_root.deleteNote();
}
};

does anyone know why this doesn't work? Regards

Delete Please
delete





























Edited: 12/05/2007 at 08:56:37 PM by RyviusRan

Delete Me
delete me





























Edited: 09/22/2008 at 07:18:37 PM by dmodie

Delete Please...
Sorry, delete please...





























Edited: 11/23/2008 at 09:51:53 PM by bausman480

DELETE
Moderator - please delete. Mispost. Thanks!





























Edited: 12/29/2008 at 09:33:07 AM by DIY_Lobotomy

DELETE
Moderator - please delete. Mispost. My bad - sorry!!!





























Edited: 12/29/2008 at 09:46:26 AM by DIY_Lobotomy

[delete]
[delete]



























Edited: 03/14/2008 at 01:41:03 AM by dmcleman1

XML Delete
I'm having trouble deleteing xml with the new "delete" command. I store a
reference to an xml element in a property or variable, it could be in a list
or data provider, or just in a variable.

delete myXml.chapters.item[2] // this works

myItem2 = myXml.chapters.item[2] ; // now i have a reference to item[2]

delete myItem2; // this won't work. Thinks I'm trying to delete the
variable or property "myItem2".

How can I delete an xml element that's a reference stored in a
variable/property?

Delete [fmx]
I have a question about a delete command inside a mouse event, imagine: I have an mc on stage and attach to this mc, some code(flash 5 style)
onClipEvent(enterFrame){
if(something){
something
delete this.onEnterFRame
}

}
but this dosenīt work, but in thae case I put this code in a frame in the timeline (flash mx style)

the code works

Why this works

thanks in advance

Delete An IF ?
Is it posible to delete an IF expression? Like when you delete an onEnterFrame ?

Delete MC
Hey all,

I have an external .swf load into the mc "container" when the page loads. When the user clicks on a button, I want to delete the mc. How would I go about doing this?

Thanks,

Dan

Delete
I just wanted to know if Flash's garbage collector is worth relying on? I could simply call delete when needed, if it will help consistancy and speed. Opinions?

Delete Help
Okay, so I'm trying to make a little game that has a whole bunch of objects moving towards a specific point, and you have to protect that point by defeating all the objects. In order to defeat the objects, you must continuously click on them. With each click, their alpha goes down by a certain amount, in this case, 10%, or 0.1. When their alpha is equal to 0, they die, and are deleted from the game. If you bring the cursor away from the object before its alpha is 0, then their alpha goes back to 100% and you must start all over again.

This is the code I am using for the instance "circle":


Code:
//--- Import ---\
import flash.events.MouseEvent;

///--- Lower Alpha And Delete ---\
addEventListener(MouseEvent.CLICK, mouseClick);
function mouseClick(event:MouseEvent):void{
circle.alpha-=0.1;
}
if(circle.alpha<=0){
var itemToRemove:DisplayObject = circle;
this.removeChild(itemToRemove);
}

///--- Return Alpha To 1 If Roll Out ---\
addEventListener(MouseEvent.ROLL_OUT, circleHeal);
function circleHeal(event:MouseEvent):void{
circle.alpha=1;
}
My problem is that when the object's alpha is 0 and is deleted, and you bring the cursor away from the object, its alpha goes back to 1, even though it is deleted. There are no compiler errors, so I'm not quite sure what's wrong. I appreciate any help. Thanks in advance =D

Delete [fmx]
I have a question about a delete command inside a mouse event, imagine: I have an mc on stage and attach to this mc, some code(flash 5 style)
onClipEvent(enterFrame){
if(something){
something
delete this.onEnterFRame
}

}
but this dosenīt work, but in thae case I put this code in a frame in the timeline (flash mx style)

the code works

Why this works

thanks in advance

Delete An IF ?
Is it posible to delete an IF expression? Like when you delete an onEnterFrame ?

Delete MC
Hey all,

I have an external .swf load into the mc "container" when the page loads. When the user clicks on a button, I want to delete the mc. How would I go about doing this?

Thanks,

Dan

AS3 - Delete Help
Okay, so I'm trying to make a little game that has a whole bunch of objects moving towards a specific point, and you have to protect that point by defeating all the objects. In order to defeat the objects, you must continuously click on them. With each click, their alpha goes down by a certain amount, in this case, 10%, or 0.1. When their alpha is equal to 0, they die, and are deleted from the game. If you bring the cursor away from the object before its alpha is 0, then their alpha goes back to 100% and you must start all over again.

This is the code I am using for the instance "circle":


Code:
//--- Import ---\
import flash.events.MouseEvent;

///--- Lower Alpha And Delete ---\
addEventListener(MouseEvent.CLICK, mouseClick);
function mouseClick(event:MouseEvent):void{
circle.alpha-=0.1;
}
if(circle.alpha<=0){
var itemToRemove:DisplayObject = circle;
this.removeChild(itemToRemove);
}

///--- Return Alpha To 1 If Roll Out ---\
addEventListener(MouseEvent.ROLL_OUT, circleHeal);
function circleHeal(event:MouseEvent):void{
circle.alpha=1;
}
My problem is that when the object's alpha is 0 and is deleted, and you bring the cursor away from the object, its alpha goes back to 1, even though it is deleted. There are no compiler errors, so I'm not quite sure what's wrong. I appreciate any help. Thanks in advance =D

Delete Key
is there any way to get around the delete key function that makes the browser go back a page? this is causing serious problems for me. uhg...

Delete All Variables
is there a way to wipe all the variables in use from memory in one action without having to delete var1; delete var2; etc..

thanks
Danny

Delete A File
can i delete a file (for exp. a text file that is located in drive c) using flash?
(maybe fscommand? but how?)

How To Delete A File
respected sir
i want to know that
how to delete a swf in flash
like i make a file abc.fla
n i make a button in it
then i want that if i open abc.swf
n if i press that button then flash
delete abc.swf
plz sir give me responce
n inform me that how
i can use this script or
how to delete a swf file in flash
thanx

Delete Scenes
Help
I started to build a Flashmovie and I made ten scenes. But now I realised I only will need three scenes.
When I choose Windows- Panels -scenes
it is impossible to delete the seven scenes I dont need.
How can I delete the scenes?

Delete Frames In Mx?
I'm a little late in the game on this one, but what happened to using 'delete' or 'backspace' to eliminate frames on the timeline? Apparantly, this no longer exists. Is there a simple alternative, or do I have to resort back to the mouse? Sorry about having to post this question. Thanks,

-xample

Delete Variable Or Value
Hi!

I have the following problem: I am using getTimer(); to do a pause in my movie. I have place a varibale tiempo=getTimer(); in the frame 15 in my main timeline and in the frame 16 I do a condition. It works perfectly but when the movie go to the last frame and starts again, when it beguin to the condition, it doesnīt work. I have tryed to use delete tiempo; I have tryed tiempo=false and tiempo=null aswell but I can not solve it.

Please help!!!

Les.-

Delete OnEnterFrame
I have a function with an onEnterframe in a seperate swf which loads into a mc called "video"in my main swf.
when it loads I wanted to delete the onEnterFrame so I have said



Code:

//ball = attachMovie("ball", "b"+i, i);

ball.onEnterFrame = spring;
function spring() {
//spring code here
if (_root._currentframe>1) {
this.myText.text = "";
delete this.onEnterFrame;
}
}
Now this works when the swf is played without been loaded into the video mc but if I loaded it into the "video" mc in the main swf it won't delete ball.onEnterFrame and it won't set the myText.text to blank.
I know this is just a scope problem can some please help.

Delete Button
Is there a way to delete a button which is inside movie clip? I am trying to do this and it is not working:
1.bt_button - instance name of the button(everything is inside movieclip)

this.bt_button.removeMovieClip();

thanks

Copyright Đ 2005-08 www.BigResource.com, All rights reserved