Javascript desde Flash

Hola:
Estoy usando javascript desde mi Flash 8 P. La
instrucción es simple y todos
sabemos lo que hace:
getURL("JavaScript:ventana=window.open('pagina.html')");
Este código lo coloco en el evento Press o Release de un
botón.
El asunto es que este código tiene un comportamiento en
IE y otro, por
ejemplo, en SAFARI. El comportamiento que espero es el que se
produce en
SAFARI. El navegante presiona el botón y se abre la
ventana nueva pero el
Flash en el que se encuentra el botón sigue ahí.
En cambio, en IE, luego de presionar el botón,
además de abrirse la ventana
nueva, la ventana donde se encuentra el botón carga una
página en blanco que
sólo dice [object]
Esto es un misterio y no sé cómo resolverlo.
Cualquier comentario puede ayudarme.
Muchas gracias.
Federico

Estimado Juan:
Muchas gracias por tu mensaje.
No soy un teórico de los lenguajes de programación
y seguro que sé mucho
menos que vos en este aspecto y en varios otros. Pertenezco a
una generación
reciente de programadores que no han pasado por la
educación formal pero que
tienen ya, a pesar de eso, algunos logros en su trabajo.
Sin confrontar, te voy a efectuar algunas preguntas y voy a
hacer algunos
comentarios. De acuerdo a lo que sé sobre lenguajes
orientados a objetos,
void forma parte de la definición de una función,
por ejemplo void mifuncion
(void) sería una función que no retorna un valor
(tal vez deberíamos
llamarla procedimiento) y que tampoco recibe parámetros.
Esto está muy
claro. El asunto es que void aparece en la definición de
la función, pero
nunca he visto que se utilice para llamar a la función.
De hecho, si la función open del objeto window no
retorna un valor en
javascript, te menciono que no he visto en ninguna
página en la que se use
esta función que se lo haga con el operador VOID. Ahora
bien, estamos de
acuerdo en que es un error desde el punto de vista de la
sintaxis con que se
debe escribir la función y estamos de acuerdo en que
varios vicios de los
programadores se han ido consolidando con el tiempo, no
debería Flash
indicarme que hay un error en el modo en que coloco la
función, sobre todo
considerando que esta no funcionará correctamente en
algunos navegadores?
Estas son algunas de las preguntas que me hago.
Gracias por tu ayuda!!
Federico
"Juan Muro" <[email protected]> escribió en el
mensaje de noticias
news:[email protected]...
> Ante todo mis excusas, Federico: Podría
interpretarse por el comienzo de
> mi anterior mensaje que te reprocho no estudiar, lo que
nunca fue mi
> intención. Pretendía con ello decir que este
es un problema bastante
> básico, pero mis palabras no fueron las correctas.
Repito, mil perdones.
> Precísamente porque la instrucción nativa void
indica que la función no
> retorna un valor, es por lo que es adecuada en este
caso. De otra manera
> el server puede (y debe) interpretar que existe un
objeto -en este caso un
> objeto ventana- esperando respuesta de la funcion.
> No es que los ingenieros programadores que hicieron
Flash no supieran de
> esto (no es cosa de flash en este caso sino del
javascript al que se llama
> desde una función de Flash), sino de la manera de
programar:
> A la manera ortodoxa, por decirlo así, de utilizar
los lenguajes de
> programación le llamamos 'strict data typing', o en
mal castellano 'tipado
> estricto de datos'. Mediante esta manera los
programadores nos obligamos a
> definir en las funciones el tipo de datos que manejamos
y los retornos de
> las funciones, so pena de obtener en los depuradores
(debugers) de los
> compiladores de código, unos errores que impiden la
compilación. ¿Para qué
> asumimos estas nuevas obligaciones?, pues precisamente
para detectar y
> poder evitar errores como el que comentamos.
> Pero algunos lenguajes de programación comenzaron
su andadura sin tener
> presente los estándares de programación, por
lo que la implementación del
> strict data typing era imposible. Action Script, por
ejemplo, solo lo
> consiguió a partir de la versión 2 del
lenguaje -con Macromedia Flash 8- y
> muchos otros andan aún en ello.
> Lo que sucedió durante la elaboración de IE es
algo tan confuso, y repleto
> de injerencias empresariales que nada tienen que ver con
los lenguajes de
> programación, que sería demasiado largo de
contar. No obstante
> desconocemos el código C++ en el que está
implementado IE, ya que forma
> parte del sistema operativo windows, con el que se haya
profusamente
> entrelazado, y no solo es secreto y privado sino
secretista y privativo.
> Mozilla Firefox interpreta bien tus intenciones de abrir
una nueva
> ventana, aunque hayas 'escrito mal' (de manera poco
ortodoxa, quiero
> decir) la instrucción. Esto sucede porque, hartos
de encontrarse con este
> problema, terminan por asumirlo e implementar en su
navegador el código
> que interpreta tu órden de la manera más
habitual, pero ello no significa
> que sea Mozilla el que funciona de la manera correcta
(de hecho es IE el
> que lo hace), sino que Mozilla ha tapado este parche tan
frecuente y ha
> asumido con ello una mala práxis de algunos
programadores.
> Salu2
> `8¬]
> Juan Muro
>
> "Federico" <[email protected]>
escribió en el mensaje de noticias
> news:[email protected]...
>> Estimado Juan:
>>
>> Te aseguro que estudio bastante, pero insisto en mi
teoría de que el
>> mundo de la programación es sumamente arduo. He
preguntado en foros dónde
>> hay personas que saben mucho más que yo y no
supieron qué decirme.
>> Conozco lo que hace la instrucción VOID, mi
pregunta es, y qué importa lo
>> que hace en este caso? Esa instrucción indica
que la función no retorna
>> un valor. Me pregunto si la gente que hizo Flash y
la que hizo IE no lo
>> saben, si la función no retorna un valor no me
explico porque tengo que
>> utilizar una instrucción que indique eso. Me
parece que es Mozilla el que
>> funciona de manera correcta.
>> Te mando un saludo.
>>
>>
>> Federico
>>
>>
>> "Juan Muro" <[email protected]> escribió
en el mensaje de noticias
>> news:[email protected]...
>>> No Federico, no es difícil, solo hay que
estudiar. El void es la orden
>>> de no retorno en muchos lenguajes de
programación, no solo en java y
>>> javascript. Con ella le indicamos a la
función que no tiene que
>>> devolvernos un valor de datos. Lo extraño
del caso es que la
>>> bien-interprete Microsoft, que siempre se ha
distinguido por su
>>> programación farragosa y su falta de
ortodoxia en las sintaxis de los
>>> lenguajes, y sin embargo sí que cuele en
Mozilla y otros, que respetan
>>> más los estándares.
>>> Ya ves que nada es verdad ni es mentira, todo se
ve según el color del
>>> cristal con que se mira.
>>> Salu2
>>> `8¬]
>>> Juan Muro
>>>
>>> "Federico" <[email protected]>
escribió en el mensaje de noticias
>>> news:[email protected]...
>>>> Juan:
>>>>
>>>> Mil gracias, justo ayer, después de dos
o tres semanas de investigar,
>>>> encontré a alguien en Internet dando el
mismo consejo que vos y así
>>>> pude resolver el problema. Que difícil
es programar no?
>>>> Saludos.
>>>>
>>>>
>>>> Federico
>>>>
>>>> "Juan Muro" <[email protected]>
escribió en el mensaje de noticias
>>>> news:[email protected]...
>>>>> Hola Federico:
>>>>> A la función de javascript le debes
meter un void para que no retorne
>>>>> datos de objeto, tal que, por ejmeplo,
así:
>>>>> on (release) {
>>>>> getURL
>>>>>
("javascript:void(window.open('../HTML/pop_up2.htm','popup','toolbar=no,menubar=no,scroll bars=no,resizable=no,width=400,height=550'))");
>>>>> }
>>>>> Salu2
>>>>> `8¬]
>>>>> Juan Muro
>>>>>
>>>>> "Federico"
<[email protected]> escribió en el mensaje de
>>>>> noticias
news:[email protected]...
>>>>>> Hola:
>>>>>>
>>>>>> Estoy usando javascript desde mi
Flash 8 P. La instrucción es simple
>>>>>> y todos sabemos lo que hace:
>>>>>>
>>>>>>
getURL("JavaScript:ventana=window.open('pagina.html')");
>>>>>>
>>>>>>
>>>>>> Este código lo coloco en el
evento Press o Release de un botón.
>>>>>> El asunto es que este código
tiene un comportamiento en IE y otro,
>>>>>> por ejemplo, en SAFARI. El
comportamiento que espero es el que se
>>>>>> produce en SAFARI. El navegante
presiona el botón y se abre la
>>>>>> ventana nueva pero el Flash en el
que se encuentra el botón sigue
>>>>>> ahí.
>>>>>> En cambio, en IE, luego de presionar
el botón, además de abrirse la
>>>>>> ventana nueva, la ventana donde se
encuentra el botón carga una
>>>>>> página en blanco que sólo
dice [object]
>>>>>> Esto es un misterio y no sé
cómo resolverlo.
>>>>>> Cualquier comentario puede ayudarme.
>>>>>> Muchas gracias.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Federico
>>>>>
>>>>
>>>
>>
>

Similar Messages

  • FL+DW: Pop up desde FLASH, no me da bola...

    mmm.... bueno... eso no me da bola el pop up... debe ser que
    estoy fuera de
    trainnig...
    quiero que al hacer clic en un boton de flash se me habra una
    ventana de
    html, busque en internes muchas maneras de hacerlos (en en
    realidad son toda
    smas o menos iguales), pero estoy casi seguro que el problema
    es de los
    navegadores (IE6 y FIREFOX) ¿que les parece? ¿me
    falta algun codigo?
    los codigos que usé son los siguientes:
    en el boton de flash:
    on (release) {
    getURL("javascript:openNewWindow('simple.html','thewin25','height=\r\n270,width=310,toolb ar=no,scrollbars=no')");}y
    en el head del html:<script language="JavaScript">function
    openNewWindow(URLtoOpen, windowName, windowFeatures)
    {newWindow=window.open(URLtoOpen, windowName, windowFeatures);
    }</script>Muchas gracias!Ale Photoshop

    Gracias juan, era eso lo que quería saber...
    "Juan Muro `8¬}" <[email protected]>
    escribió en el mensaje
    news:[email protected]...
    > Ale:
    > En el botón de Flash has puesto una llamada a un
    javascript, pero Flash no
    > es un intérprete de Javascript, solo se comunica
    con él, por éso tu swf
    > debe estar dentro de un html para que te abra la popup.
    Además, existen
    > una serie de restricciones de seguridad, que se han
    implementado mucho en
    > Flash 8, para evitar el robo de bandwith, y por ello tu
    archivo debe estar
    > colgado en tu dominio para que funcione.
    > Salu2
    > `8¬}
    > Juan Muro
    > ": : Ale Photoshop : :" <[email protected]>
    escribió en el mensaje
    > news:[email protected]...
    >> ehh... si , ese lo di por acentado...
    >> pero sabés que me pasó? si lo subo al
    servidor me funciona ¿que puede
    >> ser?
    >>
    >>
    >> "XL" <[email protected]> escribió en el
    mensaje
    >> news:[email protected]...
    >>> Te falta el código del htm o php donde
    está la peli que embebe el fla
    >>> que contiene el botón que lanza el pop up.
    Supongo que es que se te
    >>> lvidó ponerlo ¿no?
    >>>
    >>> Saludos, XL
    >>>
    >>> ": : Ale Photoshop : :"
    <[email protected]> escribió en el mensaje
    >>> news:[email protected]...
    >>>> mmm.... bueno... eso no me da bola el pop
    up... debe ser que estoy
    >>>> fuera de trainnig...
    >>>> quiero que al hacer clic en un boton de
    flash se me habra una ventana
    >>>> de html, busque en internes muchas maneras
    de hacerlos (en en realidad
    >>>> son toda smas o menos iguales), pero estoy
    casi seguro que el problema
    >>>> es de los navegadores (IE6 y FIREFOX)
    ¿que les parece? ¿me falta algun
    >>>> codigo?
    >>>>
    >>>>
    >>>> los codigos que usé son los siguientes:
    >>>>
    >>>> en el boton de flash:
    >>>>
    >>>> on (release) {
    >>>>
    getURL("javascript:openNewWindow('simple.html','thewin25','height=\r\n270,width=310,toolb ar=no,scrollbars=no')");}y
    >>>> en el head del html:<script
    language="JavaScript">function
    >>>> openNewWindow(URLtoOpen, windowName,
    windowFeatures)
    >>>> {newWindow=window.open(URLtoOpen,
    windowName,
    >>>> windowFeatures); }</script>Muchas
    gracias!Ale Photoshop
    >>>>
    >>>
    >>>
    >>
    >>
    >
    >

  • Migration of Google Maps Javascript to Flash

    Hi,  I am trying to gather information on how to migrate a heavily Google Maps based website
    Mapped Travel from pure Javascript to Flash. I was wondering if there is a good migration guide out there, if there are any limitations (performance, compatibility, functionality, etc.)? Maybe there are even scripts to help me automate the migration?  Thanks for any comments, Ralph

    You use ExternalInterface.addCallback to enable calling a function from JS.
    Here, this tutorial has everything you need: http://www.viget.com/inspire/bi-directional-actionscript-javascript-communication

  • Javascript in flash throwing IE pop up error

    Im trying to open a new window in my browser from my swf
    file. In my swf file i have this basic code:
    on (press) {
    getURL("javascript:NewWindow('/OutsideLinkWarning.cfm?ButtonText=Continue&LinkTo=http://ho me.clarkeamerican.com/www/reorder.cfm',
    'Terms','590','350','no','no','no','no','no')");
    When i click on the button when previewing the file in IE it
    causes a pop-up error.
    Other links throughout the site open a new window, leading to
    the same page as the link above, using this code in the html page:
    <area target="_blank"
    onclick="NewWindow(this.href,'Terms','590','350','no','no','no','no','no');return
    false;"
    href="/OutsideLinkWarning.cfm?ButtonText=Continue&LinkTo=http://home.clarkeamerican.com/w ww/reorder.cfm"
    a="" coords="3,219,166,245" shape="rect"/>
    it works without any errors. Why would an error be thrown
    through my flash swf?

    The pop-up flash has a tiny catch-hook which holds it down.  When the camera (or a manual operation) wants to pop it up, a solenoid release the catch-hook and the spring should pop it up.
    You shoul hear the clicking sound of the solenoid releasing the catch a few times before the camera gives up and displays the error message.
    It means the pop-up flash is jammed... possibly a bit of dust, sand, or gunk is gumming it up so it can't flip up.
    Using your fingers, gently pull up on the flash either while pressing the flash pop-up button or just pressing the shutter button in a sitaution where the camera would call for flash.
    Once opened, you can use a bit of compressed air on the hinge points to see if you can clear the problem.  You'll probably notice the hinge is stiff and doesn't pop-up on its own.  
    I have seen suggestions to use WD40 -- but frankly wouldn't get that stuff near my camera.  If there is gunk, you could use denatured alcohold to dissolve whatever is gumming up the works.  The advantage of the alcohol is that it'll evaporate on its own. 
    Tim Campbell
    5D II, 5D III, 60Da

  • Javascript rendered flash problem

    Hi,
        I'm doing something kind of funky to facilitate some functionality.  I've got a client that has some camtasia style demos he wants to play of his product.  Problem is he wants the demos to play on top of the website and then have the ability to click a button to turn off the demo.  Now I've done that and it works great locally but when deployed to the server the flash based demo doesn't play until the entire object is downloaded.  In reality that's probably how it's working locally as well.  
        You can see the results by going to http://www.wbsus.com/beta/  click on the "view video demo" on the left side there in the circle.  A small submenu will popup click on one of the first two and you'll see what I mean.  If you wait long enough for the entire demo to download it'll start.  There IS a preloader in this swf but it's not firing because the flash object doesn't play until the entire swf is downloaded.  Locally the preloader fires up just fine.
    Below is a snippet of the code used to add a demo to that page dynamically via javascript.
    document.getElementById(
    "DemoMenu").style.visibility = "hidden";
    var 
    newdiv = document.createElement('div');
    newdiv.setAttribute(
    'id', 'ReceivingDemoII');
    newdiv.style.zIndex = 820;
    newdiv.display =
    "block";
    newdiv.style.position=
    "absolute";
    newdiv.style.top=
    "0px";
    newdiv.style.left=
    "30px";
    newdiv.style.visibility=
    "hidden";
    newdiv.style.backgroundColor=
    "#FFFFFF";
    document.body.appendChild(newdiv);
    html=
    "<input type='button' value='Close' onclick='closeReceivingDemoII()' />";
    html+=
    "       May take up to 90 seconds to load demonstration.<br/>";
    html+=
    " <OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' WIDTH='1024' HEIGHT='790'>";
    html+=
    "<PARAM NAME=movie VALUE='" + returnPlace + "Demos/wbsreceiving.swf'>";
    html+=
    "<PARAM NAME=quality VALUE='high'>";
    html+=
    "<EMBED src='" + returnPlace + "Demos/wbsreceiving.swf' quality='high' WIDTH='1024' HEIGHT='790' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'>"
    html+=
    "</OBJECT>";
    html+="<br /><br />";
    html+=
    "<input type='button' value='Close' onclick='closeReceivingDemoII()' />";
    newdiv.innerHTML = html;
    document.getElementById(
    'ReceivingDemoII').innerHTML = html;
    document.getElementById(
    'ReceivingDemoII').style.visibility="visible";
    So I dynamically create the div.  Append it to the DOM.  Add the inner html that defines the object.  "returnPlace" is a field that may or may not depending on where the site is hosted,(localhost, production,beta), return a prefix like in this case http://www.wbsus.com or http://www.wbsus.com/beta.   This was done to assure that the object path was complete.  
    So after all that.  The demo plays, it just sits and waits for the entire demo to download and then the object starts to play.   It's like active-x is keeping it from playing until the entire object is downloaded because there is a working preloader in this flash object.   Behavior is the same in Firefox and I.E..  Thanks for any and all help!
    Randy

    Kind of right but the solution was a bit odd but it works and that's l I care.   The solution was to put a javascript delay in making the div visible.  If the div is rendered immediately like the code in my original post does, the object for some reason is not allowed to activate (play) until it is completely downloaded.  If however the div is rendered as hidden, and then a delay happens and then the div is made visible.  The browser has enough time to render the div and then recognize that there's an active-x component there, and take the appropriate action when the div is activated (made visible)  so I added
    currentDivToPlay = "(whatever was just built)"
    setTimeout(
    'turnOnGeneralDemo()', 700);
    and the function
    function turnOnGeneralDemo(){      document.getElementById(currentDivToPlay).style.visibility=
    "visible";}
    With the delay for the browser all works well.

  • Faces expression in Javascript?  Flash/Flex and Faces Session Variables

    Does anyone know how to add a faces expression in Javascript?
    I basically want to pass a Faces Variable to Flash/Flex. The best way to do that would be in Javascript.
    I thought it would be fairly easy. Something like:
                        <webuijsf:script binding="#{Page1.script1}" id="script1" >
                            function foo() {
                              var text = #{Page1.textField1.text};
                              alert(text);
                        </webuijsf:script>Or something like that, and hope that the Faces expression will be expanded before sent to the browser. Unfortunately, that's not happening:
    SEVERE: Servlet.service() for servlet Faces Servlet threw exception
    org.apache.jasper.JasperException: /Page1.jsp(16,38) #{..} is not allowed in template textWhen ran in the HTTP context of NetBeans.
    Edited by: Neelixx on Apr 5, 2008 4:42 PM - Clarified using more javascript example

    Have a look at Shared Objects, I think these are the sort of
    thing you are after. I think the "Specifying a path" subtopic
    should be particularly relevant for sharing the variables/objects
    between the two swf files.
    Livedocs
    - Shared Objects

  • Embedding JavaScript into Flash

    Can someone please tell me is it possible to embed some
    JavaScript into a .fla file?
    The reason I ask is because I am doing a major project in
    which I have decided to create an Intelligent Help Desk in
    Macromedia Flash. In it I aimed to implement SitePal but it is only
    now I find out it uses JavaScript.
    I don't want to be rude but I need a reply as soon as
    possible as the matter requires some urgency.
    Any help is greatly appreciated.
    Niall

    ghgjjjk wrote:
    > Can you please tell me the process I need to carry out
    in order to achieve that?
    sorry, don't really have time. If you are publishing for
    flash 8, check
    out the documentation for the ExternalInterface class as this
    is the
    best method so far available for getting flash to communicate
    with
    JavaScript and vice-versa.
    Otherwise, if you're publishing to flash player 6.0.65.0 or
    higher check
    out the Flash/Javascript integration kit, which can be found
    here:
    http://weblogs.macromedia.com/flashjavascript/
    I also have a working demo of this on my site here:
    http://www.moloko.f2s.com/gateway/
    if publishing to flash player version earlier than 6.0.65.0,
    you will
    have to use getURL("javascript:"); - check out the
    documentation in
    flash for getURL()
    MOLOKO
    Macromedia Certified Flash MX 2004 Developer
    Macromedia Certified Flash MX Developer
    ::remove _underwear_ to reply::
    'There ain't no devil - it's just God when he's drunk' Tom
    Waits
    GCM/CS/IT/MC d-- S++:- a- C++ U--- P+ L++ !E W+++$ N++ O? K+
    w+++$ !O M+
    VMS? PS+++ PE- Y PGP+ t+ 5-- X-- R* tv++ b++++ DI++++ D+ G e
    h-- r+ y++

  • How to pass a value to javascript from flash using externalinterface

    hi,
    i'm currently trying to call a javascript function and pass values to it. but i'm not really familiar in using the addcallback since i only tested on calling a function from flash without passing anything to the function.
    Basically, i'm going to retrieve the values of a node from xml.
    and then i will assign those values to a variable in flash.
    now what i'm going to do next is pass this value to a javascript parameter..is it done using externalinterface?
    Could anyone give me an example.
    I just need to throw the value to the javascript function parameter and no return values to the actionscript.
    The event is that whenever an image is click, the corresponding value for each image is passed to the javascript function.
    here is my unfinished script.
    function imageClicked(e:Event):void {
        for each (var imageURL:XML in xml.images.link_to)
            ExternalInterface.call("TestButton",imageURL);
    thanks so much in advance.

    first, it seems that the 'TestButton' funciton in JS will be called several times when an image is clicked - for each loop in the 'for each' loop you wrote.
    second, in order to test the communication between AS and JS, try starting with something simple, like -
    ExternalInterface.call('alert', 'OK');
    if this doesn't work try tracing the ExteranlInterface.available property/
    if it does work, place an alert within the 'TestButton' in the JS code, to see its actually being called.
    and so forth...
    good luck,
    eRez

  • Javascript to Flash communication

    I m using ExternalInterface.addCallback function to call
    flash function from javascript.
    It is working properly when i test it locally but as i put it
    on server it display nothing.
    this is my javascript function that calls flash function: -
    <script>
    function javascript_to_flash() {
    alert("before flash function call.");
    window.document.moviename.flashFunc();
    alert("after flash function call.");
    setInterval(javascript_to_flash()', 6000);
    </script>
    this is my flash function: -
    function flashFunc()
    _root.textbox.text= "flash function called \n";
    ExternalInterface.addCallback("flashFunc", null, flashFunc);

    Take a look at the fscommand function under Help.
    Here is an example:
    "The following example applies fscommand() to a button in
    Flash for the purpose of opening a JavaScript message box in an
    HTML page. The message itself is sent to JavaScript as the
    fscommand parameter.
    You must add a function to the web page that contains the SWF
    file. This function, myDocument_DoFSCommand(), waits for an
    fscommand() call. When fscommand() is triggered in Flash (for
    example, when a user clicks the button), the command and parameter
    strings are passed to the myDocument_DoFSCommand()function. You can
    use the passed strings in your JavaScript or VBScript code in any
    way you like. In this example, the function contains a conditional
    if statement that checks to see if the command string is
    "messagebox". If it is, a JavaScript alert box displays the
    contents of the fscommand() function's parameters string.
    function myDocument_DoFSCommand(command, args) {
    if (command == "messagebox") {
    alert(args);
    In the Flash document, add fscommand() to a button:
    fscommand("messagebox", "This is a message box called from
    within Flash.")
    You can use expressions for the parameters of the fscommand()
    function, as shown in the following example:
    fscommand("messagebox", "Hello, " + name + ", welcome to our
    website!")
    To test the SWF file, select File > Publish Preview >
    HTML. If you publish your SWF file using the Flash with FSCommand
    template (in the Publish Settings dialog box, select the HTML tag),
    Flash inserts the myDocument_DoFSCommand() function automatically.
    The SWF file's NAME and ID attributes will be the filename. For
    example, for the file myDocument.fla, the attributes would be set
    to myDocument."

  • Popup window with javascript in flash

    Hi everyone ;)
    I wonder if there´s available some code/tutorial which
    would make a "javascript call" and pop up what could bring some
    content into a new window in actionscript 3. I have a actionscript
    2 code for popup window but obviously it´s not working on my
    website project because of the wrong flash type :| So do you know
    how to make these kinds of pop up windows in as3?
    http://flashden.net/files/42875/index.html

    i am now down to only 1 error. How the script looks and the
    only error generated are below.
    on (release) {
    getURL("javascript:newWindow=
    window.open('
    http://websitemedia.net/playground/ferrioni/sandbox/ferrioniaddress.html','popper1',
    'width=425,height=300,scrollbars,resizable');
    newWindow.focus(); void(0);");
    error below:
    **Error** Symbol=contact, layer=Layer 1, frame=1:Line 5:
    String literal was not properly terminated
    newWindow.focus(); void(0);");

  • Javascript and Flash

    I am trying to create a pop up window from flash using
    javascript. I got this code but I keep getting an error message.
    Can anyone tell me what's wrong with this?
    Any help greatly appreciated.
    article.onRelease = function() {
    getURL("javascript:NewWindow=window.open('scans/phagArticle.jpg','newWin','width=895,heigh t=1210,left=0,top=0,
    toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No');
    NewWindow.focus();
    void(0);", _blank);

    TaylorTay619,
    >I am trying to create a pop up window from flash using
    > javascript. I got this code but I keep getting an error
    > message.
    What's the error message you're getting?
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • Javascript and Flash Forms

    I am trying to do some Javascript with a Flash Form and it is
    failing. I have a field with a value in the field name so I dont
    have to use labels. I know with Javascript that onFocus, the field
    will clear. Is that possible in a Flash Form.
    Don

    Use actionscript, like so
    <cfinput type="Text" name="txt_box" value="Initial Value"
    onFocus="txt_box.text=''">
    For readability the onFocus is
    " txt_box.text = ' ' "
    Ken

  • Javascript and Flash (defining variables properly)

    OK, I'm curious if from flash can you call client side
    JavaScript functions that exist outside the flash?
    I'm trying to get something to work (there's another post
    about it on here) but when I click the submit button, it doesn't
    seem to be trying to call the javascript function with the
    information I have the flash module collecting... any
    ideas/help?

    Well, now I have it working somewhat, but the variables I've
    defined along the way aren't being passed through. I guess my new
    question would be how to properly define the variable and collect
    the information as the user goes through, then call it into the
    function at the end when they click the submit button.
    Example... right now I have people click their selection and
    the button is supposed to collect that variable selection and send
    them on to their next selection option:
    on (release) {
    a="Bare";
    //Movieclip GotoAndPlay Behavior
    this.gotoAndPlay("37");
    //End Behavior
    Then they do that a few more times with different options...
    At the end, when they click submit, this is what happens:
    on (release) {
    var strProductCode = "'" + a + "','" + b + "', '" + c + "',
    '" + d + "'";
    var strJavaScriptCall = "javascript:SubmitCustomBoot(" +
    strProductCode + ");";
    getURL(strJavaScriptCall);
    But the info going to the cart is missing the variables.
    Obviously, I'm not getting those collected properly.
    Ideas??? :)

  • Javascript - embed flash

    I can embed the flash with UFO just fine but I can't stop it from looping. For some reason loop:"false" won't work
    <!--uses ufo object to play flash in a website-->
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
    <title>Getting my flash on</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <script type="text/javascript" src="ufo.js"></script>
    <script type="text/javascript">
    var FO = { movie:"gts1.swf", width:"350", height:"400", majorversion:"7", build:"0", wmode:"transparent", loop:"false"};
    UFO.create(FO, "ufoDemo");
    </script>
    </head>
    <body>
    <div id="ufoDemo">
    <p>Replacement content</p>
    <p><a href="http://www.macromedia.com/go/getflashplayer"><img src="http://www.macromedia.com/images/shared/download_buttons/get_flash_player.gif" alt="Get macromedia Flash Player" style="border: none;" /></a></p>
    </div>
    </body>
    </html>Edited by: shawgh on Oct 2, 2008 4:31 PM

    shawgh wrote:
    I know, they're similar so I was just hopingNo, they are not particularly similar at all (even if you claim that twice ;-)
    Java and JavaScript are far more different than their names suggest. The main thing they have in common is a superficial similarity in syntax.

  • How do I add JavaScript to Flash Pro

    I have a GoDaddy certification seal that is JavaScript. Anybody have any thoughts as how to incorporate into my Flash website?
    Thanks

    you can use javascript in your swf's embedding html.

Maybe you are looking for

  • Enabling Simultanious Analog and Digital Audio Signals

    My apple TV runs through a Yamaha receiver. It is hooked up with component video and digital audio cables. I also need to hook analog audio to my receiver so it can play outdoor speakers through zone 2 (which only recognizes analog signals). Zone 2 d

  • Trigger IDOC_OUTPUT_ORDRS using custom program.

    Hello. I have a requirement to send an order response (ORDERS05) IDoc by calling FM IDOC_OUTPUT_ORDRS using a custom program.  Wanted to know if anyone had suggestions on the best approach.  We are using much of the native mapping and adding a few se

  • How to get stack.xml for EHP2 Netweaver BI 7.0 Upgrade without SolMan?

    Hi Experts, We are planning for BI 7.0 EHP2 upgrade from BW 3.5 SAP_ABA u2013 6.40 - 24 SAP_BASIS u2013 6.40 - 24 PI_BASIS - 2006-1-640 - 8 SAP_BW u2013 3.50 - 24 To Target version of NW BI 7.0 EHP2, In SAP Support Package Stacks, Itu2019s not showin

  • ITunes not playing songs

    Hey all! So, I bought a song on iTunes and none of my devices (iPod, phone, computer). When trying to play it on my computer, I have to sign in to authorize the computer, which I already have it authorized. and it doesnt do this any other purchased s

  • Polygon Applet?

    Please Help with this the applet is not working i tested the html file and it works fine, but there is something wrong with the applet. I am new to this stuff so I need your help. Much appreciated The requirements: Write an applet that lets the user