Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Extensions and Plugins > JSFL - Extending Flash

Reply
 
Thread Tools Rate Thread Display Modes
Old 12-15-2004, 06:14 PM   #1
jesmith
Registered User
 
Join Date: Nov 2004
Posts: 11
Default Opening HTML page from jsfl

I'm developing a tool that generates a .JSFL file, which in turn creates a ready-to-run Flash presentation. (It starts with a template .FLA file, and then adds a bunch of stuff to it.) At the end of my script, I do:

doc.publish();

to create the .SWF file, and then I'd like to open a HTML file to display the results. The HTML file is not generated by Flash -- it contains a bunch of other stuff generated by my tool.

Does anyone here know of a way to either:
1) Open an HTML file from a .JSFL script, or
2) Execute an arbitrary O/S command from a .JSFL script?

Any ideas, no matter how whacky are appreciated...

-Joshua
jesmith is offline   Reply With Quote
Old 12-15-2004, 08:49 PM   #2
petefs
Fried Onions
 
petefs's Avatar
 
Join Date: Apr 2004
Location: Chicago, IL
Posts: 1,328
Send a message via AIM to petefs Send a message via MSN to petefs Send a message via Yahoo to petefs
Default

This is one of those 'no matter how wacky' things: It has to be possible with the c-level extensibility ^_^

There's probably an easier way, though : )
petefs is offline   Reply With Quote
Old 12-16-2004, 01:47 PM   #3
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,859
Default

this should sort u out:
http://www.asvguy.com/2004/07/undocumented_fl.html
__________________
oi poloi
http://www.memorphic.com/news/
hangalot is offline   Reply With Quote
Old 12-16-2004, 03:52 PM   #4
jesmith
Registered User
 
Join Date: Nov 2004
Posts: 11
Default

That article says it requires MX 2004, which I understand from the scuttlebut is not something everyone is willing to use, because of stability issues.

But thanks for the pointer!

Is there a similar solution which will work in ordinary Flash MX?

-Joshua
jesmith is offline   Reply With Quote
Old 12-16-2004, 03:55 PM   #5
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,859
Default

well AFAIK jsfl only works on FMX2004. ur bigger concern is that it needs 7.2
__________________
oi poloi
http://www.memorphic.com/news/
hangalot is offline   Reply With Quote
Old 12-16-2004, 04:30 PM   #6
jesmith
Registered User
 
Join Date: Nov 2004
Posts: 11
Default

Quote:
Originally Posted by hangalot
well AFAIK jsfl only works on FMX2004. ur bigger concern is that it needs 7.2
Yikes!

I guess that since when I right-clicked a .JSFL file, and the Open With... menu showed 6.0r25 as an option, I assumed this was an MX feature. But I've just confirmed what you said: MX doesn't understand .JSFL.

(As you might have guessed, I'm not a Flash user. I'm a software developer trying to develop something for Flash users to use. I'm really surprised that Flash got all the way to version 2004 without having a scripting language...)

So your solution does seem like a good option. However, I've come up with another one which I actually kind of like:

I inserted an empty frame at the beginning of the movie. Into this frame, I put the ActionScript command:

Code:
// If we are running stand-alone, open a browser
if (System.capabilities.playerType=='External') {
 getURL(_url.substring(0,_url.length-9)+'template.html'); stop();
}
Then in my JSFL script, I end with doc.testMovie() which opens the standalone player, which opens the HTML.

What do you think of this approach?

-Joshua
jesmith is offline   Reply With Quote
Old 12-16-2004, 04:37 PM   #7
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,859
Default

i might not b understanding it completely, but it does seem to be a long way around. have u considered just writing a python/perl script or a batch command?
__________________
oi poloi
http://www.memorphic.com/news/
hangalot is offline   Reply With Quote
Old 12-16-2004, 04:52 PM   #8
jesmith
Registered User
 
Join Date: Nov 2004
Posts: 11
Default

I need to use JSFL to populate the template.

If I wrap the invocation of the JSFL in a batch, there is no way for that batch command to know when the JSFL is finished, so there is no way for it to know when to open the HTML file.

Therefore the JSFL needs to open the HTML file.

I now have two ways of doing that:
1) Use the undocumented FSFile class, or
2) Embed a single-frame script that asks the TestMovie window to launch the browser

I kind of like option #2 better, because it means that the Flash developer can just hit Ctrl-Enter, and have it compile the movie and open my HTML file to test it out.

-Joshua
jesmith 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 Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:17 PM.


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