Click here to Skip to main content
15,919,500 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionAngular JS Pin
chauhanvatsal30-Jun-14 20:40
chauhanvatsal30-Jun-14 20:40 
AnswerRe: Angular JS Pin
Kornfeld Eliyahu Peter30-Jun-14 21:41
professionalKornfeld Eliyahu Peter30-Jun-14 21:41 
AnswerRe: Angular JS Pin
gaupoit3-Jul-14 5:27
gaupoit3-Jul-14 5:27 
Questionhow to get data from json url ? Pin
Tamil Purushothaman29-Jun-14 20:43
Tamil Purushothaman29-Jun-14 20:43 
AnswerRe: how to get data from json url ? Pin
Graham Breach29-Jun-14 22:18
Graham Breach29-Jun-14 22:18 
Questionmouseout isn't firing Pin
ThetaClear29-Jun-14 1:34
ThetaClear29-Jun-14 1:34 
AnswerRe: mouseout isn't firing Pin
ThetaClear29-Jun-14 23:21
ThetaClear29-Jun-14 23:21 
AnswerRe: mouseout isn't firing Pin
Kornfeld Eliyahu Peter30-Jun-14 1:16
professionalKornfeld Eliyahu Peter30-Jun-14 1:16 
GeneralRe: mouseout isn't firing Pin
ThetaClear30-Jun-14 1:26
ThetaClear30-Jun-14 1:26 
GeneralRe: mouseout isn't firing Pin
ThetaClear30-Jun-14 3:38
ThetaClear30-Jun-14 3:38 
AnswerRe: mouseout isn't firing Pin
Kornfeld Eliyahu Peter30-Jun-14 3:43
professionalKornfeld Eliyahu Peter30-Jun-14 3:43 
GeneralRe: mouseout isn't firing Pin
ThetaClear30-Jun-14 4:22
ThetaClear30-Jun-14 4:22 
GeneralRe: mouseout isn't firing Pin
Kornfeld Eliyahu Peter30-Jun-14 7:11
professionalKornfeld Eliyahu Peter30-Jun-14 7:11 
AnswerRe: mouseout isn't firing Pin
User 483504730-Jun-14 8:41
User 483504730-Jun-14 8:41 
AnswerRe: mouseout isn't firing Pin
Kornfeld Eliyahu Peter30-Jun-14 9:21
professionalKornfeld Eliyahu Peter30-Jun-14 9:21 
GeneralRe: mouseout isn't firing Pin
User 483504730-Jun-14 9:49
User 483504730-Jun-14 9:49 
AnswerRe: mouseout isn't firing Pin
Kornfeld Eliyahu Peter30-Jun-14 9:58
professionalKornfeld Eliyahu Peter30-Jun-14 9:58 
GeneralRe: mouseout isn't firing Pin
ThetaClear1-Jul-14 1:10
ThetaClear1-Jul-14 1:10 
AnswerRe: mouseout isn't firing Pin
DecompileCodex18-Jul-14 21:19
DecompileCodex18-Jul-14 21:19 
QuestionS code to have an image with different clickable points that play sound Pin
Jennifer Estrada26-Jun-14 13:27
Jennifer Estrada26-Jun-14 13:27 
I have a code that works, but I need to find another way of writing the JS. The code has 1 image, but 4 mp3 for sounds. There are different dots on the image that when you click on the dots should be a different sound.

html part:

XML
<html>
<head>
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <title>OdysseyWare</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="" ie="8">
    <link href="/globmedia/ow/css/main_2012_12_12.css" rel="stylesheet">
    <link href="/globmedia/ow/css/curric_2012_12_12.css" rel="stylesheet" type="text/css" media="screen">
    <link href="/globmedia/lib/jquery-ui/css/jquery-ui-1.8.4.custom.css" rel="stylesheet" type="text/css">
    <link href="/globmedia/lib/jquery/css/magnific-popup.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/globmedia/lib/jquery/js/jquery-1.9.1.js" type="text/javascript"></script>
    <script type="text/javascript" src="/globmedia/lib/jquery-ui/js/jquery-ui-1.10.3.custom.js" type="text/javascript"></script>
    <script type="text/javascript" src="/globmedia/lib/requirejs/js/require.js" type="text/javascript"></script>
