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




Un-delete Function



Quick question.

I have a function running, and i have a button that when pressed, deletes the function. What i need to know how to do, or if it's even possible, is how to un-delete the function that was deleted from a button.

My physical scenario: Background moves left and right(due to the function) depending on position of xmouse. I want to give the option of having this function of the moving background being in effect, or not.
So basically, i need an "on" and "off" button for this function

The function:
code:
bg.onEnterFrame = function() {
//rest of code goes here
};

On button that deletes function:
code:
on (release) {
delete bg.onEnterFrame;
}


Gratzi for taking time to read my problem.

Take care,
Victor



FlashKit > Flash Help > Flash ActionScript
Posted on: 10-07-2004, 06:59 PM


View Complete Forum Thread with Replies

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

Delete Function
is there a way to delete a function();
is have a function:

this.onEnterFrame = function(){
this._x += (pos - this._x)/2;
this._y += (posy - this._y)/2;
}

is there a way to delete or disable this function after i leave that frame? If seems to me that the function is still running even after i am on a different frame. Thanks

Delete A Function?
Hey there!

I was wondering if it's possible to have a function on the first frame of my movie, let's say like this:


ActionScript Code:
onEnterFrame = function(){restartTimer();}


And then when the funtion has been executed, I wan't to disable it (delete it)!?

Can this be done?

