Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 01-23-2005, 01:42 PM   #1
Gil Levinson
Registered User
Join Date: Jan 2005
Posts: 2
Default Flash and JavaScript


I try to call to some javascript function from my flash document but nothing
How do i include a .jsfl file in my flash actions.

I'm trying to call to getDocumentCOM()'s properties and methods as i saw
in some samples but i always get an empty string as the result.

I don't need the javascript to be as a panel only for run time to be able
access the layers and the movie clips in my flash document.

Please help

Thanks in advance
Gil Levinson is offline   Reply With Quote
Old 01-23-2005, 09:26 PM   #2
Registered User
Join Date: Nov 2003
Posts: 189

Welcome Gil Levinson.

JSFL can only be used within the FLash IDE. JSFL commands cannot be excuted during run-time of an SWF.
the MMExecute command in actionscript can be used to run JSFL commands but are used only in swfs run in the IDE as a custom panel (WindowSWF), XMLtoUI, or timeline effect preview.

If you would like to use the dom's properties in your movie, you could run a command to fl.trace these in the output you prefer, and then copy that from the output panel and place it in your actionscript.

-hope it helps

** it's probably a type-o, but it is getDocumentDOM().

tdoublea is offline   Reply With Quote
Old 01-24-2005, 04:46 AM   #3
Gil Levinson
Registered User
Join Date: Jan 2005
Posts: 2

Thank you for your reply but i'm not sure i understand,

1. What do you mean that i have to work only in IDE ?
2. How do i execute a function in .jsfl file from the flash document ?
(as i worte before i get an empty string if i use MMexecute)
3. How do i run a command with fl.trace ?
4. Is it possible to access the layers and the elements in those layers
in my flash document in runtime with dom's properties?
5. Can you send me a very simple .fla file where i can see how to
call the dom's properties from a flash ?

Thank you
Gil Levinson is offline   Reply With Quote
Old 01-24-2005, 11:32 AM   #4
hangalot's Avatar
Join Date: Feb 2002
Location: on the road
Posts: 2,858

1. jsfl only works inside the flash editor meaning flash mx 2004 program thus at design time
2. mmexecute only works in a windowSWF, read the documentation about that
3. fl.trace is to do a trace in jsfl not run a command
4. yes!
5. i posted some examples here: http://johan.plasmapudding.com/index.php?id=196
oi poloi
hangalot is offline   Reply With Quote

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 08:02 AM.

Follow actionscriptorg on Twitter


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