Posts

flash - actionscript on/off sound not working properly -

Actually I have two buttons on / off. If I click on the button more than once, the sound is off The button does not work any more, so I can not stop the sound. Can someone help? Import flash.media.Sound; Import Flash. Media. Sound channel; Import flash.events.MouseEvent; Var mySound: Sound = New Classical_seend (); Var myChannel: SoundChannel = new soundchannel (); MyChannel.stop (); Soundon_btn.addEventListener (Mouse Event. Paste, Sound); Function soundon (Event: MouseEvent): Zero {myChannel = mySound.play (); } SoundOFF_btn.addEventListener (MouseEvent.CLICK, soundOFF); Function Voiceoff (Event: Mouse Event): Zero {myChannel.stop (); } Why is this happening because every time you call MySound .play () A new SoundChannel object is generated to play back the sound and that function comes back from the call. So if you say it twice, the most recent voice channel object is stored in your myChannel variable; However, any first soundchannel that was generated was lost be...

javascript - How to show console output on webpage? -

When I go to websites like codecademy or JSBin, I have notice that they allow you to see console output. how does it work? Just to clarify, let's assume that a user typed it in a text box console.log ('hello'); How do I create output on the actual web page and not just the browser's console? As Shahar has mentioned, the way to see output on the actual web page is in a DOM object For example, if we create a single output for output and make it output using jQuery: HTML: & lt; Div id = "output" & gt; & Lt; Div & gt; Javascript using JavaScript: // Your example output is var string = "Hello"; // Add output at the end of the output function () ($ ('# output'). Append (string + " & lt; br / & gt;);} above Example output will be output code in string and line break whenever whenever the outputToPage () function is called. Please note that you can use jQuery's .append ( ) To work...

java - Update parent size -

I have a function that should update the size of all the parents of a overall When children are added to do this, but this is not working here, my code is: Private zero growth size (composite child, overall parent) {parent.layout () ; Rectangle child's post = child Bats (); Rectangle parentPosition = parent.getBounds (); Int parentY = parent.to Display (parentPosition.width, parentPosition.height) .y; Initiative = Children Display (childposition.width, childposition.height) .y; If (childY> parentY) {int heightDifference = childY - parentY; Parent.setSize (parentPosition.width, parentPosition.height + heightDefence + 5); System.out.println ("guardian y:" + parentY + ", child y:" + childY); } And {return; } Parent.layout (); Parent.setVisible (true); If (! (Original example shell)) increase (size, parent, parent.getParent ()); }} If I extract the line in if -statement ( (parent, parent.getParent ()); ) more code main: public class exam {/ p...

python 2.7 - ttk Checkbutton select and readonly? -

I am using Python 2.7, is there a way to select / deselect a checkout in TT ?? Also read it as well? I am trying to display the option selected from a file. I understood myself, the right syntax would be something like this Self.name = ttte Whitelist (self-propaganda, text = 'mone') self Mon.state (['selected']) self.mon.grid (column = 0, row = 0) I've seen it on some sites, but stop their syntax, This is the right way to do it!

jquery - Anchor Links Changes Based on Site/Device Width? -

Therefore, on my website, I am using a smooth scroll and I will use an anchor ID in the context of scrolling points on the page I am using The anchor code is simple, like this: & lt; An id = "about" & gt; & Lt; / A & gt; And it works while using a regular href, though, I noticed that when I was on my phone, when the anchor links were pressed, it would give me a random point , And not on the exact location of the anchor on the page. It seems that this change in every device (for example, some above the anchor, some devices will fall down on the width) This is just a basic JavaScript, making anchor point Is there a way complete?

Undo git branch --track remotes/origin/X -

जीआईटी शाखा --सेट-अपस्ट्रीम का उपयोग इस संदेश में हुआ: द - सेट-अपस्ट्रीम झंडा नापसंद है और हटा दिया जाएगा। इसके बारे में सोचने और क्रिया-ऑब्जेक्ट को संभालने के बिना, मैंने तब कोशिश की - Git शाखा - ट्रैक रिमोट / मूल / एक्स इसके परिणामस्वरूप स्थानीय शाखा एक्स ट्रैक करने के लिए शाखा रिमोट / मूल / एक्स सेट अप किया गया अरे, मैं जो चाहता था वही नहीं। रिमोट को ट्रैक किया जाना था, ट्रैकिंग नहीं करना मैं इसे कैसे पूर्ववत कर सकता हूं और दूरस्थ शाखा को कुछ भी न ट्रैक करने के लिए सेट कर सकता हूं। तकनीकी रूप से आपके पास नहीं है कुछ भी करने के लिए: आपने remotes / origin / X नाम की एक नई स्थानीय शाखा बनाई है, जो बहुत भ्रमित है लेकिन वास्तव में मना नहीं है (यह शायद अस्वीकार कर दिया जाना चाहिए), और वह स्थानीय शाखा स्थानीय शाखा एक्स । (यदि आपने रंग चालू किया है, तो आप इसे git branch -a आउटपुट में देख सकते हैं: remotes / origin / एक्स काला हो जाएगा जबकि वास्तविक दूरदराज की शाखाएं लाल रंग में होंगी।) इस बिंदु पर करने के लिए सबसे सरल बात यह है कि, वह उस भ्रामक रूप से न...

How to automatically update connected parts of json with angularjs -

I have the next Jason structure: {"item": [{" {"Name": "item 1"}, {"name": "item 2"}, {"name": "item 3"}], "group": [{"name": "group 1", "item" : ["Item 1" "item 3", "item": {"item2", "item": ["item 2", "item 3"]}, {"name": "group 3", "item" : ["Item 1", "item 2"]}] } As you can see in your groups, I have the names of items I group There is no way in angular angles to automatically update objects, when it comes special Tom's name changes (what's the way to connect to particular parts of the json model?) Thanks. You can set a deep $ watch for each item in the item array. When the item changes, then repeat on the group item, and replace the old name with the new name: angular .forEach ($ scope.model.items, function (item) {$ sco...