Executing Javascript
Ever since all the security settings came up with Flash I'm having problems with executing javascipts from my flash movie.
I used to work around this by loading a lower flashversion swf into a new layer and execute function from there but now even that seems to fail.
In my HTML I have the following code:
function openWindow(width,height,bestand,naam)
{
var base = "";
x = (800 - width)/2, y = (600 - height)/2;
if (screen) {y = (screen.availHeight - height)/2; x = (screen.availWidth - width)/2;}
newwindow=window.open('',naam,'width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x+',scrollbars=auto,resizable=yes,menubar=yes');
newwindow.location.href = base + bestand;
if (window.focus) {newwindow.focus()}
}
This will nicely open a new window in the center of your screen no matter what resolution you're using.
Now in my Flash I have this action to execute it.
on(release){
getURL("javascript:openWindow(800,600,'
Adobe > ActionScript 1 and 2
Posted on: 06/14/2007 01:30:31 AM
View Complete Forum Thread with Replies
Sponsored Links:
Executing Cd From
I was asked to put a cd on my webserver so our company could play this job training cd, and run it off our server, not their machine. I linked my flash button to the exe file. Everything is ok, but it's asks if I want to download or run file off current location. We don't want users to be able to make this selection. We just want them to run the program. What if I make an auto run, will it still do the same thing? If anyone has experience with this, or knows how to do it I would greatly appreciate your help.
-Thanks
View Replies !
View Related
Executing An Exe File
I am developing a CD buisness card and I have several files that must be able to be installed from the CD if chosen. I know how to execute a exe if the drive is static, however the drive will not always be the same. Is there a way to write a script that will read what drive the CD ROM is and use that as a variable in the code?
The code is:
on (release) {
fscommand ("exec", "e:\install.exe");
}
Thanks for any help.
View Replies !
View Related
Executing File...
I am creating a presentation in flash, and I would like it to open a power point presentation (I guess in a new window) I am creating a projector file, so how would I go about doing this?
View Replies !
View Related
Executing A PHP Script
Hi All
Wondered if anyone can help me. I have a simple php script writing to an SQL database. I have created a flash movie with dynamic text boxes using the same variable names as I am using in my php script.
I have a submit button with the script;
on (release) {
loadVariablesNum("http://www.greensplash.com/php_cms/data_in.php3", 0, "POST");
}
But it is not writing to the database. Is this the correct method for doing this.
Cheers
View Replies !
View Related
Executing File
i am trying to make an autorun program with a button that says "install" in it
i have this code in the actions of the button:
on (release) {
fscommand(exec, "SETUP.EXE");
}
when i do this it doesnt seem to work
is it because setup files are different to normal exe file?
i dont know
please help
Dave
View Replies !
View Related
Executing A .exe File
Hello flashkit people...
I want to know if it is possible to execute an external .exe file from a flash button. Just like you do it when you're going to execute a .pdf or a .doc file.
If it is possible, can you help me with the script? My flash version is 8.
View Replies !
View Related
Executing Php Script
how can i execute the followin code in Flash.
PHP Code:
<?
$hst = $_SERVER["HTTP_HOST"];
$uri = $_SERVER["REQUEST_URI"];
$rmt = $_SERVER["REMOTE_ADDR"];
$br = $_SERVER["HTTP_USER_AGENT"];
echo "#### : $rmt
<BR>
####: $uri
<BR>
#### $br<BR>";
?>
View Replies !
View Related
Executing A String?
I have a parsed string representing an arbitrary line of AS, and I'd like to execute that command within a swf dynamically.
I've browsed about and found an AS Engine, but I was hoping there'd be a native method or hack in Flash 7 (or 8).
Example:
ActionScript Code:
//arbitrary cmd
var tmp_s:String="tmp_mc._visible=true" //with or without ';'
//doesn't work
this[tmp_s]();
//also doesn't work:
var tmp_f:Function=new Function(tmp_s);
this[tmp_f]();
//likewise, not:
tmp_f();
tmp_f.call();
tmp_f.apply();
Implicit casting as a Function or Object are equally ineffective - any suggestions? Would adding a property to Object to execute be a potential workaround?
Thoughts?
Thank you.
View Replies !
View Related
Keeps Executing The Script
var sTitle:String = new String("ActionScript Bible");
trace(sTitle.length);
if(sTitle.length > 12) {
trace("The title has more than twelve characters.");
Hi yall. Im new to actionscript and was wondering if you know why went i test out this script is keeps repeating trace message? Thanks
View Replies !
View Related
Tween Is Not Executing
help please! my "workbox" tween is not triggering off on the motion finish of my "work" variable. if you look at my script (i'm no pro) could someone let me know how i could get this working or possibly an alternative?
Code:
function grafselect() {
//graf
graf.tween("_x", Stage.width /2-350, 5, MyType);
graf.tween("_y", Stage.height /2-300, 3, MyType);
graf.tween("_rotation", 360, 3, MyType);
work.tween("_y", OffScreen, 1, "easeInBack", 0, this.onMotionFinished);
work.tween("_rotation", -45, 2, "easeOutQuad");
}
this.onMotionFinished = function() {
workbox.tween("_y", Stage.height / 2, stageResizeTweenSpeed, stageResizeTween)
trace("work out");
tellTarget (bg) {
play();
}
};
View Replies !
View Related
How Can I Delay This Ac From Executing?
I just want a way to make this animation happen after 5 seconds.
onClipEvent (load) {
this._xscale = 300;
this._yscale = 300;
}
onClipEvent (enterFrame) {
if (this._xscale>100) {
this._xscale -= 20;
if (this._yscale>100) {
this._yscale -= 20;
}
}
}
onClipEvent (load) {
this._alpha = 0;
end_alpha = 80;
}
onClipEvent (enterFrame) {
current_alpha = this._alpha;
diff__alpha = end_alpha-current_alpha;
movex = diff__alpha/4;
this._alpha = this._alpha+movex; }
View Replies !
View Related
Executing Javascript
Hello, I searched on the forums, and I tried the LiveDocs, but I don't really understand the information given.
I'd like to execute this snippet of javascript code in my flash. Then, somehow, I'd like to get the resulting ipStr as a variable in flash. From there I can work out the rest, but for now I'm clueless.
PHP Code:
var ip = new java.net.InetAddress.getLocalHost();
var ipStr = new java.lang.String(ip);
View Replies !
View Related
This Code Should NOT Be Executing
Am I doing something wrong, or is this a Flash bug?
In the attached fla file, there's code on frame 10 of the main timeline telling flash to gotoAndPlay frame 20. On frame 15 (which is skipped over), there's a MovieClip. The MovieClip's timeline only has one frame. On that frame there is a trace statement.
That setup works fine, with the code in the MovieClip never getting executed. However, if I add a SimpleButton to the main timeline, the code in the movieclip does get executed when flash reaches frame 20 of the main timeline.
I can't imagine that this is my fault. It looks like a bug to me.
Thoughts?
View Replies !
View Related
Executing VBS Within Flash
Hello there,
To start of with I am using the following:
Flash Professional 8 w/
ActionScript 2.0
Using the fscommand, I am trying to fire off or execute VBS within flash. I want to use a button to do this. The following is my AS code for said button:
on (release) {
fscommand ("exec”, "Copy dataset1 to desktop.vbs");
}
I have placed all of my files within the following "fscommand" folder:
1. The Copy to dataset1 to desktop.vbs file
2. The dataset 1.txt
3. My .fla file
4. My .exe file
I believe the "Copy to dataset1 to desktop.vbs" app. that my co-worker wrote is correct, because when I click on it (from out side of Flash it does what it’s supposed to do.
And it’s still not working. Any help will be greatly appreciated!
Edited: 01/14/2009 at 08:00:37 AM by sirwill0518
View Replies !
View Related
Executing VBS Within Flash
Hello there,
To start of with I am using the following:
Flash Professional 8 w/
ActionScript 2.0
Using the fscommand, I am trying to fire off or execute VBS within flash. I want to use a button to do this. The following is my AS code for said button:
on (release) {
fscommand ("exec”, "Copy dataset1 to desktop.vbs");
}
I have placed all of my files within the following "fscommand" folder:
1. The Copy to dataset1 to desktop.vbs file
2. The dataset 1.txt
3. My .fla file
4. My .exe file
I believe the "Copy to dataset1 to desktop.vbs" app. that my co-worker wrote is correct, because when I click on it (from out side of Flash it does what it’s supposed to do.
And it’s still not working. Any help will be greatly appreciated!
View Replies !
View Related
ActionScripts Not Executing
Having an issue similar to KB401230, but with newer player. Scripts are ignored on my flash movies. And, when I try to debug, it says it can't because there are no Actionscripts. I tried moving scripts to the second frame as the KB suggested, but that did NOT work. I have simple scripts: stop the timeline@each frame and provide interaction with elements on-stage. Is there any file or network permissions issues not allowing the scripts to run? We sometimes have strange permissions on our PCs and network. Are there any files that are used WHEN COMPILING the movie (Ctrl+Enter) that might get flagged as not allowed for execution if network/file permissions were strict? Please help. I'm very frustrated, and this is making my work difficult. As far as changes go, I simply added some stage objects and some interaction scripting. But now ALL my movies (even old ones that I've tested) have the same problem when compiled/tested into the SWF.
View Replies !
View Related
Executing .exe Files
i used flash to create this file. it's in .exe.
i had a button that should open a .exe file.
so how do i do this?
i tried getURL ("filename.exe")
but it acts like it was downloading it. i need a script that opens a .exe file. tnx!!!
View Replies !
View Related
Executing Files
Ok, I'm having a problem with starting executables with Flash. I want this on a USB stick so I can execute programs, games and all kinds of stuff I'm gonna store on it. I've run into problems though. I don't know how to
I've tried FSCOMMAND, but no, it doesn't work. No "but n00b uu cnat strat from sevrer!" or "swf cnat strat exe flies y00 n00b" because I know that.
Code:
fscommand("exec","../test.exe");
Tried this, on my machine, as a projector .exe file, in the same folder as the test.exe which is not a different projector file btw. This, did not work.
Code:
fscommand("EXEC","c:windows
otepad.exe");
This doesn't work either
If you're gonna ask "but waht hapens den?" then I'll asnwer that right now - nothing happens! I click my button but nothing happens at all. Not even a message telling me how stupid I am trying this.
And yes, I did search! No help there, that's why I posted this topic.
View Replies !
View Related
Executing .exe Files
i used flash to create this file. it's in .exe.
i had a button that should open a .exe file.
so how do i do this?
i tried getURL ("filename.exe")
but it acts like it was downloading it. i need a script that opens a .exe file. tnx!!!
View Replies !
View Related
Flash Not Executing JS
Hello everyone,
I'm puzzled about this:
I have a website on a CD rom (html+flash+quicktime VR). I'm using getURL(javascript:nameofJSFunction()) to call a js function in the html (for navigation purposes). It seems like it does not work on some machines (or so I've been told).
Any suggestions aside from checking if the browser is javascript enabled?
Should I use FS command instead?
I've been told that some PCs with XP and explorer 6 do not execute the JS function.
It might be how I wrote the Javascript (flash, navigation and content are in different frames):
function loadPage(nav,videoPage)
{
parent.mainFrame.document.location=videoPage;
parent.nav.document.location=nav;
}
function changePlanet2(top,video,nav){
parent.menu.document.location = top;
parent.mainFrame.document.location=video;
parent.nav.document.location=nav;
}
function changePlanet(video,nav){
parent.mainFrame.document.location=video;
parent.nav.document.location=nav;
}
Thanks.
View Replies !
View Related
[MX] Executing A String As AS
Last edited by radakast : 2004-07-14 at 10:07.
I'm going to ask this in a broad fashion. I don't need it for anything right now. I'm just curious how i would execute actionscript that I write as a string. Kind of like this:
ActionScript Code:
var asString = "someFunction()" ;
//pseudocode
Execute asString as actionscript
Any ideas?
Thanks guys,
Rada
View Replies !
View Related
Order Of Executing Commands
Hi, bellow there is a script which does 3 things onRollOver:
1. it unloads an external MC from an instance of an empty MC - so the empty MC stays empty. (the empty MC is referred by using instance called subMenu1).
2. By receiving the X and Y Position of the button and using the function menuLocation the empty MC (=subMenu1) is placed on the stage in a new place.
3. Loads new external movie into the empty MC = into subMenu1.
Here is the script:
on (rollOver) {
unloadMovie (_root.subMenu1);
/:currentX = this._x;
/:currentY = this._y;
_root.menuLocation(_root.subMenu1, /:currentX, /:currentY);
loadMovie ("Level2.swt?fatherID="+"{ItemID}"+"&NumOfChild="+ "{NumOfChild}"+"&wwid="+/:wwid, "_root.subMenu1");
}
the way it is written now, onRollOver it doesn't do the commands in the same order as written above.
onRollOver it first moves the subMenu1 to it's new location (by using the function menuLocation) only then it loads the new external movie. The unload movie is not seen at all, and the order of the execution is not as above.
Does action script execute commands by the order they are written?
H E L P !
Tanks in advanced,
Maya
View Replies !
View Related
Executing Media Files
Sup Flashers,
i just wanted to know how i could make a menu for selecting mpeg or avi files. i wanted to have a flash menu autorun from cd and have buttons that would tell to load a certain media file. Whats the scripting for that?
thanks
View Replies !
View Related
Executing A .htm File From A CD Question
Thanks for the reply on my previous post about executing .exe files using the fscommand line. It works great. The second part of my question is not working so great. I am trying to execute an .htm file that is on a CD. I would like to not have to designate a drive name due to people having different CD-ROM drive names. I am doing this so the application could be shown without an internet connection. The fscommand does not work and get URL works only if you designate a drive name. Example: If I enter N:/helpfile.htm it works fine, but I want to enter helpfile.htm and read it directly from the CD-ROM regardless of the letter designated to that users CD-ROM drive. Is This possible?
thanks in Advance
Brian
View Replies !
View Related
Executing An Application Through Flash
Hi
Does anyone know how to execute an external application through actionscript? Basically I would like to make an active desktop item that loads the selected app when a button is pressed.
I have tried using fscommand(exec, "path to app") but have had no luck so far.
View Replies !
View Related
Executing An External File
hi..
i am making a presentation for the dolphin research institute and without going into any detail, basically what i really need to find, is how to execute a powerpoints show (.pps file) from inside a flash movie. im sure this is possible?!?
i found this command in an old post :
fscommand (exec, "filename.pps")
but i tried this and had no luck, can anyone help me please?? the presentation needs to be shown this sunday and the flash and powerpoint components are made i just need to fit them together.. your help would be greatly appreciated(its for a worthy cause too) :)
thankyou so much for your time..
damien
View Replies !
View Related
Executing Actionscript Remotely.
Hey. How do you have a text box that will take actionscript from a user, put it into a function, then execute it on the next frame?
If that doesn't make sense, here's my aim...
I want to put an swf on the web. When I go to it there is a text box on frame one, I type in actionscript and press ok. On the next frame the actionscript is executed on a ball.
So in frame one, I type:
ball.onEnterFrame {
_x+=2;
}
I press "ok"...
and on frame two, the ball moves slowly to the right. Can anyone help me here?
Obviously, I'm gonna want to do more than move it to the right, that was only an example. I will do more complex stuff like gravity and elasticity.
Thanks in advance!
-- l8erdude
View Replies !
View Related
Executing A Application From Within Flash
I need to create interactive cds with flash autoloaders... how do I execute files such as .exe, .zip, .rar from within a flash movie? I used .bat files before but its so dirty and alot of times the stupid DOS windows do not close themselves and the scripts dont work properly. PLEASE!!! someone help me... send me a link or anything... or at least a name of a program that is good for this type of thing.
(I know I know... use director)
;-)
Please HELP! YOU WONDERFUL PEOPLEZ YOU!!!
DAniel KEvorkian
dh_Kevorkian@yahoo.com
View Replies !
View Related
Executing Animations In Actionscript
Hi, what i'm trying to do is execute several different animations (movie clips embedded in movie clips) in sequence, calling them from within a lump of actionscript. They will all fire, but it looks like they're all starting at the same time. Is there any way that i can force the animations (movie clips) to play before the lump of actionscript is finished? Any help would be greatly appreciated, this is part of a school project and i'm feeling like maybe my software team has bitten off a little more than we can chew. Thanks in advance,
Seth
View Replies !
View Related
FlashMX Executing A Director App?
I have created a flash mx movie and I want it to be able to open a Macromedia Director projector file. How can I program one of my buttons to do this? (i.e. "click this button to see Director.exe movie pop up in a separate window"). Thank you in advance, Flash users, for help.
Christy
View Replies !
View Related
Executing An Exe From Flash Projector ?
Hi.
anybody out there know how to execute an .exe file from a projector ?
created a presentation in MX, and i really need to get this file to run.
cant think of what actions to applie to the button to make this work.
any help will be much appreciated.
Yaseen.
View Replies !
View Related
Executing An External Program, Help...
I'm working on a project that will be deployed as a projector, I'm needing to be able to start other programs outside of the movie from within the movie. I know I should be able to do this with the "fscommand" statement but I can't seem to get it to work. I have this code:
on(release){
fscommand("exec","C:Program FilesAdobePhotoshop 7.0photoshop.exe")
}
atatched to a button. It is syntaticaly correct according to the action script dictionary, but wont work!!!! does anyone have any idea why it's not working.
View Replies !
View Related
Actionscript Executing In Reverse?
Hi guys - I've been away from Flash for a while (brushing up my other skills) and have decided to come back to it to put them all together. I've just got Flash MX and am keen to put it to use and upon writing my first script (for a while I may add!) I'm finding my script is executing in reverse!! Heres my script:
if (this.email == undefined){
this.status = "please enter your email address";
}
if (this.email.indexOf("@")>=0 && this.email.indexOf(".")>=0) {
this.status = "please enter a valid email address";
}
if (this.name == undefined){
this.status = "please enter your name";
}
if (this.message == undefined){
this.status = "please enter your message";
}
"status" is a simple dymanic text box and is being used return validated input text fields. Simple enough. But my script is being executed in reverse.. firstly, when published it executes the message "if" statement then the name and then finally the email one. When I used to use Flash 5 it used to run top to bottom. Has this changed in Flash MX??
please any help on this would be great!!
View Replies !
View Related
Evaluating/executing A String
I was wondering if there was a way to have flash execute a string..
for example if I had a variable that stored a bunch of commands as a string like:
a="movieclip._visible=false"
I could at somepoint evaluate it and have the whole line executed. The reason I am doing this is because I want to record what people do by tracking actions in a variable, and then replay them by evaluating it - but the actions could be different every time so it needs to be dynamic. If there is another way to do this.. any help would be greatly appreciated!
View Replies !
View Related
Actionscript For Executing Asp File?
Goodie day people,
I am using Flash MX to develop a small application and need to save the results into a database. I am using the actionscript Actions>Browser/Network>loadVariablesNum:
loadVariablesNum("level_asp.asp",0,"post");
However it doesn't seem to execute the asp file. Can anyone help me with this? Thank you very muchie!
tmh2
View Replies !
View Related
Button Events Not Executing
I have some button events like "on(rollOver)" that aren't executing at all. They're about 5 movie clips deep. As soon as I get 3 levels in, that is when it stops working. I can paste the button on the root level timeline or one level down from there and it works fine. However, any further deep than that and it stops working.
You can see the .fla here (though it is a pretty big download of 6 MB - I tried to take out the library elements that bulked up the size but the .fla didn't go down in size):
http://dustwurks.com/valiant_2004.fla
In that FLA, all of the menu elements that get expanded from the main menu should execute a trace command... but the events don't happen. This is frustrating the living HELL out of me. Any ideas??
View Replies !
View Related
|