Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Desktop, Mobile and non-browser Environments > Projectors and CDs

Reply
 
Thread Tools Rate Thread Display Modes
Old 01-27-2009, 02:08 PM   #1
remmons
Registered User
 
Join Date: Oct 2008
Posts: 6
Default [AS3] Reloading Flash Projector?

Is there a way to completely reload a Flash Projector file without closing it and opening it again? I have an application that needs to be restarted frequently for each unique person who uses it.

Just setting the variables to null and reset them as I go don't cut it. I also use removeChildAt & addChild functionality (for swapping english and spanish movie clips), which i found is tough to reset.

Thanks
remmons is offline   Reply With Quote
Old 01-27-2009, 02:28 PM   #2
northcode
Senior Member
 
northcode's Avatar
 
Join Date: Apr 2002
Location: Ottawa, Ontario, Canada
Posts: 316
Default

Use FSCommand to launch a BAT file and have it reload the EXE. The EXE will have to EXEC the BAT file and then call FSCommand("quit", "") to terminate itself but that will effectively restart/reload the projector.
northcode is offline   Reply With Quote
Old 01-27-2009, 05:33 PM   #3
remmons
Registered User
 
Join Date: Oct 2008
Posts: 6
Default

Ok great. This should solve my problem when I get it to work properly. I implemented these two lines of code:

fscommand("exec", "start_flash.bat");
fscommand("quit", "");

The start_flash.bat containing the code to start my projector is in the same dir as the projector. When that code executes, a cmd window flashes and the application closes. It's two quick for me to see what it's saying, but it appears that the start_flash.bat isn't being executed or not being allowed to be executed since the file doesn't load back up.

Any ideas?
remmons is offline   Reply With Quote
Old 01-27-2009, 07:49 PM   #4
northcode
Senior Member
 
northcode's Avatar
 
Join Date: Apr 2002
Location: Ottawa, Ontario, Canada
Posts: 316
Default

The BAT file has to be in a folder called "fscommand" (Flash security sanbox requirement) so what you're seeing is Flash opening a command prompt that probably just says "file not found" and exits Inside the BAT file you'll need to use a relative path to the EXE to relaunch it, something like this..

Code:
..\myapp.exe
northcode is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using flash to close a Director projector donkeyneil Projectors and CDs 0 04-23-2008 08:59 AM
flash passing parameter to PHP and reloading PHP rafnews ActionScript 3.0 12 02-03-2008 02:39 PM
[Q] Do we need those forums??? CyanBlue General Chat 59 07-27-2004 11:13 AM
detecting projector vs swf in flash 5 daddyof8 ActionScript 1.0 (and below) 2 06-03-2004 11:31 PM
Pop up windows from a Flash Projector shrimpasia ActionScript 1.0 (and below) 1 06-16-2002 08:40 AM


All times are GMT. The time now is 03:26 AM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2010 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.