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




[flash 8]Adapting 'Auto Trace Mouse' Script To Perfom 'Atuo Trace Object'



Hello everyone..I am new to flash and I am hoping the good people of this forum will help.I have this sript for auto tracing a mouse position (got from this site) but i would like intead of trcing the mouse...to get it to trace a random moving object from another script!mouse script:createEmptyMovieClip("Line",1);Line.lineStyle(1,0x000000,100);onMouseDown = function (){ Line.moveTo(_xmouse, _ymouse); onMouseMove = function () { Line.lineTo(_xmouse, _ymouse);}}onMouseUp=function(){ onMouseMove=null;}Random moving object:loops = 0;_root.target_x = Math.random()*450;_root.target_y = Math.random()*300;_root.xdiv = (_root.target_x-_root.circle._x)/20;_root.ydiv = (_root.target_y-_root.circle._y)/20;loops++;_root.circle._x += _root.xdiv;_root.circle._y += _root.ydiv;loops++;_root.circle._x += _root.xdiv;_root.circle._y += _root.ydiv;if (loops<20) { gotoAndPlay(2);} else { gotoAndPlay(1);}I guess there is a way I can do this or it can be done...? Help will be much appreciated.Thankz



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 03-06-2006, 07:36 AM


View Complete Forum Thread with Replies

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

Auto Trace
need to know i can auto trace an bitmap object. ie the white outline of the object. a car to be more specific. thanx all

maniac

How To Trace An Object?
Hi everyone,

I was wondering how i can trace the value of an object.
The object is actually a server JSON response that looks something like this:


Code:
var obj:Object = {"called":"getTest","response":{"ok":{"tracks":[{"name":"Name 1","id":"1"},{"name":"Name 2","id":"2"}],"artist":"SomeArtist","date":"21-08-2007",}}}
now I can trace (obj.response.ok.artist); //Outputs: SomeArtists
etc....

