Very simple ExternalInterface problem :)

Hello world

I have a simple question/problem here that in my opinion should be very easy to fix, but I can't find examples of work there!

What I have now:

A simple .swf with a function that makes a movieclip (ball_mc) moves to the right called when a button is clicked in the html page:

import flash.external.ExternalInterface;
import flash.events.Event;

ExternalInterface.addCallback("sendDataToFlash", moveBall); 

function moveBall():void 

     {
          ball_mc.x = ball_mc.x + 20;
     } 

And in my html, I have the following javascript code:

<script>
function moveBallOnClick() {
getFlashMovie("ExternalInterfaceExample").sendDataToFlash();     }   
</script>

And then I call this function as follows:

<form>
<input type="button" onClick="javascript:moveBallOnClick();" value = "Move Ball" />
</form>

AND IT WORKS BEAUTIFULLY!

It's just a simple button and I have a click and move the movieclip

What I want to do:

Instead of using the button on the form, I just want to do exactly the same thing but with a hyperlink instead.

I use the button on the form in my html code now is because after 5 days of internet research, I just could not find a single example of running only a simple function. They were all examples of the sending of forms of text and so on, so I just simplified there from there.

I want to just do exactly what Im doing now, run the function moveBallOnClick, but not with a form button, just with a normal hyperlink!

Thank you very much in advance for anyone who can take a look at my problem and may offer assistance :)

Good bye

I think that you can just do something like this:

Move the ball

Tags: Adobe Animate