</head>
<body id="body">

    <div id="section_0" style="margin: 0px auto; width: 970px">
        <div class="presentation">
            <presentation>
                <div class="section">
                    <h3>Test 1 New</h3></div>
                    <p>However, the introduction and conclusion to "The Way to Wealth"   show that the author’s
            advice is presented in a somewhat ironic way. While the crowd that has gathered to listen to
            Father Abraham agrees with him until the "vendue," or sale, begins, they forget the old man’s
            and begin to "buy extravagantly."</p>
                    <p style="TEXT-ALIGN: center">
                        <div id="test1" data-asset-basepath="media/html5" data-data-basepath="media/html5" data-media-basepath="/globmedia"  data-am-controller="media/html5/test1/js/test1.js"  style="border: 1px solid black; margin-right: auto; margin-left: auto;"></div>
                    </p>
                </div>
            </presentation>
        </div>
    </div>

    <script type="text/javascript">
        require.config({
            baseUrl:'/globmedia'
        });
    </script>

    <script type="text/javascript" src="/globmedia/html5/animationmanager/js/animationmanager.js"></script>
</body>
</html>


js part

C#
/*globals require */
(function(doc){

    'use strict';

    return function init(){

        var _this = this;

        //require in the require module itself and creatjs
        require(['createjs','SimpleInteractiveAnimationModule', 'jquery'],function(c, _anm, jq){
                        var queue = [{id:_this.id + 'audio1',src: _this.assetBasePath + '/test1/media/roles-1_olderMen.mp3', type:'audio'},
                        {id:_this.id + 'audio2',src: _this.assetBasePath + '/test1/media/roles-1_youngMen.mp3', type:'audio'},
                        {id:_this.id + 'audio3',src: _this.assetBasePath + '/test1/media/roles-2_olderWomen.mp3', type:'audio'},
                        {id:_this.id + 'audio4',src: _this.assetBasePath + '/test1/media/roles-2_youngWomen.mp3', type:'audio'},
                        {id:_this.id + 'image1',src: _this.assetBasePath + '/test1/media/roles.png', type:'image'}];

            var pointsNum = 4,
                pointsArray = [],
                pointColor = '#0040ff';

            var pointsObject = {

                point1:{
                    x:382,
                    y:102},

                point2:{
                    x:146,
                    y:172},

                point3:{
                    x:455,
                    y:102},

                point4:{
                    x:312,
                    y:245},

            };

            var anm = _anm.getNewInstance();

            anm.createSimpleInteraction({parentContainer:_this.element,
                                        queue:queue,
                                        copyright:'2009',
                                        callback:setupClickPoints});

            function setupClickPoints(){

                for(var i = 0; i < pointsNum; i++)
                {
                    var tempNum = i + 1;

                    var clickPointShape = new c.Shape();
                    clickPointShape.graphics.beginFill(pointColor).drawCircle(0,0,16).endFill();

                    var clickPoint = anm.createSimpleButton(clickPointShape, getClickPoint(i));

                    anm.updateContainer(clickPoint,{x:pointsObject['point' + tempNum].x,
                                                    y:pointsObject['point' + tempNum].y,
                                                    alpha:0.01});

                    pointsArray.push(clickPoint);
                }
            }

            function getClickPoint(audioIndex){
                return function(event){
                    anm.playAudio(audioIndex);
                };
            }

        });

    };
}(document));



I just need a different JS code.
Thank you
AnswerRe: S code to have an image with different clickable points that play sound Pin
Kornfeld Eliyahu Peter29-Jun-14 1:50
professionalKornfeld Eliyahu Peter29-Jun-14 1:50 
Questiondevextreme mobile apps call webmethod return only html source code Pin
Member 938843524-Jun-14 16:29
Member 938843524-Jun-14 16:29 
QuestionI am having problem invoking form fields from my js. Any ideas? Pin
samflex24-Jun-14 4:32
samflex24-Jun-14 4:32 
AnswerRe: I am having problem invoking form fields from my js. Any ideas? Pin
Pablo Estrada24-Jun-14 4:57
Pablo Estrada24-Jun-14 4:57 
GeneralRe: I am having problem invoking form fields from my js. Any ideas? Pin
samflex24-Jun-14 5:11
samflex24-Jun-14 5:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.