Home
Downloads
Mach and LazyCam
Plugins
CAM Post Processors
Screensets
Purchase
Support
Forum
Tutorial Videos
Documentation
Yahoo Group
Mach Wiki
Known Bugs
Resources
Contact Us
Links
CNCZone
German Forum
Italian Forum
Korean Forum
Portugese (Brazil) Forum
Russian Forum (RSK CNCROUTER)
Thai Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
February 12, 2012, 03:24:31 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Select from and to languages
Chinese-simp to English
Chinese-trad to English
English to Chinese-simp
English to Chinese-trad
English to Dutch
English to French
English to German
English to Greek
English to Italian
English to Japanese
English to Korean
English to Portuguese
English to Russian
English to Spanish
Dutch to English
Dutch to French
French to English
French to German
French to Greek
French to Italian
French to Portuguese
French to Dutch
French to Spanish
German to English
German to French
Greek to English
Greek to French
Italian to English
Italian to French
Japanese to English
Korean to English
Portuguese to English
Portuguese to French
Russian to English
Spanish to English
Spanish to French
Machsupport Forum
Mach Discussion
Mach Screens
Works in progress
Flash RU Screen
Pages:
1
2
3
4
5
6
7
»
Go Down
« previous
next »
Author
Topic: Flash RU Screen (Read 5175 times)
0 Members and 1 Guest are viewing this topic.
elpablito
Active Member
Offline
Posts: 120
Flash RU Screen
«
on:
April 25, 2010, 10:14:34 PM »
This is my first release of the screenset I have been working on (download at the bottom).
Still many features are missing but I will be adding them in the future.
Im almost new to CNC, almost new to Mach, new to flash, new to actionscript and new to VBScript. so this has been a challenging job.
Im sure you will find many bugs and issues, I will try to fix them.
Please read the README.txt I have included before installing.
When you install it, please post so I know youre trying it.
Thanks
Pablo
DOWNLOAD:
www.gausstek.com/Ru Screen.rar
Logged
zealous
Active Member
Offline
Posts: 486
Re: Flash RU Screen
«
Reply #1 on:
April 26, 2010, 05:49:29 PM »
Looks great, will test things out and report back.
I am not sure if you are already doing this but I found it helps create screens faster and even more reduces resources.
You can get the current objects on the stage with
Code:
typeof
and
Code:
Object_Name in _root
So you could grab all of the objects and there names and automaticaly create functions for them. You can also store up what was there before they moved to another frame and remove the "watch" function. This is important because since we are watching from the root they are always there and active even when you may not need them. This can cause a LED to fire off a function even if the code isnt on that frame.
This is what I do, and if you have a special function just put an indicator in the objects name.
Code:
///Create buttons and LED's Function
LED_Watch_function = function () {;
//remove any watch functions;
for (var w:Number = 0; w<_root.Stored_watch.length; w++) {;
_root.unwatch(_root.Stored_watch[w]);
};
///declare;
_root.Stored_watch = Array();
i = 0;
///Loop and find all objects named LED*********X EX:(LED_800);
for (var Object_Name in _root) {;
///Is it a movie object to nerrow it down;
if (typeof (this[Object_Name]) == "movieclip") {;
//-------------------------------------------------------------------------;
///does it have LED in the name;
if (Object_Name.indexOf("LED") == 0) {;
//What is the LED number;
LED_OEM_num = Object_Name.substr(3, Number(Object_Name.length-7));
//check current state of the LED;
if (_root["LED"+LED_OEM_num] == 1) {;
_root[Object_Name].gotoAndStop("on");
} else {;
_root[Object_Name].gotoAndStop("off");
};
///This function is create for each object with LED for its name<<<<<<<<<<<<<<<;
_root["LED"+LED_OEM_num+"_function"] = function (varName, oldVal, newVal) {;
//Call function (optinal);
_root[varName+"sub"](newVal);
//check cuurent state of the LED;
if (newVal == 1) {;
_root[varName+"_mov"].gotoAndStop("on");
} else {;
_root[varName+"_mov"].gotoAndStop("off");
};
return newVal;
};
//Watch the LED;
_root.watch("LED"+LED_OEM_num,_root["LED"+LED_OEM_num+"_function"]);
//Store it to remove later<<<<<<<<<<<<<<<<<<<<<<<<<;
_root.Stored_watch[i] = "LED"+LED_OEM_num;
i++;
};
};
};
};
//end function;
«
Last Edit: April 26, 2010, 05:51:42 PM by zealous
»
Logged
Regards, Jason Blake
www.Fusioncnc.com
elpablito
Active Member
Offline
Posts: 120
Re: Flash RU Screen
«
Reply #2 on:
April 26, 2010, 06:54:39 PM »
Hi zealous, thanks for your post.
Im a flash newbie and im not quite sure of the benefits of the code youre sharing.
My led movieclip code is quite simple
Code:
this.LedFunction = function(varName, ov, nv) {
if (nv == 0) {
gotoAndStop("off");
} else {
gotoAndStop("green");
}
newVal (nv);
return nv;
};
_root.watch(this._name,this.LedFunction);
if (_root[this._name] == 0) {
gotoAndStop("off");
} else {
gotoAndStop("green");
}
I declare the newVal function on the onClipEvent(load) of the led in case I need a special behavior.
Can you explain to me in more detail what would be the benefit of doing it the way you suggest?
Thanks
Logged
zealous
Active Member
Offline
Posts: 486
Re: Flash RU Screen
«
Reply #3 on:
April 26, 2010, 09:10:43 PM »
yeah that will work fine.
I had just come up with a way to just name your object and it would create the watch function dynamically depending on the name of the object by using that function.
What you have works well.
If you want to gather anything that Flash is using you can do a debugger check with this.
Code:
for (var Object_Name in _root) {
trace(Object_Name)
}
thanks,
Jason
Logged
Regards, Jason Blake
www.Fusioncnc.com
FXC
Active Member
Offline
Posts: 45
Re: Flash RU Screen
«
Reply #4 on:
April 28, 2010, 06:59:25 PM »
I was about to write a rant in your other thread and then I saw the last post linking to this download page. Why would you flaunt this thing in front of everybody and not let them try it? Just for show-off?
Anyway... per your instructions, I'm trying it and will report back.
Logged
Mach3 is a mess.
elpablito
Active Member
Offline
Posts: 120
Re: Flash RU Screen
«
Reply #5 on:
April 28, 2010, 08:23:41 PM »
Hi FXG,
I was changing the code to allow for external macros. It took me some time cause im very new to flash and each thing I want to achieve I first have to learn how.
Its better a rant for not sharing than a rant for damaging your cnc...
Thanks for trying it
Logged
zealous
Active Member
Offline
Posts: 486
Re: Flash RU Screen
«
Reply #6 on:
April 29, 2010, 01:46:39 AM »
this is a great way to dynamically import stuff, for example Macros:
Code:
vbdata = new LoadVars();
vbdata.onData = function(vbsrc) {
var myvb = vbsrc;
vbformated = myvb;//.split("\n");
sendvbcode.text = vbformated.split("\r").join("");
};
vbdata.load("C:\\Mach3\\Flash\\UserMacros\\usercode1.txt");
Logged
Regards, Jason Blake
www.Fusioncnc.com
elpablito
Active Member
Offline
Posts: 120
Re: Flash RU Screen
«
Reply #7 on:
April 29, 2010, 11:31:23 AM »
Right zealous, thats what I do.
Except that I read all the macros that are listed in the RUCONFIG.INI file and store them. Then I can call them by their name when i need them.
Code:
var inifile:LoadVars = new LoadVars();
var macrofile:LoadVars = new LoadVars();
var varname:String = "";
var gcodelines:Array;
var mindex:Number;
var timreadmacro:Number;
inifile.load("RUCONFIG.INI");
macrofile.onData = function(macrotext:String) {
_root[varname] = macrotext;
ReadNextIniLine();
};
function ReadNextIniLine() {
var readstarted:Boolean;
do {
readstarted = false;
if (mindex<gcodelines.length) {
var linea:String = gcodelines[mindex++].toUpperCase();
if (linea.substr(0, 2) != "//") {
var igualpos:Number = linea.indexOf("=");
if (igualpos>0) {
var thisvar = linea.substr(0, igualpos);
var vcontent:String = linea.substr(igualpos+1);
if (linea.substr(0, 5) == "MACRO") {
readstarted = true;
varname = thisvar;
macrofile.load(_root["PATHMACROS"]+vcontent);
}
else {
_root[thisvar] = vcontent;
}
}
}
} else {
readstarted = true;
}
} while (readstarted == false);
}
inifile.onData = function(gcodetext:String) {
gcodelines = gcodetext.split("\r\n");
mindex = 0;
ReadNextIniLine();
};
function CallMacro(macro:String) {
var mt:String = _root[macro.toUpperCase()];
macrocode.text = mt;
fscommand("VBMacro", mt);
}
Logged
zealous
Active Member
Offline
Posts: 486
Re: Flash RU Screen
«
Reply #8 on:
April 29, 2010, 04:09:50 PM »
Nice!
Things seem to be working well, will run it on my machine and report back.
Logged
Regards, Jason Blake
www.Fusioncnc.com
Fab6657
Active Member
Offline
Posts: 47
Re: Flash RU Screen
«
Reply #9 on:
May 01, 2010, 12:12:58 AM »
Hello,
i try also to test and run your new screen. Realy good, but i have some problems to run it.
- i use Mach3 last lockdown version licensed but in simulation mode on a laptop.
- i have installed Mach3 on d:\mach3.
- i also adapt the path in ruconfig.ini and copy the macros to the right path.
but i have when i load a gcode file no path to d:\, only to c:\ selection is possible,
double click on the change path icon (for drive) doesn't work.
Also when i load a gcode file thru the menu, i see the generation of the file in toolpath,
but not the gcode program list. Running is also impossible.
I attach a screenshot.
Thank's for sharing all this work.
Fabrice
ScreenShot057.jpg
(371.01 KB, 1023x569 - viewed 380 times.)
Logged
Pages:
1
2
3
4
5
6
7
»
Go Up
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Mach Discussion
-----------------------------
=> General Mach Discussion
=> Mach3 under Vista
=> Quantum
=> Mach SDK plugin questions and answers.
===> Finished Plugins for Download
=> VB and the development of wizards
=> Brains Development
=> Video P*r*o*b*i*n*g
=> Mach Screens
===> Screen designer tips and tutorials
===> Works in progress
===> Finished Screens
===> Flash Screens
===> JetCam screen designer
===> Machscreen Screen Designer
===> CVI MachStdMill (MSM)
=> Feature Requests
=> Non English Forums
===> Italian
===> French
===> Spanish
===> Chinese
===> German
===> Russian
===> Romanian
===> Japanese
===> Vietnamese
=> FAQs
-----------------------------
*****VIDEOS*****
-----------------------------
=> *****VIDEOS*****
-----------------------------
General CNC Chat
-----------------------------
=> Share Your GCode
=> Show"N"Tell ( What you have made with your CNC machine.)
=> Building or Buying a Wood routing table.. Beginnners guide..
=> Show"N"Tell ( Your Machines)
-----------------------------
G-Code, CAD, and CAM
-----------------------------
=> G-Code, CAD, and CAM discussions
=> LazyCam (Beta)
-----------------------------
Third party software and hardware support forums.
-----------------------------
=> LazyTurn
=> GearoticMotion Preliminary testing
=> Tempest Trajectory Planner
=> Contec
=> dspMC/IP motion controller
=> Third party software and hardware support forums.
=> Galil
=> Newfangled Solutions Wizards
=> Mach3 and G-Rex
=> Mesa
=> Modbus
=> NC Pod
=> PoKeys
=> SmoothStepper USB
=> Sieg Machines
=> Promote and discuss your product
-----------------------------
Tangent Corner
-----------------------------
=> Tangent Corner
=> Competitions
=> Polls
=> Bargain Basement
-----------------------------
Support
-----------------------------
=> Downloads
===> XML files
===> Post Processors
===> Macros
===> Tutorials
===> Others
===> Beta Brains
===> Screen Sets
===> Documents
===> MACH TOOL BOX
=> One on one phone support.
=> Forum suggestions and report forum problems.
Loading...