Similar Questions

  • Very simple messaging problem...

    I want to go back to the mac mail view where each piece of e-mail show content, including graphics.  When you scroll to this topic you can see this because it is located in the mailbox.  Hard to describe.  but when we work to add gmail for e-mail, the e-mail screen has changed and I can't find a way to get it back to the old style.

    Hi Revkurtak,

    Thank you for using communities Support from Apple! I'm sorry to hear you're having this problem with your Mac. If you use Mail in 10.7, you can see if the option "available classic use" is selected; It is found in Mail > Preferences... > watch one, near the top of the window. You can try to turn this option on or off and see if you get your favorite Mail view.

    See you soon

  • Never over charge when downloaded, xml, very simple problem Gallery

    Hi all

    I'm havin a very stupid problem atm, I made this slide show very simple wich loads images via an XML file. Everything works very well locally, load slideshow images nice blablabla. But problems when I load up my server, once it is downloaded and I try t o play I get this error:

    [QUOTE] Error #2044: Unmanaged by the IOErrorEvent:. Text = Error #2036: finished loading never. [/ QUOTE]

    It has something to do with the .xml file that I load here as:

    var request_xml:URLRequest=new URLRequest("setup.xml");
    

    I tried to replace it with ("http://www.semagames.be/.../setup.xml" ' "), but then I got a sandbox violation error that is not solvable, unless you get signed (I read that somewhere).

    The way I load the images in XML format:

    <SLIDE_SHOW>
      <PICTURE>ImagesBw/Foto1.JPG</PICTURE>
      ...
    </SLIDE_SHOW>
    

    The file, a great pain in the * ss, can be found here: http://semagames.be/testplaats/kutbucht/BG.swf

    Anyone who can help me out here? would be greatly appreciated.

    your images are tiny extension.  Attach your xml file.

  • Tri - very simple problem, but I can't get it

    Hi, I have a little problem with a sort column.
    I think it's for you, a very simple problem, but for the moment, I can't find the solution.

    My topic:
    SCHLUESSEL
    -----------------
    15
    16
    17
    1501
    1502
    150101
    150103
    150202
    15010100
    15010301
    15020215
    ...

    Correct order is:

    15
    1501
    150101
    15010100

    150103
    15010301

    1502
    150202
    15020215

    16
    17

    have you tried

    order by to_char(SCHLUESSEL)
    

    Ravi Kumar

  • Issue of Migration cold very Simple...

    Hey guys,.

    I'm relatively new to VMWare, infact, I take the vcp - 310 exam tomorrow, lucky me!  In any case, I have a very simple question, basically I can't find all the information on how to do a migration cold or in fact if it is the right solution to my problem.  I rebuilt my server ESX (3.5) and kept the VMFS volume local orginal up thanks to its VMs located on it.  Now, I want to attach them to the newly installed ESX, I can easily create new ones and add the drive but that is not the same, for example will be difference NVRAM, VMX, etc. files.  Is "cold migration" what I'm looking for?  Or is there another way I can fix this?

    Thanks in advance for your help.

    See you soon

    Neilos

    witch hunt... Just find the data store in which the virtual machine is on, browse this data store, find the virtual computers folder and inside you will see a .vmx file.  Right click on that and choose 'Add to inventory' and follow the prompts.

  • Very simple CSS help, borders

    Very little CSS problem. I have a Web page that is a fixed height with blue borders on each side and the bottom. This Web page has a facebook comments box, and I noticed after a number of comments, comments exceed beyond my Web page under my foot. It does because most of comments added to a web page gets more Web page. And my Web page having a fixed height comments started running off the page. The simple solution to this would be at the height of the div to auto or don't have much style to set a height at all. I did this and for some reason when I do this my web page borders disappear. My question is how to make my Web page to extend with comments from facebook without my borders disappear. Example of a page on my site: http://covermyprofile.com/view.php?id=12 & image = http://i1176.photobucket.com/albums/x332/Ja rel20/covers/hiphop/kid_cudi_glasses.jpg

    #bodywrap {
     width: 910px;
     border-left-width: 1px;
     border-left-style: solid;
     border-left-color: #9FD6E1;
     border-right-width: 1px;
     border-right-style: solid;
     border-right-color: #9FD6E1;
     border-bottom-width: 1px;
     border-bottom-style: solid;
     border-bottom-color: #9FD6E1;
     height: 2025px; (if i set this to auto my borders disappear)
    

    Rather than using the property HEIGHT use INFINITY as per

    {#bodywrap}

    Width: 910px;

    border-left-width: 1px;

    border-left-style: solid;

    border-left-color: #9FD6E1;

    border-right-width: 1px;

    border-right-style: solid;

    border-right-color: #9FD6E1;

    border-bottom-width: 1px;

    border-bottom-style: solid;

    border-bottom-color: #9FD6E1;

    overflow: hidden;

    }

    GRAMPS

  • SIMPLE ILLUSTRATOR PROBLEM... HELP PLEASEEE

    INTRO
    Hey if I design a logo for my uni course and its due soon and I need help on something very simple.

    OVERVIEW
    I drew a picture using the online tool, all the lines are connected by creating various forms...

    PROBLEM
    I need to know how to fill it with the color... I don't can slect the forms I want to fill and use the object-live paint-making. but tht means I can fill only... I need to be able to use the NET tool to create effects...

    any help would be greatly appreciated. Thank you

    Problem is when you use the online tool, where the two lines intersect, they remain as separate entities. In other words, the online tool was design to create a line. However if you want to take the time, you can use the point selection tool (one on keyboard in lowercase) slide select the corner where they intersect, right-click, and select attach (windows) (also oppose > path > will work join or ctrl-j), select the type of angle you want, and then click ok. And repeat for each corner.

    When you're done you can give it a fill or a color path and size.

    Or create a new layer (optional: change the color of the path to make it easier to see what you are doing)

    lock the old layer,

    Select the pen tool and click on the top of each corner (point or anchor).

    When you reach the last point, the cursor will change to tell you that you close the path.

    At this point, you can change the size/color fill and path.

  • Very simple question and CVI-program

    Hello

    I just started working with CVI, and as far as I can see, the principle underlying the interaction between various components is similar as in Delphi. I made a very simple example (Application of User Interface), containing a square button and a digital. My idea was to push the button, after which the DIGITAL controller displays a number. However, I can't figure out how to build a change of the function that is executed when you press the button. I tried a double click, right click, etc, but I couldn't understand it. I hope my question makes sense.

    Have you had a look in Chapter 2 of the getting started manual?

  • I'm using vista, and I don't know how to download music and save to flash memory directly. heat the vista. Under XP, it's very simple.

    I use vista media player, and I don't know how to download music and save to flash memory directly. Heat the vista. XP is very simple.

    Hi bojanaana,

    You can access online stores of in windows media player. Once you do, you can download music and video files from online stores.

    For more information please visit the link below
    Shop online in Windows Media Player
    http://Windows.Microsoft.com/en-us/Windows-Vista/shop-online-in-Windows-Media-Player

    Once you download the music or video you can drag and drop the music or video on the USB drive.

    I hope this helps!

    Halima S - Microsoft technical support.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • I need a very simple database system. I am the end user to allend users!

    Original title: database access

    I need a very simple database system. I am the end user to allend users!

    Access is rather dated, but could probably manage it if you own and that you already have a model for what you need.  Just open it and see if all the default options are what you are looking for, and it will put you in automatically:

    If this is not the case, just tell us what your needs are and I'm sure we can make a suggestion

  • My 2015 Indesign is annoyingly slow, wait for wheel rotation for very simple things all the time. Is there a way that I can return to Indesign 2014 please?

    My 2015 Indesign is annoyingly slow, wait for wheel rotation for very simple things all the time. Is there a way that I can return to Indesign 2014 please?

    Hello

    Please see: -.
    http://blogs.Adobe.com/adobecare/2015/06/16/how-to-find-and-install-previous-version-of-ad obe-apps-in-cc-2015.

  • How can I add two very simple Questions to a slide?

    Hello

    I would like to be able to add two very simple questions to a slide, but don't know if (or how) this can be achieved. I've explained this more in detail below:

    ====================================================================================

    Scenario of

    The slide must contain two questions:

    Question 1: with two check boxes for the options Yes and No

    Question 2: with five check boxes for options 1 2 3 4 and 5

    A button (for example named Submit) to verify the responses from users by triggering a tip Action that verifies the radio buttons that have been selected.

    ====================================================================================

    The checkbox Widget looks like it could work for this scenario, because it allows each value to be assigned to a variable. However, when you try to put in place the tip Action I couldn't see all the variables I named in the checkbox Widget.


    If anyone has done this kind of thing before and can offer advice on the best way to create custom questions, I'd appreciate any help.


    For reference, I use 8 Captivate.


    Thank you


    Ross

    I indeed used interactions of checkboxes or radio buttons many times for this kind of slides. That's why I'm confused and I first want to know if you want an answer to the second issue as well? For the first question, it is clear that you need an interaction of option buttons, I don't know if you want to allow more than one choice for the second question. Only when you need to allow more than a choice will you have the interaction of check boxes, in the other scenario, option buttons will do the trick. It makes a big difference, because the radio button widget has only one associated variable that will store the selected element. For the widget checkboxes, you need a variable for each choice.

    Maybe my blog could help clarify, you can also download a descriptive table with all interactions of CP8 training

    Advice - Training interaction - Captivate blog

    BTW, I moved this thread to the Quizzing subspace.

  • In photoshop, I imported an image and put on a transparent background.  It's a very simple picture, like a drawing done in pencil.  How can I change from black to white?  Hope I don't confuse anyone, I don't always word of things well lol.

    In photoshop, I imported an image and put it on transparent background.  It's a very simple picture, like a drawing done in pencil.  How can I change the color from black to white?  I hope that my question is not a source of confusion, that I didn't Word always good things.

    Invert

    Shortcut Ctrl + I or CMD + I

  • Need help very simple drawing spiral overlapping

    I'm surprised that it is difficult to search for on this form. It's a whirlwind, but it is much simpler than the ones you find on a Google search. I'm just trying to draw a very simple line representing almost in a schematic way, a whisp of smoke. Very easy to make a clumsy with the pencil. But I would like a no clumsy. My deep gratitude to all those who can show me why the solution is obvious and I'm just a dope.

    Rob

    smokeSpiral.png

    Hey Rob! Thanks for reaching out. Here is a link to a similar post which can be useful... I think that post #2 will be your best bet.

    Let me know if it helps!

    -Kathleen

  • MS Word opens when I try to get a glimpse of a very simple project

    Hello

    I'm just getting started with Captivate 8. I created a project of a slide... it's very simple, but the text... and tried to preview it. When I click on preview project option, MS Word opens a file called rindex.html and Captivate does not give me the preview mode.

    * I have more than enough disk space

    * I'm saving the project to my office, not a network drive or an external hard drive

    Any ideas what could be causing this?

    Thanks for your help.

    Looks like the HTML files are configurΘ to dΘmarrer with the Word on your system, very weird, but users sometimes do strange things.

Maybe you are looking for