Actionscript - JS Integration
I am trying to fetch values from HTML -embed tag into Actioscript 3.0 (Flash CS4). And sending the value to Javascript using ExternalInterface.call
method. But its not working on all browsers. I am getting Security Sandbox Violation error. Following is the HTML in which embed tag and javascript is
included. Thank you.
HTML Code :-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>singleSelect</title>
<script language="JavaScript" type="text/javascript">
<!--
//v1.7
// Flash Player Version Detection
// Detect Client Browser type
// Copyright 2005-2008 Adobe Systems Incorporated. All rights reserved.
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
var isFireFox = (navigator.appVersion.indexOf("Firefox") != -1) ? true : false;
function ControlVersion()
var version;
var axo;
var e;
// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry
try {
// version will be set for 7.X or greater players
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
version = axo.GetVariable("$version");
} catch (e) {
if (!version)
try {
// version will be set for 6.X players only
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
// installed player is some revision of 6.0
// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
// so we have to be careful.
// default to the first public version
version = "WIN 6,0,21,0";
// throws if AllowScripAccess does not exist (introduced in 6.0r47)
axo.AllowScriptAccess = "always";
// safe to call for 6.0r47 or greater
version = axo.GetVariable("$version");
} catch (e) {
if (!version)
try {
// version will be set for 4.X or 5.X player
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
version = axo.GetVariable("$version");
} catch (e) {
if (!version)
try {
// version will be set for 3.X player
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
version = "WIN 3,0,18,0";
} catch (e) {
if (!version)
try {
// version will be set for 2.X player
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
version = "WIN 2,0,0,11";
} catch (e) {
version = -1;
return version;
// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
// NS/Opera version >= 3 check for Flash plugin in plugin array
var flashVer = -1;
if (navigator.plugins != null && navigator.plugins.length > 0) {
if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
var descArray = flashDescription.split(" ");
var tempArrayMajor = descArray[2].split(".");
var versionMajor = tempArrayMajor[0];
var versionMinor = tempArrayMajor[1];
var versionRevision = descArray[3];
if (versionRevision == "") {
versionRevision = descArray[4];
if (versionRevision[0] == "d") {
versionRevision = versionRevision.substring(1);
} else if (versionRevision[0] == "r") {
versionRevision = versionRevision.substring(1);
if (versionRevision.indexOf("d") > 0) {
versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
// MSN/WebTV 2.6 supports Flash 4
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
// WebTV 2.5 supports Flash 3
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
// older WebTV supports Flash 2
else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
else if ( isIE && isWin && !isOpera && isFireFox) {
flashVer = ControlVersion();
return flashVer;
// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
versionStr = GetSwfVer();
if (versionStr == -1 ) {
return false;
} else if (versionStr != 0) {
if(isIE && isWin && !isOpera && isFireFox) {
// Given "WIN 2,0,0,11"
tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"]
tempString = tempArray[1]; // "2,0,0,11"
versionArray = tempString.split(","); // ['2', '0', '0', '11']
} else {
versionArray = versionStr.split(".");
var versionMajor = versionArray[0];
var versionMinor = versionArray[1];
var versionRevision = versionArray[2];
// is the major.revision >= requested major.revision AND the minor version >= requested minor
if (versionMajor > parseFloat(reqMajorVer)) {
return true;
} else if (versionMajor == parseFloat(reqMajorVer)) {
if (versionMinor > parseFloat(reqMinorVer))
return true;
else if (versionMinor == parseFloat(reqMinorVer)) {
if (versionRevision >= parseFloat(reqRevision))
return true;
return false;
function AC_AddExtension(src, ext)
if (src.indexOf('?') != -1)
return src.replace(/\?/, ext+'?');
else
return src + ext;
function AC_Generateobj(objAttrs, params, embedAttrs)
var str = '';
if (isIE && isWin && !isOpera && isFireFox)
str += '<object ';
for (var i in objAttrs)
str += i + '="' + objAttrs[i] + '" ';
str += '>';
for (var i in params)
str += '<param name="' + i + '" value="' + params[i] + '" /> ';
str += '</object>';
else
str += '<embed ';
for (var i in embedAttrs)
str += i + '="' + embedAttrs[i] + '" ';
str += '> </embed>';
document.write(str);
function AC_FL_RunContent(){
var ret =
AC_GetArgs
( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
, "application/x-shockwave-flash"
AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
function AC_SW_RunContent(){
var ret =
AC_GetArgs
( arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
, null
AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
var ret = new Object();
ret.embedAttrs = new Object();
ret.params = new Object();
ret.objAttrs = new Object();
for (var i=0; i < args.length; i=i+2){
var currArg = args[i].toLowerCase();
switch (currArg){
case "classid":
break;
case "pluginspage":
ret.embedAttrs[args[i]] = args[i+1];
break;
case "src":
case "movie":
args[i+1] = AC_AddExtension(args[i+1], ext);
ret.embedAttrs["src"] = args[i+1];
ret.params[srcParamName] = args[i+1];
break;
case "onafterupdate":
case "onbeforeupdate":
case "onblur":
case "oncellchange":
case "onclick":
case "ondblclick":
case "ondrag":
case "ondragend":
case "ondragenter":
case "ondragleave":
case "ondragover":
case "ondrop":
case "onfinish":
case "onfocus":
case "onhelp":
case "onmousedown":
case "onmouseup":
case "onmouseover":
case "onmousemove":
case "onmouseout":
case "onkeypress":
case "onkeydown":
case "onkeyup":
case "onload":
case "onlosecapture":
case "onpropertychange":
case "onreadystatechange":
case "onrowsdelete":
case "onrowenter":
case "onrowexit":
case "onrowsinserted":
case "onstart":
case "onscroll":
case "onbeforeeditfocus":
case "onactivate":
case "onbeforedeactivate":
case "ondeactivate":
case "type":
case "codebase":
case "id":
ret.objAttrs[args[i]] = args[i+1];
break;
case "width":
case "height":
case "align":
case "vspace":
case "hspace":
case "class":
case "title":
case "accesskey":
case "name":
case "tabindex":
ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
break;
default:
ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
ret.objAttrs["classid"] = classid;
if (mimeType) ret.embedAttrs["type"] = mimeType;
return ret;
-->
</script>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<embed src="singleSelect.swf?foo=bar&foo2=bar2&qtitle=q1&qtext=I'm a Complete Sports freak&dValues=1,2,3,4&dLabels=Agree Completely,Agree Somewhat,No Opinion,No Answer&imgNo=1&type=SingleSelect" quality="high" bgcolor="#FFFFFF" width="600" height="400" name="java_Sample" align="left" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"/>
<SCRIPT type="text/javascript">
function finaldata(data1,data2)
//document.getElementById('q3_1').checked=true;
alert("Captured: "+data1+" "+data2);
</SCRIPT>
<script language="JavaScript" type="text/javascript">
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0',
'width', '550',
'height', '400',
'src', 'singleSelect',
'quality', 'high',
'pluginspage', 'http://www.adobe.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'singleSelect',
'bgcolor', '#ffffff',
'name', 'singleSelect',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','always',
'movie', 'singleSelect',
'salign', ''
); //end AC code
</script>
<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="550" height="400" id="singleSelect" align="middle">
<param name="allowScriptAccess" value="always" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="singleSelect.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /> <embed src="singleSelect.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="singleSelect" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
</object>
</noscript>
</body>
</html>
Actionscript code :-
/*Single Select Questionnaire*/
import flash.external.ExternalInterface;
import flash.display.DisplayObject;
import flash.display.Graphics;
import flash.display.Shape;
import flash.display.Sprite;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.events.Event;
import flash.net.*;
import flash.display.Loader;
import flash.system.Security;
Security.allowDomain("*");
var allFlashVars:Object=LoaderInfo(this.root.loaderInfo).parameters;
var theVariableValue:String = new String();
var theVariableName:String = new String();
var QText:TextField = new TextField();
var mulOptions:TextField;
var arr1:Array = new Array();
var arr2:Array = new Array();
var format:TextFormat = new TextFormat();
var format1:TextFormat = new TextFormat();
var i:uint;
var m:uint=0;
var OptionLength:Number;
var typeOfQue:String;
var newButton:Radiooption;
var myArray:Array = new Array();
var selectedOption:Array = new Array();
function createButtonGroups(){
if (m < 1) {
myArray[m] = new Array();
for (var r:int = 0; r<OptionLength; r++) {
newButton = new Radiooption();
newButton.name = "Option"+m+r;
//trace("newButton.name : "+newButton.name);
newButton.x = m * 120 + 80;
newButton.y = r * 60 + 100;
addChild(newButton);
newButton.flags=true;
newButton.addEventListener(MouseEvent.MOUSE_UP,optionChosen);
newButton.val = arr2[r].toString();;
myArray[m].push(newButton);
if (r == OptionLength) {
m++;
r = 0;
createButtonGroups();
function optionChosen (event:MouseEvent) {
var currStr:String = event.currentTarget.name.toString();
//ExternalInterface.call("finaldata", currStr.toString());
var thisButton:Object = event.currentTarget;
for (var l:* in myArray) {
trace("myArray[l].indexOf(thisButton) : "+myArray[l].indexOf(thisButton));
if (myArray[l].indexOf(thisButton) != -1) {
trace("l : : "+l);
var thisArray = myArray[l];
trace("thisArray : "+myArray[l]);
for (var b:* in thisArray) {
trace("b : :"+thisArray[b]);
thisArray[b].radioBox.gotoAndStop(1);// turn off all of the buttons in this row: thisArray[b] do something;
thisButton.radioBox.gotoAndStop(2);// turn on the button that was selected: thisButton do something else;
for (i=0;i<selectedOption.length;i++) {
if(selectedOption.length != 0){
var newArr:ArrayFun = new ArrayFun(selectedOption);
newArr.removeEle(selectedOption[i]);
selectedOption.push(thisButton.val.toString());
//selectedOption.removeDuplicates(selectedOption);
//var passVar = selectedOption;
ExternalInterface.call("finaldata", selectedOption.toString(),thisButton.name.toString());
function ParseCountry(allFlashVars):void {
format.font="Arial";
format.color="0x3D8759";
format.size="20";
format.bold=true;
format.underline=false;
format1.font="Arial";
format1.color="0x3D8759";
format1.size="15";
format1.bold=true;
format1.underline=false;
for (theVariableName in allFlashVars) {
theVariableValue = String(allFlashVars[theVariableName]);
if(theVariableName == "qtext"){
//ExternalInterface.call("finaldata", theVariableValue.toString());
addChild(QText);
QText.text = theVariableValue.toString();
QText.x = 0;
QText.y = 0;
QText.autoSize = "left";
QText.setTextFormat(format);
if(theVariableName == "dLabels"){
trace("yes");
arr1 = theVariableValue.split(",");
//output.appendText("\t" + arr[0]+"\n\n");
OptionLength = arr1.length;
for(i=0;i<arr1.length;i++){
mulOptions = new TextField();
mulOptions.text = arr1[i];
mulOptions.width = 120;
mulOptions.height = 60;
//mulOptions.wordWrap = true;
mulOptions.autoSize = "left";
//mulOptions.multiline = true;
mulOptions.setTextFormat(format1);
mulOptions.x = 120;
mulOptions.y = 100+(i*60);
addChild(mulOptions);
createButtonGroups();
if(theVariableName == "dValues"){
arr2 = theVariableValue.split(",");
//Initiate
ParseCountry(allFlashVars);
where are you passing flashvars?
Similar Messages
-
Actionscript / swf integration with Adobe Presenter
I need to do some Actionscript / swf integration with Adobe Presenter content.
Is there any way to access information about current slide nr., total number of slides and "end of presentation" information from swf(Actionscript 3.0) inserted into Adobe Presenter?
I am using Adobe Presenter 8 with Adobe Connect 8.First, the best place is probably the Presenter forum, which somewhat curiously is under the Connect umbrella:
http://forums.adobe.com/community/connectpro/connectpro_presenter
Out of curiousity, why are you using AICC? Because the content is on a different domain?
To the point, it's great to have a logging or debugging tool for these sort of things to view the communication between the LMS and the lesson. Perhaps the lesson is sending the 'completed' status but also sending some other value that the LMS is using to change the status back to incomplete?
My first suggestion would be to try the lesson in a tool like TestTrack...but I don't think that handles AICC. Does the Saba LMS have any kind of debugger or logging tool you can use? You really need to see if the lesson is sending the status back to the LMS as you suspect it should. If it IS, then the issue lies with the LMS and how it's interpreting that result. If it's NOT, then you can then perhaps figure out what to adjust in the lesson.
In general, just play with the settings. If it's set to Complete/Incomplete and has a Mastery Score, try NOT setting the Mastery Score... And other such combinations.
I hope the folks in the Connect/Presenter forum can provide more insight.
Erik -
EJB 3.0 integration in FDS, with Annotations
We have been working with the EJB 3.0 implementations and see
a lot of synergy between the new approach to enterprise Java with
this new specification, and would love to see FDS add an adaptor to
support it.
Our new entity/session beans have annotated relationships,
primary key information, and security regarding access to the
object and it's methods are specified already in the Java source.
Centralized management of this information where it is closest to
the source is highly productive.
With so much of the FDS configuration still sitting in static
XML files, we are required to maintain a redundant copy of all of
the annotation information separately. This adds pure overhead to
the development process, and it is challenging to keep the two in
sync when applications are enhanced.
We would like to see the FDS framework more tightly
integrated with the rest of the J2EE world, and through Java
introspection and annotations learn about the applications
available on the server side without custom config files.
The fill, assembler, and synchronization methods could simply
be a standard class interface to be implemented with methods to
override, or even annotated with flex annotations. Destinations
would no longer need to be hand-configured. The meta-data about row
identity would be read from the entity beans themselves. If a fill
method has parameters, read them from the function prototypes.
(The existing Flash remoting product seems to have the above
features. We enjoy the integration of Flash Remoting, and the
development workflow associated. The Flash client only needs the
JNDI name of the services, and once authenticated, access to any
function is possible without further action. FDS goes above and
beyond to provide several very interesting features, but is not
quite as intuitive when it comes to J2EE services.)
To tie this meta-information on the server back to the IDE
for visual design, using real server-side object properties and
methods, and session bean functions would close the loop on the
development cycle. This could also be accomplished within Eclipse
since the server side Java classes could easily be in the
classpath. The IDE could give the developer a hand in choosing and
referencing valid return object properties. An actionscript object
could even be generated if necessary from the entity bean's
properties...
Are any of these ideas in the works, or are there any
exisiting methods for accomplishing these efficiencies?caused by: com.sun.enterprise.InjectionException: Illegal use of static field private static car.session.CarSessionLocal jsfpack.BackingBean.carSession on class that only supports instance-based injectionat com.sun.enterprise.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:292)
... 52 more
StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
com.sun.enterprise.InjectionException: Illegal use of static field private static car.session.CarSessionLocal jsfpack.BackingBean.carSession on class that only supports instance-based injectionInjected fields in server-side components should never be marked static. static is only used for
the main class of Application Client components. -
Specify the GUI declaratively in ActionScript like in JavaFX Script instead of MXML
After reading a bit about JavaFX Script (which is actually remarkebly close to ActionScript 3) as a developer I thought the way one can specify the GUI declaratively in JavaFX Script via JSON-like notation for the components is pretty cool. It would be nice to have something like that in Flex/ActionScript too. The advantages I see over MXML are:
1) a more compact notation than XML which is nice from a developers view point who actually writes this kind of code. Of course the idea would be that designers still design the GUI with graphical tools that generate this code but if you have to dive in and edit the code it's nice not to have to deal with verbose XML and I think even designers can easily understand JSON-like code; don't just assume that designers love XML because HTML was based on SGML! I'm not so sure if today many designers really still know raw HTML that well (like in 1997, the early days...). Server side developers probably know it better because they have to adapt it to jsp or asp or whatever framework.
2) The fact that it's all ActionScript gives a seamless integration between just composing the components to form the GUI and adding scripts to add additionial behavior instead of mixing XML with actionscript code => no more need for those nasty CDATA blocks! It would also be easy for development tools like Flexbuilder to give a seamsless experience with code completion and zooming in on the code because it's all Actionscript! There's also no need for a separate expression language to tie the MXML to the underlying Actionscript. It would it also make easier to create custom components (not just simple composition components which is really easy in MXML) because you don't have to implement separate XML tags.
here's a short JavaFX Script example:
Frame {
content: GroupPanel {
var myRow = Row { alignment: BASELINE }
var label_col = Column { alignment: TRAILING }
var field_col = Column { alignment: LEADING }
rows: [myRow]
columns: [label_col, field_col]
content:
[SimpleLabel {
row: myRow
column: label_col
text: "Type your text here:"
TextField {
row: myRow
column: field_col
columns: 50
visible: true
Note that this shouldn't be confused with programmatically specifying the GUI in Actionscript (which is possible today as an alternative to MXML). What I propose is at a (slightly) higher level: you don't give a detailed sequence of methods/functions to call to construct the GUI (i.e. HOW to do it) but just specify WHAT you want.
Hopefully some Adobe Flex will see this and think about it. Although I think MXML is not too bad and I can live with it if I have to ;)I like that idea Sean. A standard and well-supported way to separate MXML and code would be good. I'd love to have builder support a MVC style triad for MXML files, with the
model.as being simply an all-public-all-bindable class full of VOs and view-specific information, any view-manipulation and view<->app communications in the
controller.as, and nothing but bindings and layour in the MXML. There's (almost) nothing stopping you doing this by hand at the moment, but it's a pain, and developers wouldn't stick to it for very long, when they need to create and maintain 3 separate files for that simple "error dialog" without a hand from Builder.
Then again, I'd rather Adobe spent the time that would take on opening and better-documenting builder's APIs, so we can write our own plugins easily, but that's my greedy side- A standard builder-supported MVC pattern for custom MXML components would be aweseome for people that aren't me :)
-Josh
As for JavaFX, I don't care for it.
On Tue, Sep 30, 2008 at 7:56 AM, Sean Christmann
<
[email protected]> wrote:
A new message was posted by Sean Christmann in
Developers --
specify the GUI declaratively in ActionScript like in JavaFX Script instead of MXML
Jason you bring up a good point on a concept that I think Adobe should
poach from a different framework, Silverlight. In Silverlight the
code-behind pattern is automatic and very nice to work with. Every
interface can be composed of both a layout file and a script file, and
they get composited into the SAME class at compile time. So you can
have both a FileDialog.mxml and FileDialog.as file that know about each
other automatically, without the need to subclass one from the other.
Sean
Jason Stafford wrote:
A new message was posted by Jason Stafford in
Developers --
specify the GUI declaratively in ActionScript like in JavaFX Script instead of MXML
Personally, I like the separation between the MXML and ActionScript.
We're working on a large project, and so we have all the ActionScript
separate from the MXML files. For example we'll have something like
filedialoglayout.mxml, and then
filedialog.as that is a subclass of
filedialoglayout. All event handlers and the like are setup in the
filedialog.as file - the mxml file doesn't know about any function names.
Advantages:
MXML files become layout only - and are more easily shared and worked on
with non-technical people
ActionScript is all in *.as files: no CDATA blocks and no FlexBuilder
quirks where editing ActionScript inside a CDATA block doesn't work
quite like in a real AS file.
For simple experiments, and for learning, it's obviously nice to have
everything in one mxml file, but in a big project like ours, the
separation helps keep things clearer and more maintainable.
Why use the mxml at all? The MXML files are nice to edit with the
visual editor in Flex Builder, and it's much easier to apply styles and
embed assets in MXML than it is in pure ActionScript.
I think two ways to talk about the same thing (XML and ActionScript) is
already almost one too many - adding a third (JSON) would really be too
much.
Just my thoughts.
-Jason Stafford
Sean Christmann wrote:
A new message was posted by Sean Christmann in
Developers --
specify the GUI declaratively in ActionScript like in JavaFX Script
instead of MXML
This reminds me of a certain workflow pattern that has emerged for us
which might help provide some insight on this topic. I'm working on a
project with a couple other developers which connects to a webservice
for supplying clientside data. This data is available in both json
notation and xml notation. The thing is, while the developers have
overwhelmingly agreed that we should be consuming the json version
since it can be parsed faster and provide more meaningful context for
objects (ie strings vs ints vs arrays etc...), all these same
developers rely exclusively on the xml notation when asking questions
about the data or passing structures around to discuss.
I see the same thing when looking at JavaFX and MXML. JavaFX might
allow for more accurate structures and might be able to be compiled
faster, but MXML is better for being self documenting even if it
requires more verbosity.
Sean
Matt Chotin wrote:
A new message was posted by Matt Chotin in
Developers --
specify the GUI declaratively in ActionScript like in JavaFX Script
instead of MXML
I'd be curious what other people think. I see MXML as a distinct
advantage over doing the pseudo-script stuff. I really don't like
the JavaFX system actually.
Matt
On 9/28/08 10:33 AM, "neo7471"
<[email protected]> wrote:
A new discussion was started by neo7471 in
Developers --
specify the GUI declaratively in ActionScript like in JavaFX Script
instead of MXML
After reading a bit about JavaFX Script (which is actually remarkebly
close to ActionScript 3) as a developer I thought the way one can
specify the GUI declaratively in JavaFX Script via JSON-like notation
for the components is pretty cool. It would be nice to have something
like that in Flex/ActionScript too. The advantages I see over MXML are:
1) a more compact notation than XML which is nice from a developers
view point who actually writes this kind of code. Of course the idea
would be that designers still design the GUI with graphical tools
that generate this code but if you have to dive in and edit the code
it's nice not to have to deal with verbose XML and I think even
designers can easily understand JSON-like code; don't just assume
that designers love XML because HTML was based on SGML! I'm not so
sure if today many designers really still know raw HTML that well
(like in the 1997, the early days...). Server side developers
probably know it better because they! have to adapt it to jsp or asp
or whatever framework.
2) The fact that it's all ActionScript gives a seamless integration
between just composing the components to form the GUI and adding
scripts to add additionial behavior instead of mixing XML with
actionscript code => no more need for those naster CDATA blocks! It
would also be easy for development tools like Flexbuilder to give a
seamsless experience with code completion and zooming in on the code
because it's all Actionscript! There's also no need for a separate
expression language to tie the MXML to the underlying Actionscript.
It would it also make easier to create custom components (not just
simple composition components which is really easy in MXML) because
you don't have to implement separate XML tags.
here's a short JavaFX Script example:
Frame {
content: GroupPanel {
var myRow = Row { alignment: BASELINE }
var label_col = Column { alignment: TRAILING }
var field_col = Column { alignment: LEADING }
rows: [myRow]
columns: [label_col, field_col]
content:
[SimpleLabel {
row: myRow
column: label_col
text: "Type your text here:"
TextField {
row: myRow
column: field_col
columns: 50
visible: true
Note that this shouldn't be confused with programmatically specifying
the GUI in Actionscript (which is possible today as an alternative to
MXML). What I propose is at a (slightly) higher level: you don't give
a detailed sequence of methods/functions to call to construct the GUI
(i.e. HOW to do it) but just specify WHAT you want.
Hopefully some Adobe Flex will see this and think about it. Although
I think MXML is not too bad and I can live with it if I have to ;)
View/reply at specify the GUI declaratively in ActionScript like in
JavaFX Script instead of MXML
<
http://www.adobeforums.com/webx?13@@.59b69b42>
Replies by email are OK.
Use the unsubscribe
<
http://www.adobeforums.com/webx?280@@.59b69b42!folder=.3c060fa3>
form to cancel your email subscription.
View/reply at
<
http://www.adobeforums.com/webx?13@@.59b69b42/0>
Replies by email are OK.
Use the unsubscribe form at
<
http://www.adobeforums.com/webx?280@@.59b69b42!folder=.3c060fa3> to
cancel your email subscription.
<div><div></div><div>
Jason Stafford
Principal Developer
Inspiration Software, Inc.
The leader in visual thinking & learning
Now available - Kidspiration(r) 3, the visual way to explore and understand words, numbers and concepts.
Learn more at
www.inspiration.com/kidspiration.
503-297-3004 Extension 119
503-297-4676 (Fax)
9400 SW Beaverton-Hillsdale Highway
Suite 300
Beaverton, OR 97005-3300
View/reply at
<
http://www.adobeforums.com/webx?13@@.59b69b42/2>
Replies by email are OK.
Use the unsubscribe form at
<
http://www.adobeforums.com/webx?280@@.59b69b42!folder=.3c060fa3></div>
</div> to cancel your email subscription.
Sean Christmann | Experience Architect | EffectiveUI | 720.937.2696
View/reply at
specify the GUI declaratively in ActionScript like in JavaFX Script instead of MXML
Replies by email are OK.
Use the
unsubscribe form to cancel your email subscription.
"Therefore, send not to know For whom the bell tolls. It tolls for thee."
http://flex.joshmcdonald.info/
:: Josh 'G-Funk' McDonald
:: 0437 221 380 ::
[email protected] -
Call Actionscript function from Javascript
Can anyone show me a simple example of calling an
actionscript function from within javascript? Everything I have
found searching online refers to using the ExternalInterface but I
was sure I also read that Adobe Air does not support it. I am
currently using htmlloader to load a html page containing
javascript into an <mx:HTML>. But I cant seem to touch the
actionscript functions from within javascript. I am specifically
trying to work with the FCKeditor that I have integrated so if
anyone has any examples other methods of integrating the editor I
would love to see them as well.
Thanks!Let's assume u have embeded swf object named "flashObj"
<embed src="MYSWF.swf" quality="high"
width="100%" height="100%" name="flashObj"
play="true"
loop="false"
quality="high"
allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="
http://www.adobe.com/go/getflashplayer">
</embed>
On each time onblur is called it invoke AS function
myActionScriptFn
window.onblur = function() {
if(flashObj != null){
flashObj.myActionScriptFn(navigator.appName);
You need to add a listener in Action Script code
ExternalInterface.addCallback("myActionScriptFn",
myActionScriptFn);
public function myActionScriptFn(appName:String):void
// Any code here
Regards -
Revision: 12077
Revision: 12077
Author: [email protected]
Date: 2009-11-20 18:16:32 -0800 (Fri, 20 Nov 2009)
Log Message:
Although Spark RichText does not support link formats, modifying compiled FXG to not generate ActionScript code that will cause compile time exceptions.
Removing references to Flex Builder 3 in RPC.
QE notes: N/A
Doc notes: N/A
Bugs:
SDK-24305 - Link format property nodes cause errors on RichText in FXG 2.0
SDK-24322 - A couple references to Flex Builder 3 in Flex 4 LangRef (and code comments)
Reviewer: Deepa
Tests run: checkintests
Is noteworthy for integration: No
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-24305
http://bugs.adobe.com/jira/browse/SDK-24322
Modified Paths:
flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/XMLDecoder.as
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java -
Changes not saved in .fla (not only ActionScript)
Regarding the technote "ActionScript changes are not saved in
the FLA" (
http://www.adobe.com/go/tn_19363),
I'd like to add that this does not happen only in the ActionScript
code. I am currently integrating translation in a Flash animation
made of 30-40 .fla files, and copying foreign texts in static text
fields by means of Animation Explorer (Viewer?, I have a French
Flash version) is prone to that same behavior.
The workaround seems to be efficient, though not very
practical.
Obviously, before you understand what is going on and search
for help on the Internet, you will lose A LOT OF time.
Like everybody, I hope this enormous bug will be addressed as
soon as possible.
Regards,
Xavier PITELHi,
I think I have done it correctly but its a bit different from what you are saying...
From Tools menu I chose Export Design objects and then it chose the S/w component that I was
modifying and There were 2 modes, Transport using CTS and Transport using file system and I chose CTS.
In next step of the wizard I chose " All objects of the SW component...." and then in next it created
me a transport request and then it was done. I could see a preview of the different objects
that were included in that transport.
I could see this transprt created thru menu option, Tools --> Open CTS...
Is that all ?? So once I am done and release this transport, it will be movied to QA right ?
Just want to make sure I dont mess up the existing set up !!
thanks -
Looking for a contract actionscript developer
San Francisco Based Contract Actionscript - Flex Developer | Streaming Video Solution
We are currently seeking a full or part time (at least for the next several months) senior Actionscript & Flex contract developer to help establish our online streaming video abilities.
This person must:
• have strong application development skills in AS3
• be comfortable working with Flexbuilder, Eclipse, Ant or similar tool-sets
• have experience with Adobe FMS
• be familiar with latest video streaming abilities including use of Dynamic Stream-switching with QOS
• be comfortable modifying an established Flash VOD product (such as flowplayer, JW Player, OSMF)
• have strong skills in communicating between AS and external supporting applications (Webservices, JSON)
Our player is the centerpiece of our web experience and must be flexible, secure, and intelligent. The person we are seeking must have strong application development instincts to drive this to successful completion. While we'd prefer candidates with some creative-integration abilities, this is primarily an opening for a veteran application developer with strong, standards-based coding skill and a passion for establishing bullet-proof online solutions.
Ideally, we are seeking an SF local who would be able to meet on-site when needed, but would consider exceptions for the right fit.
If interested and qualified please send your resume to [email protected]I sure wouldn't turn a new user loose on Wordpress. It gives
me a headache,
and a new user would be just lost....
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Vix" <[email protected]> wrote in message
news:eo2urs$pdn$[email protected]..
> Have you thought about using a system like Wordpress or
Textpattern? It's
> free and pretty customisable. It will make it easy for
you to edit the
> content yourself too.
>
> KJP88 wrote:
>> Looking for someone versed in dev. i.e. enough to
include flyout menus,
>> flash and php to develop a css site for me ( for
money). Fairly straight
>> forward, I would add the content, but I live in a
country where the
>> average income is about 700 USD a month, so
hopefully someone with a kind
>> heart will reply.
>>
>> If interested, plz email me here:
[email protected]
>> -
RoboHelp 9 and ActionScript?
Hello. I am still quite green when it comes to the in's and out's of RoboHelp, so please pardon me if my inquiry is out-of-place in any way...
I am working on a PC/Mac compatible AIRHelp project in RoboHelp 9, and was wondering if there are any issues with authoring/inserting Actionscript? Essentially what I am looking to do is add two ActionScript source code files... the first is to be added to the project source folder and defines a particular class... the second attempts to validate a function of said class. As these source files are part of a third party purchase, I wanted to verify that this class can be interfaced once the installed .air application is launched.
I thank you in advance for your time and informationYes. It's called Technical Communication Suite upgrade
Sorry to be flippant. The whole point of TCS is that it adds the level of integration that you require but which is not available in the individual products.
The RoboColum(n)
@robocolumn
Colum McAndrew -
Best practices for Flash CS5 and Flash Builder 4 integration?
With Flash CS5's new XFL file structure/format, what's the best way to structure project files for Flash CS5 integration with Flash Builder 4? Flash CS5 autocreates a folder named after the xfl file as the outer container, and then all the assets/xfl within it. Should this folder be used as the project folder for Flash Builder 4, or better to nest the xfl container folder in a "real" project folder? I would presume the latter, since you might have multiple XFL files in one project. I was hoping to see some automatic linkages between document class of the Flash CS5 XFL file and any default ActionScript class created by Flash Builder, but so far I seem to need to specify a document class directly in Flash CS5's environment and making sure that the path to a default class created by Flash Builder is correct.
Thanks in advance for any suggestions...Most likely, you know that, but just in case, you can integrate new Flash project into existing Flex 4 project from within the Flash Builder by choosing either Flash Component or Flash Container from the FB Design view. In such workflow Flash Builder opens the Flash CS 4 (I assume that should be the same for CS5) and takes care of the integrating the newly created Flash project into original Flex 4 project.
FTQuest -
Webdynpro abap & Flex Integration
Hi
I integrated Flash Islands Into Webdynpro Abap..Flash Island Is displaying..but the values which im passing through wddoinit method to the frontend is not displaying..binding from context nodes to gacproperty is done( name same as flex field is given )....
Thanks & Regards,
VasaviHello Vasavi,
the code is not available in your post. I think the code is filtered. Just paste only the ActionScript code.
And from the error what I can GUESS is that FlashIslandLibrary is not loaded. Can you try developing your flex application n Flex Builder 3.0 and check?
BR, Saravanan -
Revision: 3789
Author: [email protected]
Date: 2008-10-21 12:55:26 -0700 (Tue, 21 Oct 2008)
Log Message:
Integrated Build 192 of what used to be called TCAL (and, before that, Vellum).
The Text Component ActionScript Library (TCAL) has been renamed to the Text Layout Framework. Its classes are now in the package flashx.textLayout rather than in flashx.tcal, and they are packaged into SWCs named textLayout_xxx.swc rather than tcal_xxx.swc. The XML namespace for importable markup is now "http://ns.adobe.com/textLayout/2008" rather than "http://ns.adobe.com/tcal/2008".
QE Notes: Please update package names (and XML namespaces, if necessary) in all test files.
Doc Notes: Please eliminate all references to "Text Component ActionScript Library" or "TCAL" and use "Text Layout Framework" instead.
Bugs: -
Reviewer: -
Modified Paths:
flex/sdk/trunk/build.xml
flex/sdk/trunk/frameworks/fxg-manifest.xml
flex/sdk/trunk/frameworks/mxml-2009-manifest.xml
flex/sdk/trunk/frameworks/projects/flex4/build.xml
flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxTextInput.as
flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as
flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTextBase.as
flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/TextOperationEvent.as
flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Parser.as
flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as
flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/TextFlowComposer .as
flex/sdk/trunk/frameworks/projects/flex4/src/mx/utils/TextUtil.as
flex/sdk/trunk/frameworks/projects/wireframe/build.xml
Added Paths:
flex/sdk/trunk/frameworks/libs/textLayout_conversion.swc
flex/sdk/trunk/frameworks/libs/textLayout_core.swc
flex/sdk/trunk/frameworks/libs/textLayout_edit.swc
Removed Paths:
flex/sdk/trunk/frameworks/libs/tcal_conversion.swc
flex/sdk/trunk/frameworks/libs/tcal_core.swc
flex/sdk/trunk/frameworks/libs/tcal_edit.swcRevision: 3789
Author: [email protected]
Date: 2008-10-21 12:55:26 -0700 (Tue, 21 Oct 2008)
Log Message:
Integrated Build 192 of what used to be called TCAL (and, before that, Vellum).
The Text Component ActionScript Library (TCAL) has been renamed to the Text Layout Framework. Its classes are now in the package flashx.textLayout rather than in flashx.tcal, and they are packaged into SWCs named textLayout_xxx.swc rather than tcal_xxx.swc. The XML namespace for importable markup is now "http://ns.adobe.com/textLayout/2008" rather than "http://ns.adobe.com/tcal/2008".
QE Notes: Please update package names (and XML namespaces, if necessary) in all test files.
Doc Notes: Please eliminate all references to "Text Component ActionScript Library" or "TCAL" and use "Text Layout Framework" instead.
Bugs: -
Reviewer: -
Modified Paths:
flex/sdk/trunk/build.xml
flex/sdk/trunk/frameworks/fxg-manifest.xml
flex/sdk/trunk/frameworks/mxml-2009-manifest.xml
flex/sdk/trunk/frameworks/projects/flex4/build.xml
flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxTextInput.as
flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as
flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTextBase.as
flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/TextOperationEvent.as
flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Parser.as
flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as
flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/TextFlowComposer .as
flex/sdk/trunk/frameworks/projects/flex4/src/mx/utils/TextUtil.as
flex/sdk/trunk/frameworks/projects/wireframe/build.xml
Added Paths:
flex/sdk/trunk/frameworks/libs/textLayout_conversion.swc
flex/sdk/trunk/frameworks/libs/textLayout_core.swc
flex/sdk/trunk/frameworks/libs/textLayout_edit.swc
Removed Paths:
flex/sdk/trunk/frameworks/libs/tcal_conversion.swc
flex/sdk/trunk/frameworks/libs/tcal_core.swc
flex/sdk/trunk/frameworks/libs/tcal_edit.swc -
ActionScript 3 compiler, asc, is now open-source
In the latest nightly build of the Flex SDK is the as3
compiler code!
The ActionScript 3 compiler, asc, is now open-source! Added
the source code for Flex 3's asc.jar, at
branches/3.0.x/modules/asc. This code came from
ssh://asteam.macromedia.com/hg/asc-flex3 and is what built the
asc.jar that shipped with SDK 3.0.0.477, plus open-source copyright
changes. It requires Java 1.5 to build and is not integrated with
the build scripts for branched/3.0.x; this branch continues to have
a prebuilt asc.jar in 'lib'.PHPAMF is not an Adobe product and for this you did not find anything here.
Amfphp can properly serialize and deserialize complex types. In addition to objects and arrays, it supports resources from database connections, which means you can simply return mysql_query from your remote method and amfphp will know what to do with it. If the platform supports it (currently, Flash Remoting only), it can handle circular references and typed objects. It also supports simple remote debugging. Finally, amfphp comes with a service browser which allows you to test your services before creating a frontend.
Regards, Giuseppe -
Integrating a little Flash in Dreamweaver
Hello All,
I am a newbie and just finished a Flash class. However we
didn't hardly talk at all about integrating Flash with Dreamweaver.
What I want to do is create an intro page that has Flash and
then you have to click on a Button to go into the main site. I
understand a little of Behaviors and Actionscripting so thought
that I would do the GetURL Behavior (going off memory here) to get
me from the Intro page to the main Dreamweaver site.
Question is... do I export an SWF file, put that in a
index.html page for the Intro page and then link to the main
Dreamweaver site but have the main site not an "Index" file but
another name...maybe main.html.
Is this what people do? Or do they take the generated .html
file from Flash (its published) and just use that as their intro.
Naming it index.html. And then linking to another *.html created
with Dreamweaver but that is not saved as index.html.
Also, how often are people doing a PURE Flash website and not
mixing the Flash and Dreamweaver together? Just curious.
Thanks for clarifying.
ComputerkittenIt's the new IE functionality (introduced in the April 2006
patch update for
IE6 and made compulsory by the June 2006 patch update) to
comply with a
ruling against Microsoft's patent infringement.
It's triggered by the <object>, <embed> and
<applet> tags on a page. Flash
is normally imported into a page via the <embed> tag
hence it's affected by
the change. Content imported into a webpage by these methods
is known as
Active Content and now requires an extra click to activate it
and interact
with it.
The workaround ultimately rests with website designers who
are now advised
by Microsoft and Adobe etc to implement the controls for
Active Content in
their sites indirectly via Javascript rather than direct HTML
tags.
If you have DW8, the 8.0.2 updater will insert Flash with
Adobe's
recommended Active Content fix already included in the code.
With any other
version of DW, you'll have to do it manually.
http://support.microsoft.com/kb/912945/en-us
http://www.macromedia.com/devnet/activecontent/
http://www.baekdal.com/articles/Technology/microsoft-ie-activex-update
http://blog.deconcept.com/swfobject/
Some background:
http://en.wikipedia.org/wiki/Eolas
Regards
John Waller -
Adobe Actionscript 1.0 and Coldfusion 8
Hi ,
We are using actionscript 1.0 in our application and as the middle tier we are using Coldfusion MX 7. Now our web applications are working fine.If we upgrade MX 7 to Coldfusion 8 will this integration work fine. Is there any known issues integrating actionscript 1.0 and coldfusion 8.Please helpAS1 !?! So I suppose that you're doing SOAP calls or XML over HTTP ? In that case, there's no compatibility issue between 7 and 8: "ColdFusion MX (6.0, 6.1, and 7) applications should seamlessly migrate to ColdFusion 8."
Hope it helps,
Cyril
Maybe you are looking for
-
Can someone explain why 'Y' = 'N' is not working with PARALLEL Plan? i.e. With the filter like 'Y' = 'N' specified and if PQ is used , it does not return instantly. In fact it reads the entire table. Here is the test case.. Goal is to execute only on
-
HT5299 Thunderbolt to Gigabit Ethernet Adapter
Can 2 Thunderbolt to Gigabit Ethernet Adapters and Ethernet cable be used to create a long Thunderbolt cable?
-
hi is there a place where i can find mapping of EDI messages to that of SAP IDOC message types? ~Suresh
-
ITunes Library does not appear in iDVD
When I open iDVD 6, I don't see my iTunes Library in the Media panel. Actually, I don't see my music library in iPhoto either. How do get other iLife applications to find my library? I tried recreating my iTunes XML file by following these instructio
-
Cannot initiate wi-fi sync from iPad (but can from Mac)
I'm frustrated after reading all the forums and only finding information about how to make your iPad show up in iTunes. That is working fine for me. In fact, I can initiate a wi-fi sync from the Mac. The weird thing is that the iPad still says i n