but how can i trace the whole reponse/obj?
so i can get
{"called":"getTest","response":{"ok":{"....etcc

trace(obj.toString()); //Outputs [object object]

thanks

Update:

SOLUTION:
Sorry my mistake, It was because i was tracing after the JSON is been decoded.
I just traced it before decoding and it output JSON as received from the server.

How To Trace An Object?
Hi everyone,

I was wondering how i can trace the value of an object.
The object is actually a server JSON response that looks something like this:


Code:
var obj:Object = {"called":"getTest","response":{"ok":{"tracks":[{"name":"Name 1","id":"1"},{"name":"Name 2","id":"2"}],"artist":"SomeArtist","date":"21-08-2007",}}}
now I can trace (obj.response.ok.artist); //Outputs: SomeArtists
etc....

but how can i trace the whole reponse/obj?
so i can get
{"called":"getTest","response""ok""....etcc

mind you
trace(obj.toString()); //outputs [object object]

thanks

SOLUTION:
Sorry my mistake, It was because i was tracing after the JSON is been decoded.
I just traced it before decoding and it output JSON as received from the server.

Mouse Trace
Mouse ActionHey I am new to writing actionscript. how do I create a mouse action. I have a logo that I want to respond to my mouse movement. For example, I have an image that moves right / left when I move my cursor right / left.

Trace All Properties Of An Object
Does anyone know how to trace all properties of an Object regardless of data type?

How To Trace Which Level Is This Object?
i am a AS newbie, learning AS myself, now i got a problem, can someone please help me on this?

I would like to know how to trace which level for that particular object/movieclips

example
when i rollOver a movieclip, it will tell me which level it was with the "trace" feature, something like, "this._level0.mc",??

How To Trace Sound Object
I need to know I I can trace the sound object for example;

ActionScript Code:
var mySound:Sound = new Sound();
mySound.loadsound("song1.mp3", true)
trace (mysound)

Right now this traces object
I need it to trace "song1.mp3"

Trace Object Properties
Is there an easy way to trace all the properties of an object without tracing them all out "long hand"..

i.e.
trace(obj.name);
trace(obj.x);
trace(obj.y);
etc...

vs.

trace(object properties); //don't be silly.

Something like this would save quite a bit of time.

Trace(mouse==flash_movie);?
Flash MX.

how to trace mouse is in flash movie.

i have html file where some some text[html] and one flash movie.

how i trace that my mouse is now at my flash movie or html text area?

Trace No Of Mouse Clicks
hello! All

I want to trace the number of times the user has clicked a mouse button.
Suppose a user clicks mouse button 5 times then 5 must be traced.
if he clicks 1 times then 1 should be traced.

Is this possible?
if yes then plz give me code of that
plz reply as soon as possible.

Trace Bitmap Of Mouse?
Is there a way to trace the bitmap of a user's mouse pointer?

Cause I need to use the user's exact pointer for a animation for my site.

I've been thinking, maybe take two bitmaps, one of the flash document with the mouse and one with it hidden, then find the difference?

Moving Object Leaving Trace
Quite simple question - how can I made moving object to leave trace behind it.

For example: if a square is moving from one location to another (using motion tween) it just moves there and thats all. I need it to draw a line at about its size, that continues from the start location to finish.

Flash 8 by the way.

Thanks in advance

Odd Trace On Object Stage Position
Hi,

I noticed odd trace that wonder whether someone can explain.

I've got the following code in an ENTER_FRAME event. It's used to move an object.


Code:
_vx +=0.2;
_vy +=0.2;

x+=_vx;
y+=_vy;

trace("_vx: " + _vx);
trace("x: " + x);
trace("----------");
The trace for the first 5 frames looks like this:


Code:
_vx: 0
x: 275
----------
_vx: 0.2
x: 275.2
----------
_vx: 0.4
x: 275.55
----------
_vx: 0.6000000000000001
x: 276.15
----------
_vx: 0.8
x: 276.95
Obviously, 275.2 + 0.4 doesn't equal 275.55.

Does anyone know the reason for this?

Thanks!
Dandylion13

Mouse.addListener - Trace When I Click Anywhere
Hi,

This is pretty easy I'm sure, it's just that I've never used listeners before =/

How do I make it so that whenever I click (on anything, anywhere) flash traces something.

Thanks

Mouse Cursor -> Track/trace
Is there any way to track (and/or trace) the current mouse cursor... e.g. Is it the pointing arrow cursor, or is it now (when over a button for example) a hand or pointing finger cursor?

Making A Light Trace An Object Or Text?
As on this page here at the top there is a light that traces the text. Anyone care to explain how this is done?
Thanks all.

[F8]Making User Repeat/trace A Contour/drawing With Mouse
Hello, every1!
I received a task which I have no idea how to approach.. I hope someone here can help me.
The specifications where as follows: there should be a black square in which there is a faint picture of a sign. The user must be able to draw in the square and when he repeats the contours of the sign correctly - a popup appears.
I made myself familiar with the ways you can allow a user to draw. However I have no idea how would you know if the two shapes/signs match and whether the user at least approximately drew the correct contour/sign.
Can anyone help? Or at least point in a direction of functions I can use?
Thanks in advance!

Flash MX Can't Trace
Trace() function in my Flash MX 2004 was working this afternoon but after a while, it stopped to function anymore. I left my Ouput window opened all the time and nothing happened when I Trace. I find it very weird and look through the forum at macromedia and discovered that it might because of the 'Omit Trace' option checked and went there to take a a look. But to my surprise, it wasn't checked!
I was a little bit annoyed and decided to try just the Trace() function by opening a new file and then typed...trace("PLEASE TRACE");....in the first frame on the main stage's action panel.
I previewed it with the Output window opened, but it doesn't trace anything. I then reinstalled my whole flash and this problem continues. I thought I had problems with my coding and went to download a file from a tutorial site that has this trace() function being used but it doesn't work too.
This happens to all my FLAs...
Anybody has any idea what's going on?
Thanks

Using Trace Out Of Flash
is it possible to trace into the output window when you're viewing the file in a webpage after you have published it?

Using Trace Out Of Flash
is it possible to trace into the output window when you're viewing the file in a webpage after you have published it?

FLash TRace Effect?
flashkit users where a lot of help last time... thanks for the info.. here is another question...

what's a simple way to make an image trace to original effect? I know how to do it with masking but there has to be a more simple way.

http://www.zeroinfect.com/flash/
There is and example.

The chevy sign in the beginning is made with a trace. Also the chevy truck is traced then image is formed. I would appreciate any help I have been stuck on this for 3 days now.....

Flash Says MC _y Position Is 50, But When I Trace _y It Says Otherwise
How come when the flash properties panel tells me the _y postion of the mc it is the top of the mc that its reffering to. But when I trace _y its reffering to the center of the MC? So im getting two different values.

Trace() Crashes Flash CS3
Hi!

I have a nested for-next loop running in Flash AS3. The loop is functioning correctly.

But, when I add any trace() inside the loop to track variables, it crashes Flash CS3 (shuts down).

Has anyone else experienced this?

I am on Macintosh OSX. Flash seems to be crash-happy. I am still in my 30-day trial period, and not even sure I'll buy it. Seems to be quite buggy.

TIA

Flash MX - Replace Trace Function
Hi all,

I wish to replace the existing trace() function within FlashMX with a customised function that outputs these into a text box.

I want to retain the original trace functions in the code so I can turn it on and off.

I've tried movieclip.prototype.oldTrace=movieclip.prototype.t race etc to no avail.

Thanks.

Flash MX - Redefine Trace Function
Hi all,

I wish to replace the existing trace() function within FlashMX with a customised function that outputs these into a text box.

I want to retain the original trace functions in the code so I can turn it on and off.

I've tried movieclip.prototype.oldTrace=movieclip.prototype.t race etc to no avail.

Thanks.

Trace If Delete Key Pressed Flash 5
This is what I tried with no response.
onClipEvent (keyDown) {
pressed = Key.getCode();
if (pressed == 46) {
trace("deleted");
}
}
Any ideas?

Flash Player 10 Trace Statements
I use the FlashTracer plugin in Firefox to show trace statements as I debug code. Once I upgraded to flash player 10 the trace statements stopped working, in fact, nothing is being written to the flashlog.txt file.

I downloaded the debug version too. Anyone have an idea of how to get these working again? thanks

Png > Illustrator > Live Trace > Flash
I'm rather new to Illustrator CS2 but I had a plan to take png images (with transparent backgrounds) into it from Photoshop and then using Live Trace convert them to vectors. I would then export them into Flash as swf files. (AI and AEP are huge. Or maybe I am missing something) It all worked great until I noticed that the swf files had a white background(like when you save a transparent psd as a jpeg and not a png.)

My question is, is there a way to make and preserve transparent backgrounds from placed png images in Illustrator and Live Trace so that when I move them into Flash I have a "vector png" to work with? Thanks

Flash Media Server 2 - Trace
I have ...

* Flash MX Professional 2004 7.2
* Flash Media Server 2
* Flash Remoting Components

The problem I am having is I cannot get trace messages on server side scripts to display anywhere. I have looked at View Applications > {APP} > Live Log, but nothing is there. I have #include "NetDebug.as" in my code, but while giving no errors, it appears not to do anything. I really have no idea what is going on, as I have previously managed to get trace messages displayed successfully.

Please help and my thanks!

Trace Command In FLash And General Using A Var
Ok I have this probleme which I can not understand fully!
I have a FLash movie! and I create some var!

For example!

for(x=0;x<10;x++) {
    duplicateMovieCLip(_root.button,"button"+x,x);
}
all is smooth!
Inside the button Movie Clip I have a field named "name".
I try to change the the text!
I used again to make it a loop like this

for(x=0;x<10;x++) {
    "_root.button"+x+".name" = "Active";
}

So all the button will have the label active inside!
This is not possible!
an error comes up like this

"Left side of assignment operator must be variable or property.
"_root.button"+x+".name" = "Active";
"

So this is not possible!

And in the other hand!
I have this array!

_root.users
from 0 to 10
and when I trace one of the I use this method again!
for(x=0;x<10;x++) {
    trace(_root.users.+x);

}

The answer to this is NaN
??? I do not understand what this is!
And whan i use "_root.users."+x
this comes up _root.users.0 to 9 !!
But I want the var not the name!!
what can I do?





"trace" Mc Label On Mouse Over
hi,
can someone please tell me, how can i get the label of mc that mouse is current over it...
so... i have N mc-s on the stage... and i want to be able to know over witch mc is mouse....

why do i need this?
i have 100+ mc-s on stage and i want to apply a function to all mc-s on stage...
i don't want to copy/paste the onRollover/onRollout to each mc, but have an

ActionScript Code:
onEnterFrame=function(){
//my code here
}
and trace on witch mc is current themouse over and aply some actions...

I Can Scroll Text & Trace The Mouse Wheel But Not Move The Text With The Mouse Wheel
Can u help me scroll some loaded text with the mouse wheel?

This code is great but I just cant get the mouse wheel to scroll. I have set up the mouse wheel trace but need help from here on please


Code:
scrollmcMaxY = tmask._height-scrollmc._height;
scrollmc.onRollOver = function() {
this.gotoAndPlay("over");
if (this._y>=22 && this._y<=scrollmcMaxY-22) {
this.arrowup._visible = true;
this.arrowdown._visible = true;
} else if (this._y<22) {
this.arrowup._visible = false;
this.arrowdown._visible = true;
} else {
this.arrowup._visible = true;
this.arrowdown._visible = false;
}
// end else if
};
scrollmc.onRollOut = function() {
this.gotoAndPlay("out");
};
scrollmc.onPress = function() {
this.gotoAndPlay("press");
endy = _ymouse-this._y;
this.onMouseMove = function() {
if (_ymouse>=endy && _ymouse<=scrollmcMaxY+endy) {
this._y = _ymouse-endy;
} else if (_ymouse<endy) {
this._y = 0;
} else {
this._y = scrollmcMaxY;
}
// end else if
ratio = (chpTexteHauteur-tmask._height)/scrollmcMaxY;
this.onEnterFrame = function() {
var _loc2 = -this._y*ratio;
chpTexte._y = chpTexte._y+int(_loc2-chpTexte._y)*2.000000E-001;
};
};
};
scrollmc.onRelease = function() {
delete this.onMouseMove;
delete this.onEnterFrame;
};
scrollmc.onReleaseOutside = function() {
this.gotoAndPlay("out");
delete this.onMouseMove;
delete this.onEnterFrame;
};




var mouseListener:Object = new Object();
mouseListener.onMouseWheel = function(wheelNum:Number)
{
if (wheelNum> 0)
{
trace("towards computer");
}
else if (wheelNum< 0)
{
trace("away from computer");
}
}
Mouse.addListener(mouseListener);

Flash MX, Apple, Trace Bitmap, CRASH
Every time I try to trace bitmap my Apple crashes half way through. My settings are

color threshold: 2
Minimum Area: 2
Curve fit: Pixels
Corner Threshold: Many corners

I have changed the settings, changed the jpg, changed the project and it still crashes. Is it a preference thing?

667 Titanium Apple Laptop, 1 GB RAM, OSX Jaguar 10.2.6, Flash MX

I have traced bitmaps before, even with these fine settings, without problems.

Any ideas? Thanks, Morgan

Is 0.48 Restricted In Flash, When We Trace It From Input Text Box?
Hi...
I have a query....

I used a input text box with instance name "a". And i have to compare the value given by the user and proceed to next step.

But when i give "0.48" and compare it, i'm not able to proceed. my answer should be "0.48" only.
but when i declare a variable called "b" and give it the value "0.48" and comparing it, I get positive result.

I want to know why is it not taking from the input text box?

It would be great if any one could help me in this.

Thank you,
Sri...

[Flash 8]XML Variable Will Trace, But Will Not Work In Script?
Hey all,

I made a button that when you click, it starts to play a sound. The sound is loaded through an XML file. The XML file only has one node which is the path of the sound I want played.

So I loaded the XML file and made a variable for my sound node and traced it to make sure it worked, and it did. Then later on when I use that variable to make the sound load, it says that there is an error opening url and that the path ends with 'undefined'. Here's the whole script:
--------------------------------------
load sound:

stop();
var myXML:XML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function(success){
if(success) {
for (var x=0;x<this.firstChild.childNodes.length;x++) {
var soundNode:XMLNode = this.firstChild.childNodes[x];
trace(soundNode);
}
}else{
//error statement here
}
}
myXML.load("C:/Documents and Settings/TomNez/Desktop/sound/audio.xml");

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

And then play sound:

var mySound:Sound = new Sound();

mySound.loadSound(soundNode[x], true);
mySound.onSoundComplete = function() {
this.start();
};

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

The trace statement gives me the right information when I test it. And, if I replace "soundNode[x]" with the actual sound name, it works properly. Does anyone know why it won't let me use the soundNode variable in my loadSound? Any help would be greatly appreciated.

-Tom

Do Trace Statements Execute Inside Of The Flash Player?
Or do they only execute inside of the Flash IDE test environment?

My guess is they do execute at runtime inside of the Flash player, as there's an option to publish with them omitted, but I'm not certain.

Just curious, and wondering in terms of performance.

Happy monday!

How Do I Trace The Properties Of An Object's Properties?
I forgot to put it in the title so I'll just place it here; I am using AS 2.0. I know that there are other ways to accomplish the goal that am after, but I was wondering if anyone knows of a way to access the properties of an object's properties?

Here is the code that I thought of, even though it doesn't work

var a:Object = new Object();
a.bproperty = 0; //lowerlevel properties
a.cproperty = 1; // lowerlevel properties
var d:Object = new Object();
d.e = a; // upper level properties

for(var i in d){
for(var j in d.i){
trace(i + " = higher level lower level= " +j);
}
}

I know that you can enter the following code to view the 'lower level' properties of d.e:

for(var i in d.e)

This really just boils down to how I am organizing the code(I have ideas on what do next, and i am 99% sure that I can get them to work), and if there is a way to dynamically access the properties of the objects properties, It will save me from creating yet another large block of code for my project. If you want to see the unfinished project, go to http://www.garrettchristopherson.com

Trace
Do anyone know why "trace" action cannot be used in the standalone version like *.swf or *.exe or *.html?

thx for any help...

Cant Trace?
Hello, im trying to edit our company website and the guy who made it was fired and i have to make some changes to it. I need to use the trace command but cant for some reason, it wont trace anything!!!! Any idea why?? Any way i can re-enable it? Thanks a ton if you know.

-Ely

What Exactly Is Trace?
what exactly is the trace function and what does it do? The actionscript dictionary isn't much help.

Trace Cmd?
Got this from one of you guys. I'm tracing a in MC instance to see if anything's loading into it. Last night it worked great, today it's looping (just keeps repeating the output). Where or how did I make it do this?



Code:
onClipEvent (enterFrame) {
total = this.getBytesTotal();
loaded = this.getBytesLoaded();
trace("TOTAL: "+total+" bytes");
trace("LOADED: "+loaded+" bytes");
}


What would make it never end output?

Can I Trace *all*
Is there any way of having a trigger call the list variables command?
I need a full readout of everything at a very specific point, and the only way I can think is some sort of trace function. Any ideas?

much appreciated

The Trace
I heard about ppl doing trace bitmaps. How do you do this? I was told to do so to optimise my flash but I have no idea what it does or how to do it.

Trace URL
Hello, how can I make a trace give me the URL I try to ger with getURL? I´ve got this
on (press) {
getURL("javascript:void(window.open('foto_cocheras 1.htm','fotokox1','toolbar=no,location=no,status=n o,menubar=no, scrollbars=yes,resizable=yes,width=800,height=600, top=75,left=75 '))", "_self");

}


in the button and I want the trace to tell me if it´s actually doing it. Thank you.

Trace
is there a way to have a movieclip move around and leave a trail behind it. like drawing with a pencil.

thanks for your time,
j-son

Trace ?
hello yesterday i received an error from flash when i was "tracing"some actionscript .something about "256" and this is looping .i had the error saved in a txt file but someone deleted it so i cannot remeber what it was .so now today i wanted to trace some actionscript and now it wont do anything
now it doesnt trace anymore .anyone else had this happen to them ,?
thanks for any suggestions

Trace?
I keep seeing trace() ....what does it do?

URL Trace
I am building navigation (FLASH MX) for a Java CMS tool that is not finished yet. The page URL's will be supplied by the CMS tool. Is there a way to write an external file (XML or PHP) where you can trace the URL from the external file when you click the appropriate button (Flash Nav)? When the navigation is published, I just want to change the URL in the external file not in Flash.

Hope this makes sense. Thanks for your help

Trace
I'm having problems with the trace action in MX 2004 as in it doesn't seem to work at all. Are there some settings to switch it on and off apart from the omit the trace actions checkbox in the publish settings. I'm trying to load a text doc with multiple variables in and then split it down into an array to load data into a form & it's proving to be near on impossible without the trace action.

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