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??? :)

Similar Messages

  • 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

  • Issues with JavaScript and Flash in Mozilla

    I'm wondering if any of you have seen this, and if there's a
    fix?
    I have flash content that plays in both IE and Mozilla (read:
    NS, FF), and I am able to send it commands to play, stop,
    gotoFrame, etc. However, while in IE I am able to access
    percentLoaded() from the flash object, in Mozilla, the javaScript
    simply hangs. No errors, no crashes. Just stops. The rest of the
    browser (and new javascript events) continue to function.. but the
    original javascript is halted, like it's waiting for a response
    that never comes. I have noted other methods where I am expecting
    to get something /back/ from Flash also not working. Ideas?
    Much thanks,
    -Bez

    You're welcome.
    The only workarounds to this problem is going back to Safari 4,
    You can revert to 4.0.5, instructions here.
    http://appletoolbox.com/2010/06/downgrade-from-safari-5-0-to-safari-4-0-5/

  • 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 AC fix

    I'm in the process of upgrading an older site with Flash
    content and have run into an issue with the Active Content 'fix'
    script.
    I have a Flash movie that pauses on load and only plays when
    the user clicks an HTML page button which triggers the Play()
    action via JS.
    If I allow DW8 to implement the AC code fix, this then
    prevents the Flash movie from responding to the JS event.
    Can anyone please advise what changes I should make to my JS
    code in order to target the movie correctly with the AC fix
    implemented?
    My current JS event code is as follows (which works OK
    without the AC fix):
    onClick="window.document.myMovie.Play();"
    All advice gratefully received!

    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 8 publish

    Hi there,
    I am trying to close a browser window and am able to do so by
    using either of the attached code without changing the security
    settings of the player. I have to go to security settings and
    choose the options "always allow" and also browse to the file that
    I am trying to execute the code. I am publishing in flash 8. Is
    there a way to by bass the security settings or is there a
    different way to execute this code with out having to alter the
    security settings?
    Thanks dee

    <param name="allowScriptAccess" value="always" />
    Ah....I see put this in html and it works perfect.

  • Javascript and Flash method works on Firefox?

    Hi all. I saw an example where you can you a movieobject and
    the TGotoLabel() method to jump to a specif flash label through an
    html. It works in IE, but it doesn't in Firefox. Is this supported
    in Firefox at all, or what should I do.
    Thanks!

    This is what you should see under "plugins" in Opera:
    Make sure Flash Player is listed and enabled.
    It comes from the same place as the plug-in for Firefox, so one won't work if the other doesn't.
    If that doesn't work, try a clean install. http://forums.adobe.com/message/4041846

  • About how javascript and actionscript exchange data

    I am a new one to Flex,
    my system need web page(html) exchange data with Flash(flex),
    because the data is not only a value, so need define a
    strucure to transfer the data.
    i dont know which type of data usually worked between
    javascript and action script?
    hopecan get some suggestion.
    is the xml object can be used here?
    hope can get detail suggestion.
    some example would be great!
    thanks!
    bellow is my project status:
    I have use write a simple program to success exchange data
    between flex(actionscript) and html(javascript),
    now i need design some structure to transfer data between
    action script and javascript.
    in my project:
    there is some text areas in html page, and other text areas
    in flash,
    we called text areas in html page is groupA text areas
    text areas in flash is groupB text areas.
    each textarea in GroupA has a corrosponding textarea in
    GroupB.
    1.
    when a textarea's text changed(this textarea is in
    groupA/GroupB)
    the corrosponding textarea's text must change
    inmidietely(textarea in GrroupB/GroupA)
    2.when falsh add a new textarea, html page must add a
    corrosponding textarea.

    HI!
    Not sure where are you stuck with this, if you already have
    been able to comunicate with javascript and flash it measn you
    already have used the external interface and you should know you
    can send any kind of data to flash, this includes XML or even
    serialized objects.
    I haven't test how big the data you can send to or from
    javascript can be, but what i've done sofar works pretty good with
    any value.
    If you are not using the externalInterface but the old
    fscommand() then you should read the external interface
    documentation:
    http://livedocs.adobe.com/flex/2/langref/flash/external/package-detail.html

  • About how javascript and onscript exchange data

    I am a new one to Flex,
    my system need web page(html) exchange data with Flash(flex),
    because the data is not only a value, so need define a
    strucure to transfer the data.
    i dont know which type of data usually worked between
    javascript and action script?
    hopecan get some suggestion.
    is the xml object can be used here?
    hope can get detail suggestion.
    some example would be great!
    thanks!
    bellow is my project status:
    I have use write a simple program to success exchange data
    between flex(actionscript) and html(javascript),
    now i need design some structure to transfer data between
    action script and javascript.
    in my project:
    there is some text areas in html page, and other text areas
    in flash,
    we called text areas in html page is groupA text areas
    text areas in flash is groupB text areas.
    each textarea in GroupA has a corrosponding textarea in
    GroupB.
    1.
    when a textarea's text changed(this textarea is in
    groupA/GroupB)
    the corrosponding textarea's text must change
    inmidietely(textarea in GrroupB/GroupA)
    2.when falsh add a new textarea, html page must add a
    corrosponding textarea.

    HI!
    Not sure where are you stuck with this, if you already have
    been able to comunicate with javascript and flash it measn you
    already have used the external interface and you should know you
    can send any kind of data to flash, this includes XML or even
    serialized objects.
    I haven't test how big the data you can send to or from
    javascript can be, but what i've done sofar works pretty good with
    any value.
    If you are not using the externalInterface but the old
    fscommand() then you should read the external interface
    documentation:
    http://livedocs.adobe.com/flex/2/langref/flash/external/package-detail.html

  • JavaScript and PS CS6: Performance issue

    Hi folks
    I have to admit we are stuck in our development: We have written a Phothoshop Plugin unsing extensive JavaScript and Flash Panels / Action Script.
    The Javascripts would, eg. select a given layer. When running the Javascript in PS CS5 or 5.1 everything is smooth and snappy but we've noticed, that the same JavaScript running in PS CS6 takes up to 300% more time.
    Does anyone having observed the same performance issues?
    Would it be faster to address the specific layers by their native Layer ID's rather than their names?
    Why is there such a performance slow down with the same JavaScripts / ActionScript-FlashPanel between CS5 and CS6?
    We have already contacted [email protected] (we are solution partner silver) but they do not start acting if you are using your own JavaScripts....
    You are our last hope :-( 
    I can send you some of the code but I don't want it to be publicly exposed here.
    Thanks in advance,
    Andrash

    Hi, since nobody bothers to answer we might have to find out ourselfs.
    Maybe it is caused by the way we address layers throug the script?
    Which method are you using?
    Are you addressing the layers directly or are you just cicling throug an array of layers?
    Are you pointing for the layers by their native ID or rather their layer names?
    How do you trigger the script: by another script? From a flash panel (Flex / Action Script)?
    We are using Flash Panels to start the script. The script simply calls a layer by it's name (a numerical ID that we apply to the layer). The script shall look up that specific layer and check if there is some content on the layer. We created a logger to see where the heavy amount of time is consumed and it seems, that it is while jumping to the layer.
    In CS5 that was all a matter of a split second. Now in CS6 it takes a couple of seconds (4sec.). We asked ADOBE Techsupport for help, but they didn't even bother to look at the problem since we are working with self written code (as every developer does.....?!?!). I wonder what techsupport is good for if not answering techical problems like this one.
    I hope that, with your answers we might circle in the cause of the problem!
    Cheers,
    Andreas

  • Flash Wrapper and Accessing user-defined variables

    I am working on creating a Flash AS3 wrapper to combine several cpativate files.  I am able to retrieve system variables, however I am not able to retrieve user-defined variables.  I have a user defined variable in my Captivate called passedScore, in my Flash script I have the following...
    var mcLesson1:MovieClip;
    btnHit.addEventListener(MouseEvent.CLICK, test);
    var vLoader:Loader = new Loader();
    vLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);
    vLoader.load(new URLRequest("untitled1.swf"));
    function swfLoaded(e:Event):void {
    mcLesson1 = MovieClip(vLoader.contentLoaderInfo.content);
    vLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, swfLoaded);
    addChild(mcLesson1);
    function test(event:MouseEvent):void
              feedback1.text = mcLesson1.cpInfoCourseName;
              feedback2.text = mcLesson1.m_VarHandle.passedScore;
    feedback1 correctly shows the course name, however, for feedback2 it errors saying a term is undefined (refering to m_VarHandle)

    try using mcLesson1.cpEIGetValue('m_VarHandle.passedScore');

  • Custom Quiz: How to update and report user-defined variable?

    Hello,
    I am a novice Captivate 5.5 user.  Thanks to Lilibiri's blog and articles, I have managed to built a custom quiz (all with user-defined variables and advanced actions). 
    The quiz is composed of 2 questions with 4 possible answers each.  Each of the 4 answers have a different score attached to it (i.e. answer a = 4 points; answer b = 3 points; answer c = 2 points; answer d = 1 point).  I have inlcuded a "Feedback Slide" that may appear after each question.  For example, if a person chooses score d, they will get sent to a Feedback slide that basically says they are wrong.  There is a "back" button on the "Feedback" slide that can take them back to the the prior question sllide and they can change and re-submit their answer.  After they have answered both question slides, they continue to a "Results" slide.  Upon entry to the "Results" slide, using "advanced actions" my user-defined variable adds up all of the scores to get a total.  Based on this total, one of three possible text captions boxes appear, depending on their total.  And....here are my questions (I have checked and re-checked the Forum and blogs for answers - and I am so sorry if I missed them!!) 
    1) I have defined a variable that totals the points that the person received on the quiz.  I would like this variable displayed on the Results slide.  It can get it to  appear in a Text Caption Box.  BUT if a person changes a score and re-submits the score before entering the "Results" slide, the total score reflects EVERY score that the person has chosen (the scores that they originally chose and then changed are still included in the total).
    2) I want the total score a person gets on the quiz reported to the instructor.  I don't know if a user-defined variable can be reported and how to go about doing this.  We will be running our quizzes on an LMS (though we haven't chosen one yet).  I tried using a system variable (cpQuizInfoPointsscored), but I believe (after reading discussions on Forum), it will not work in my quiz if my scores are adjusted/changed.
    3) another question - would you like me to put this in a separate discussion?   I certainly can!!  There is a "Back" button on the "Results" page.  I have tried using "advanced actions" and "on success: move to last slide visited" but neither option will allow the user to move to the last slide visited.  Ideally, I would liek a person to be able to go back through the quiz, look at their answers and adjust them.
    Thanks in advance for your help!  I have learned SO much in the last few weeks from all of you!

    Hello and welcome to the forum,
    That is a lot of questions, thanks for reading my blog. The most difficult part is indeed the reporting in case, you did see perhaps that I have not yet published the blog post about reporting questions with partial scores, third part of my reporting sequence. Have two possibilities that I'm exploring: either with Javascript, or with the brandnew Master Widget that Rod is pointing to. Watch out for the blog post(s), but need some more time. So no real answer to your second question for the moment, because you cannot control the quizzing system variables with advanced actions.
    About your first question: you will have to so sort of 'reset' when re-entering the question slide, so that the total score stored in the user variable is decremented with the score attributed to the user in his previous answer. This means that you have to store this previous score in another user variable. Hope this make sense?
    I do not get the last question totally. Are you using the default Score slide? You have to allow Backwards movement in the Quiz Preferences, but for default Question slides this will not allow the user to change his answer. I thought you were using custom question slides? Do not use the default score slide in that case, but create your own score slide, so that you can add buttons and actions to your wish. Perhaps I misunderstand your question, and it would be better to explain more, eventually in another thread if it is about the default score slide, question slides.
    Lilybiri

  • How can I tell if Adobe Flash is installed properly and upto date version?

    How can I tell if Adobe Flash is installed properly and upto date version?
    Hi Guys and girls, hopefully an easy question for you.
    I installed Adobe flash and lightsource last night, cos I needed it to run Weebly website maker.
    Anyone know if Weebly runs correctly on 10.9.1??
    I have a new comp, so no previous version of flash on here, I am running OSX 10.9.1
    I just want to know How I can tell if Adobe Flash is installed properly and is the upto date version?
    Where do I go in the comp to find out,
    If I type in Adobe flash into search it only brings up flash manager, when I click this it is an uninstaller program.
    Lightsource shows in finder apps.
    If I type in flash player it shows up in plugins with a version number see screen shot.
    Where would I go to check for updates for things like flash on my comp?
    Thanks Team,
    Jason in oz.   :?):)  

    1. Safari > Preferences > Security > Internet Plug-ins
        Allow Plug-ins
    2. Go to this Adobe site to check. You will see the animation above the tree.
    How to know whether AdobeFlash Player is installed
    http://helpx.adobe.com/flash-player.html?promoid=ISMRY

  • Bind and Define Variable

    Hi,
    Can anyone explain the difference between these two variables and their usage?
    Thanks in advance.
    Regards,
    Vipin

    Hi,
    993280 wrote:
    Hi,
    Can anyone explain the difference between these two variables and their usage?
    Thanks in advance.
    Regards,
    VipinThe short answer is: Bind variables exist in Oracle. Define variables don't.
    Perhaps you're thinking of SQL*Plus Substitution Variables , such as column_root in the example below:
    DEFINE  column_root  = age
    SELECT  pk
    ,       &column_root
    ,       &column_root._old
    FROM    table_x
    ;Substitution variables are strings that SQL*Plus (or some other front ends, but I'll just say SQL*Plus) looks for in your code before sending it to the database. They act like editing macros: you can use a sstitution variable for almost any text in your statements. When SQL*Plus fins the variable name, it replaces it with the variable value, so, in the example above, it changes the text that you wrote to:
    SELECT  pk
    ,       age
    ,       age_old
    FROM    table_x
    ;and then passes that transformed statement to th database to be executed.
    Bind variables can only represent a single value in one of the recognized datatypes, such as NUMBER or VARCHAR2.
    See the SQL*Plus mnual for more about substitution variables.
    Bind variables are documented in the manuals for the different places where you might use them; for examle, ithe PL/SQL manual.
    Edited by: Frank Kulash on Apr 2, 2013 8:08 AM

  • Defined variable and substitution variables

    Are both of these internally treated in the same way by the Oracle database?
    for example a defined variable
    DEFINE p_grade = a
    and if I use a substitution variable p_grade
    DECLARE
    p_grade VARCHAR2(10);
    v_name VARCHAR2(10);
    BEGIN
    SELECT last_name
    INTO v_name
    FROM employees;
    WHERE job_id = &p_grade
    END;
    Edited by: user6287828 on Feb 24, 2009 10:52 AM

    Hi,
    What you're calling a "defined variable" is nothing but a substitution variable.
    DEFINE  p_grade = ais just one way of setting the value of the substitution variable p_grade.
    When you later use that variable, for example
    WHERE job_id = &p_gradethere is no way of telling how p_grade got its value (if it has one).
    Avoid using the same name for two different types of variables.
    For example:
    DECLARE
        p_grade VARCHAR2(10);   -- Local variable declared
        v_name VARCHAR2(10);
    BEGIN
        SELECT  last_name
        INTO    v_name
        FROM    employees
        WHERE   job_id = &p_grade;    -- Substitution variable used
    END;In the second line, you are creating a local VARCHAR2 variable called p_grade that is never used. It has nothing to do with the substitution variable p_grade (unless the value of that substitution variable happens to be p_grade,
    DEFINE  p_grade = p_grade)
    If you do use the same name for differnt types of variables, SQL*Plus may keep them straight, but no one else (including you) will.

Maybe you are looking for

  • Error when calling a hosted WCF in Service Application anonymously

    Hi, I have a WCF service hosted in SharePoint 2013 service application, I am able to call this endpoint when i am logged in but after i enabled the anonymous access in sharepoint, i am not able to call the WCF endpoint and the error that i am getting

  • JTable Double-Object in the clipboard

    Hello together, this is my first posting here. I've a JTable with Double-Objects. The Double-Objects in the JTable Cells are shown in the Format *1.000,99*. I used a Renderer to Format the Value in the Cells. If I use the STRG+C to Copy the Table Cel

  • Export and import the internal table

    Hi, Could you explain the total internal table data how we export and import please give me example. Thanks, Hari

  • Upgrading 4.6 C to ECC 6.0

    Hi, Our company is currently looking into upgrading to ECC 6.0 from 4.6C. I would like to know what is required for upgrading 4.6C to ECC 6.0. Is ECC 6.0 and add-on from 4.6 C or does it overwrites 4.6C? For your information, we are using SAP HR and

  • Virtual servers tab returns error after using jdk 1.4

    Hi, I configured Iplanet 6.0SP5 to use SDK 1.4.1_02 and all apears to work, EXCEPT the "virtual servers" tab. When clicking this tab I receive "page cannot be displayed" errors. Additionally, the logfile reports the following (see below). Any ideas o