Delete A Function?
okay, so i understand you can do a "delete this.onEnterFrame" kinda thingie in a function if you have attached that function to an onEnterFrame handler, BUT, I can't find anywhere that let's me know how i can delete the function all togther, like "delete myFunction();" (which doesn't appear to work)
is there a way to do this? or is my searching all in vain?

AS 2 Delete Function
i have this function on frame 5

function playit() {
play();
}

setTimeout(playit,5000);

and i want to delete it on frame 10 how to do this try like this but nothing

delete playit();

Delete A Function...?
Is there any way to delete a function or tell it to stop running after its been called?

I have one which handles a number of RollOver events for a help function but I want it to stop running when they turn help off. At the moment, once help is on it stays on!

Of course, I could go through and write code to turn off EVERY RollOver event, but then that wouldnt be very efficient would it!

thanks

Delete Function? And Another Q..
,

Is there a way to delete a function assigned to a movieclip?

like..

ActionScript Code:
myMc.myFunction()

and then remove it like...

ActionScript Code:
delete myMc.myFunction()


--------------------------------------------------------------------

And.....


ActionScript Code:
MovieClip.prototype.BackFunc = function() {
    this.onMouseDown = function() {
                myMcAlpha = new mx.transitions.Tween(myMc, "_alpha", easeType, myMc._alpha, 100, 25);
            myMcAlpha.onMotionFinished = function(){
                trace(this._name)
}
}
}


How can I find out what the name is of the movie where my BackFunc is assigned to..in my trace_line 'this' referes to myMcAlpha, I guess..
Anyone?

Delete This.onEnterframe Function?
To avoid unneccesary onEnterFrame checks I wonder if i can delete it after '} else {'. I dont want to removeMovieClip.


PHP Code:



onClipEvent(load) {
    function expand(endSize) {
        this.onEnterFrame = function  () {
            var myHeight = _height;
            if(_height < endSize) {
                myHeight = myHeight*1.2 + 1;
                if(myHeight > endSize) {
                    myheight =endSize;
                }
            } else {
                myheight =endSize;
            }
            _height = _parent.mask._height = myheight;
            _parent.videoplayerbg._y = _parent.player._y = myheight + 7;
// delete the onEnterframe function?
        }
    }
}




Any thougts or cool tricks out there?
//pod

Delete The OnMouseDown Function?
Hey,

I'm using the folowing code to create the onMouseDown function in frame 1:
code:
function update(){
player.startDrag(true);
this.onMouseDown = function(){
player.stopDrag();
player.x = player._x;
player.y = player._y;
//--delte onMouseDown function here.
}
}

I want the onMouseDown function to be deleted in where I have a comment. Is this possible?

Thnx,
SaphuA

How I Can Delete The Object With A Function
i want to delete a object with function parameters,but ....
code:
function del( o )
{
delete o;
}
var obj = new Object();
trace(obj);
del(obj);
trace(obj); // not delete


i think that cause of prototype scope?
how can i do

How To Delete Button Function ?
hey flashers

i have a hopefully simpel question

is it possible to delete a the functions on a button via actionscript ?

like if i have my timeline with 10 frames on frame 1 i have my button and call it with "my_button.onRelease = function() {gotoAndStop(10);}" is their a way to delete this function on frame 10 ???

hope it make sense

For Loop/ Delete Function
Hey everyone,
I was wondering if someone could help me out with the for loop along with the delete function. What I am making will have 20 treasure chests on the stage (they all come from the same instance in the library so they all have the exact same code) each numbered numerically (eg: mc1, mc2, mc3) and when a user clicks on one it will pop open and then all the other ones will become unclickable. Im trying to do this by using a for loop and while a number is under 20 it makes a variable starting at mc1 and then moves onto mc2. But before it moves onto mc2 it has a delete function that deletes an onRelease. My for loop is working fine I can trace out mc1 all the way to mc20 but i cant seem to get "control" of the movieclips to delete their onRelease functions.

Here is my code that is in the move clip and sorry for the long winded explanation. If Anyone knows what I'm doing wrong or a smarter way to do this I would love to hear it. Thanks alot.

stop();
chestNum = 0;
finalNum = 0;
this.onRelease = function(){
this.gotoAndStop(2);
var sum:Number = 0;
for (var i:Number = 1; i <= 20; i++) {
sum += i;
chestNum += 1;
finalNum="mc"+chestNum
trace(finalNum)
delete _root.finalNum.onRelease;
}
}

Delete Function In Paint App
I've built this neat painting app complete with a function to "undo" the last action (mc) that's created. However, I'm trying to create a "delete" function using hitTest to remove the shape/MC that's clicked on. What I've got so far isn't working...could you help?


Code:
controlBar.colorPalette._visible = false;
greenChoice._visible = true;
redChoice._visible = false;
squareText._visible = true;
circleText._visible = false;
var shapes = new Array();
var shapeText = new Array();

var bgImage:MovieClip = this.createEmptyMovieClip("bgImage", bg.getDepth()-1);

if (!url) url = "http://www.porper.net/ix/flash/test.jpg";
bgImage.loadMovie(url);
bgImage._x = 56;

var isDown:Boolean = false;
var c:MovieClip;
var startx, starty;
var red = 0xff0000;
var green = 0x00ff00;
var color = green;
var tool = "R";

//tooltips

function tooltip (string) {
xmouse = getProperty("", _xmouse);
ymouse = getProperty("", _ymouse);
duplicateMovieClip ("_root.tooltip", "tooltip1", 1);
tooltip1.tooltip = string;
setProperty (tooltip1, _x, xmouse);
setProperty (tooltip1, _y, ymouse);
startDrag ("_root.tooltip1");
tooltip1.gotoAndPlay(2);
}
function remove_tooltip () {
stopDrag ();
removeMovieClip ("tooltip1");
}

controlBar.infoClick.onRollOver = function(){
_root.tooltip("Instructions for use:")
}

controlBar.infoClick.onRollOut = function(){
_root.remove_tooltip();
}


//control buttons

controlBar.circleClick.onRelease = function(){
tool = "E";
circleText._visible = true;
squareText._visible = false;
}

controlBar.squareClick.onRelease = function(){
tool = "R";
squareText._visible = true;
circleText._visible = false;
}

controlBar.colorButton.onRelease = function(){
controlBar.colorPalette._visible = true;
}

controlBar.colorPalette.greenClick.onRelease = function(){
color = green;
greenChoice._visible = true;
redChoice._visible = false;
controlBar.colorPalette._visible = false;
}

controlBar.colorPalette.redClick.onRelease = function(){
controlBar.colorPalette._visible = false;
redChoice._visible = true;
greenChoice._visible = false;
color = red;
}

controlBar.colorPalette.hitArea.onPress = function(){
controlBar.colorPalette._visible = false;
}

controlBar.undoClick.onPress = function() {
trace ("del");
tool = "del";
//Undo();
}

//paint functions w custom cursor

bg.onRollOver = function(){
Mouse.hide();
if(tool=="E"){
this.attachMovie("cursor_help_id", "cursor", this.getNextHighestDepth(), {_x:this._xmouse, _y:this._ymouse});
colorcursor=new Color(this.cursor)
colorcursor.setRGB(color);
}
if(tool=="del"){
this.attachMovie("cursor_del", "cursor", this.getNextHighestDepth(), {_x:this._xmouse, _y:this._ymouse});
colorcursor=new Color(this.cursor)
colorcursor.setRGB(color);
}
else if(tool=="R"){
this.attachMovie("cursor_help_id2", "cursor", this.getNextHighestDepth(), {_x:this._xmouse, _y:this._ymouse});
colorcursor2=new Color(this.cursor)
colorcursor2.setRGB(color);
}
};


bg.onRollOut = bg.onReleaseOutside = function(){
Mouse.show();
this.cursor.removeMovieClip();
};

bg.onPress = function(){
isDown = true;
c = this.createEmptyMovieClip("c", this.getNextHighestDepth());
shapes[shapes.length] = c;
if (tool == "del") {
for (i=0; i<c && isMouseDown; i++) {
if (eval(c+i).hitTest(cursor)) {
eval(c+i).clear();
}
}
}
startx = this._xmouse;
starty = this._ymouse;
}

bg.onRelease = function(){
isDown = false;
var s = tool + "(" + startx + "," + starty + "," + this._xmouse + "," + this._ymouse + "," + (color == red ? 0 : 1) + ")";
trace(s);
shapeText[shapeText.length] = s;
ExportShapes();
}

function Undo()
{
if (shapes.length == 0)
return;
var oldShape = shapes[shapes.length-1];
oldShape.clear();
shapes.length--;
shapeText.length--;
ExportShapes();
}

function ExportShapes()
{
var s = shapeText.join('
');
trace(s);
if (formvar)
getURL ("javascript:SetFormVar('" + formvar + "', '" + s + "');");
}

bg.onMouseMove = function()
{
this.cursor._x = this._xmouse;
this.cursor._y = this._ymouse;
if(isDown)
{
c.clear();
c.beginFill(color, 25);
if (tool == "R")
{
c.moveTo(startx, starty);
c.lineTo(this._xmouse, starty);
c.lineTo(this._xmouse, this._ymouse);
c.lineTo(startx, this._ymouse);
} else if (tool == "C" || tool == "E") {
var h= this._ymouse - starty;
var w = this._xmouse - startx;
if (tool == "C")
{
var m = Math.max(Math.abs(h), Math.abs(w))
w = m * (w < 0 ? -1 : 1);
h = m * (h < 0 ? -1 : 1);
}
c.drawOval(startx+w/2, starty+h/2, w/2, h/2);
}
c.endFill();
}
}


MovieClip.prototype.drawOval = function(x, y, radius, yRadius) {
var theta, xrCtrl, yrCtrl, angle, angleMid, px, py, cx, cy;
theta = Math.PI/4;
xrCtrl = radius/Math.cos(theta/2);
yrCtrl = yRadius/Math.cos(theta/2);
angle = 0;
this.moveTo(x+radius, y);

for (var i = 0; i<8; i++) {
angle += theta;
angleMid = angle-(theta/2);
cx = x+Math.cos(angleMid)*xrCtrl;
cy = y+Math.sin(angleMid)*yrCtrl;
px = x+Math.cos(angle)*radius;
py = y+Math.sin(angle)*yRadius;
this.curveTo(cx, cy, px, py);
}
};

How To Delete A Function After Its Been Called
Hey Everyone,

I am wondering is there a way to delete a function after its been called.

I am making a flash movie which is going to play SWF files and change the movies after a specific period of time. At the same time i want the code to be able to be interrupted (otherwise it will loop), so that someone can go back to any of the movies that have played via buttons i will set up. Im still in the process of figuring out how to exactly do this, but i need to find a way to delete a function.

Here is my simple function that plays the movies and increments


ActionScript Code:
var myInterval
myInterval = setInterval(swf,5000);

var index1:Number = -1;

function swf(){
   index1++;
   if (index1>=movies.length){
      index=0;
   }
   this.createEmptyMovieClip(swfScreen_mc,0);
   loadMovie(movies[index1],swfScreen_mc);
   fscommand ("fullscreen",true);
   fscommand ("allowscale",true);
}

swf();



myInterval();

function Interrupt(){
    onMouseUp = function(){
        _root.swf.stop
        loadMovie("interruptingMovie.swf",swfScreen_mc);
        clearInterval(myInterval);
        }
}

Interrupt();


I need to be able to stop the "swf" function and the Interval, when an individual moves the Mouse. After the Mouse clicks though i need the function to delete so that if an individual tries to click on a button the Mouse up function wont fire again (hopefully that makes sense).

Any Takers???

Thanks in advance,
Chris

Delete OnRollover Function
how do i delete a onRollover function for a mc?

if i have this AS for a mc:

movieClip.onRollOver = function() {

movieClip.glow._visible = 1;

};

and then later on down the timeline don't want the (movieClip.glow._visible = 1;) action anymore, how do i delete it without using:

movieClip.onRollOver = function() {

};

thanks in advance

Delete Function OnEnterframe - Help?
Hi,

I have a function which starts on one frame, but I'd like it to stop on the following frame - how do I do that??

I've tried doing it by setting a variable and using an 'if' statement to stop it once the variable has changed...but it's not working

I'm not very good with if's and else if's - can anyone help?? I have a bar which remains on stage at all times and pages are loaded into level1. On one of my pages, the bar sticks to _ymouse, but I need it to stop doing that when I exit the page. Can anyone help?? Here's what I've got so far...don't laugh - it kinda works...

_level0.barMC.onEnterFrame = function() {

this.onMouseMove = function () {
var yMouse = _root._ymouse;

if(stick = false){
delete this.onEnterFrame;
}
if(Math.abs(yMouse - this._y) < 1) {
this._y = yMouse;
} else {
this._y -= (this._y-yMouse) / 6;
}
if(_level0.barMC._y<59){
_level0.barMC._y = 59;
}
}
};


Many thanks in advance!!!

Disable Or Delete Function
Is there a possibility to disable unloadMovie("") pressing on the other button? Because after I press unloadMovie buttons -it stop loading my other external.swf

Useage Of Delete <function Name>
I'm using delete to remove a function, but I'm wondering how clean it is? Is it likely to cause issues if I have the following:


ActionScript Code:
up_btn.onRollOver = function() {    blog_mc.onEnterFrame = function() {        this._y +=10;    }}up_btn.onRollOut = function() {    delete blog_mc.onEnterFrame;}


It works fine, but the rapid creation and deletion of functions makes me... twitchy

Delete Function OnEnterframe - Help?
Hi,

I have a function which starts on one frame, but I'd like it to stop on the following frame - how do I do that??

I've tried doing it by setting a variable and using an 'if' statement to stop it once the variable has changed...but it's not working

I'm not very good with if's and else if's - can anyone help?? I have a bar which remains on stage at all times and pages are loaded into level1. On one of my pages, the bar sticks to _ymouse, but I need it to stop doing that when I exit the page. Can anyone help?? Here's what I've got so far...don't laugh - it kinda works...

_level0.barMC.onEnterFrame = function() {

this.onMouseMove = function () {
var yMouse = _root._ymouse;

if(stick = false){
delete this.onEnterFrame;
}
if(Math.abs(yMouse - this._y) < 1) {
this._y = yMouse;
} else {
this._y -= (this._y-yMouse) / 6;
}
if(_level0.barMC._y<59){
_level0.barMC._y = 59;
}
}
};


Many thanks in advance!!!

Delete A Function On Roll Out
Hi,

can any1 advice how do I kill a function on rollout.

the code is pasted here.


function ro(){

for(i=0;i<60;i++) {
var t = this.attachMovie("ball","ball"+i,i);
t._x = Math.random()*450;
t._y = Math.random()*400;
t.dx = Math.round(Math.random()*450);
t.dy = Math.round(Math.random()*400);
t._xscale = Math.random()*300+40;
t._yscale = t._xscale;
t.onEnterFrame = mover;
}

function mover() {
this._x += (this.dx-this._x)/3;
this._y += (this.dy-this._y)/3;
if(Math.round(this._x) == this.dx) {
this.dx = Math.round(Math.random()*450);
this.dy = Math.round(Math.random()*400);
}
}


}

but_bg.onRollOver = function(){

ro();


}

but_bg.onPress= function(){

delete t;

}


cheers!
me

A Quick Delete Function Question
I'm wondering about using the delete function in MX 2004. I can write a delete fuction for an on frame function ie:


Code:
_root.myButton.onRelease = function (){
_root.gotoAndPlay("myFrame");
delete _root.myButton.onRelease;
}
but i cant quite figure out how to do it with code on the MC, if I try

delete on(release);

I get and error stating there is an unexpected "on"

what is the syntax?

thanks in advance

Mark

Delete And Reinstate Function From External Swf
I have a situation where when a user clicks a link in an external swf (which is embedded into the main swf using loadMovie) a function within the main swf is disabled/deleted. Then, when another button in this same external swf is clicked, this same function is reinstated. I am unsure of how to do this.

I am able to delete the function using delete _root.onEnterFrame, but don't know how to reinstate it.

This call is inside a function called allActions. Is there a way to suspend this entire function? The main goal here is to have this onEnterFrame call not working in order to increase the performace of my flash project.

Hopefully this description makes sense. Thanks!

Empty Or Delete And Rebuild An Array Within A Function
I'm having troubles creating an array from a function. Can somebody tell me
how to empty an array within a function? thanks : )

What Are The Function For Creating, Move And Delete Objects From Library?
what are the function for creating, move and delete objects from library?

How Do I Delete A Function With Another Function?
hi all.

my actionscript is awful, sorry, but i hope you can help. basically, i have a mc (parentB) that will drag up and down and depending on where parentB's y axis is, there is another mc (parentA) with a similar y axis. but the onEnterFrame continues even after i've released the button. i'm guessing i'm going about this the stupid way, but any help is appreciated.

thanks.
Josh



parentsB.onPress = function() {
startDrag ("parentsB", false, 3, 10, 3, 241);
dragging=true;

this.onEnterFrame = function(y_trace) {
parentsA._y = ((parentsB._y * -2.8)+28);
}
}

parentsB.onRelease = function() {
stopDrag ();
dragging=false;

parentsA._y = 0;
parentsB._y = 148;

// i want to delete the function here. delete function(y_trace);
}

Delete Function "error"
Hello, I'm curious if this is good or bad. I've scripted an animation for opening imagery, and I have this interesting error; at least I think it's an error. I'm trying to delete the onEnterFrame, so the script isn't constantly running.

Here's the code: it can applied to an object called "_mc" -


Code:
function openGet(obj) {
obj._xscale = 0;
obj._yscale = 1;
obj._alpha = 25;
s = 20;
sAlpha = 20;
}
function openSet(obj) {
if (obj._xscale<99) {
obj._xscale += s;
}
if (obj._xscale>99) {
obj._yscale += s;
}
if (obj._yscale>99) {
delete s;
obj._alpha += sAlpha;
}
if (obj._alpha>99) {
delete sAlpha;
}
}
function onLoad() {
this.openGet(this._mc);
}
function onEnterFrame() {
this.openSet(this._mc);
if (this._mc._alpha>99) {
delete onEnterFrame();
}
}
Here's the error:
256 levels of recursion were exceeded in one action list.
This is probably an infinite loop.
Further execution of actions has been disabled in this movie.

Thanks a million!

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

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