flash - Actionscript display text on screen once an action is performed

So I need to display a text once an action is performed but even though I tried to do so by using dynamic text and labels, I didn't manage to finish my programming due to errors:var group:RadioButtonGroup= new RadioButtonGroup ("Question1");var group2:RadioButtonGroup= new RadioButtonGroup ("Question2");var group3:RadioButtonGroup= new RadioButtonGroup ("Question3");var group4:RadioButtonGroup= new RadioButtonGroup ("Question4");var group5:RadioButtonGroup= new RadioButtonGroup ("Question5");var counterT:int;var counterF:int;submit.buttonMode=t...Read more

actionscript 3 - How can I stop Flash from changing indent when user Clicks on hyperlink in TextField?

I have a TextField which I initialize by setting htmlText. The text has anchor tags (hyperlinks).When a user clicks on the hyperlink, the indentation of the second and subsequent lines in the paragraph changes. Why? How do I stop it?My html has an image at the beginning of the line, followed by the tag, followed by more text. To style the hyper links to look blue always and underlined when the mouse is over them, I do this:var css:StyleSheet = new StyleSheet();css.parseCSS("a {color: #0000FF;} a:hover {text-decoration: underline;}");stepText.s...Read more

actionscript 3 - How can I make something show after clicking in two different buttons in AS3?

I am really new in programming and I need help to solve a little issue, please. I started programming in Adobe Animate CC (ActionScript 3.0) and I want to know how to make a symbol appear only after clicking in two buttons. I can do that with just one button, but I don't know how to make it with two buttons:button.addEventListener (MouseEvent.CLICK, onClick)function onClick (e:MouseEvent):void { graph.visible = true; }Thanks,João...Read more

flash - How to create a EASY custom seekbar for music player in actionscript 3.0

Code in the form of connecting a melody and creating instances ..import flash.events.Event;var mySound:Sound = new MyFavSong();var myChannel:SoundChannel = new SoundChannel();var lastPosition:Number = 0; var myTransform = new SoundTransform();myChannel = mySound.play();myTransform.volume = 1; myChannel.soundTransform = myTransform; stop();And then play buttons, pauses, sound stops + volumeStop stop_btn.addEventListener(MouseEvent.CLICK, onClickStop); function onClickStop(e:MouseEvent):void{ myChannel.stop(); lastPosition = 0; stop()...Read more

actionscript 3 - AS3 SoundChannel/Sound HZ Limit for importing

I have wav files that are at 1411kbs bit rate and varying frequencies. After I import them into the library and give them unique classes based on their frequency and other information (that is why I use getDefinitionByName below).All of my wav files play fine in AS3 that are under 6000hz and 8000hz, however those tones don't play properly. However, they do play properly when clicking the Play icon when in Flash Adobe Animate.I have stripped my code down to the bare essentials to see where the problem lies and still not working properly.My quest...Read more

flash - How can I ignore sound played by my app when looking for activity from the microphone in Air using ActionScript 3?

I am making an app using Air and AS3 where I am looking for noise from the microphone. At the same time I am playing sound through the speakers of the phone, but I want to ignore these sounds from the input of the microphone.I want to know when some external source is making noise and then act upon it, but now my triggers fire when the sound I am playing myself get too loud.Any suggestions?...Read more

actionscript 3 - Adobe Flash/ Animate muting particular audio

I am in desperate need of help! I have a mute toggle button that I made following a tutorial on youtube in Adobe Animate/Flash using action-script 3.0 and it mutes everything as it is supposed to. However, I now need it to only mute the background music as it is muting my videos as well! How can I alter the code to either make sure only the background sound is muted and not the video? function setMute(vol){var sTransform:SoundTransform = new SoundTransform(1,0);sTransform.volume = vol; SoundMixer.soundTransform = sTransform;}var Mute:Boolean = ...Read more

actionscript 3 - looping sound flash as3

I've created a on/off button for sound using Flash AS3. These work but whenever I press the off button and then the on button, the music doesn't play again? I believe it's a looping issue but could I be wrong? I'm not sure what code to use if it is a loop problem.I also need to add code for the btnOn function as when I open the .swf the sound automatically plays.Attached is my current code below:var mySound:Sound = new sandstorm(); //(sandstorm is my sound file)var myChannel:SoundChannel = new SoundChannel();var lastPosition:Number = 0;myChanne...Read more

actionscript 3 - Making sense of soundMixer.computeSpectrum

All examples that I can find on the Internet just visualize the result array of the function computeSpectrum, but I am tasked with something else.I generate a music note and I need by analyzing the result array to be able to say what note is playing. I figured out that I need to set the second parameter of the function call 'FFTMode' to true and then it returns sound frequencies. I thought that really it should return only one non-zero value which I could use to determine what note I generated using Math.sin function, but it is not the case.Can...Read more

actionscript 3 - TypeError 1009 and muting sound in AS3

I'm really new to this, so, I'm really sorry if there is some obvious solution that I've somehow missed, but oh well...I am in the process of making a game, and I was trying to make a character selection menu. Each character would have a unique version of the same song (with the same bps) so that when you were "hovering over" one of the choices, the character's song would play and the other ones would be muted (Not paused or stopped, so as not to lose the synchronisation between all the versions of the song)...Right now, I was trying to program...Read more

actionscript 3 - Sound synthesis: interpolate betweeen frequencies using AS3

I'm a little lost and hopefully someone can shed some light on this.Out of curiosity I'm working on a simple softsynth/sequencer. Some ideaswere taken from the .mod format popular in the golden era of home computers.At the moment it's just a mock-up. Notes are read out from an array holdingup to 64 values, where each position in the array corresponds to a sixteenthnote. So far so good, everything's working as it should and the melody playsjust fine. The problem arises if there's a transition from one note to another.e.g. f4 -> g#4. Since this i...Read more

Music overlapping in Flash Actionscript 3

I'm new with AS3,I'm building a full flash website where I tried to include background music with play,pause and stop button(the play and pause is the same button). The problem is the music player play automatically when the page load and when I click the HOME button of my website the music plays again and overlap with the music that played first, so what should I do..thanks in advancestop();function goHome (e:MouseEvent):void{gotoAndStop("HOME");}home_btn.addEventListener(MouseEvent.CLICK, goHome);function goAbout (e:MouseEvent):void{gotoAndSt...Read more

actionscript 3 - AS3 Code to pause and play "overall" audio in flash (from scene to scene)?

My question is, how to pause the audio in "scene 1" and have it so that when you go to "scene 3" (which has a different audio file attached that is going to be played) it still has the audio in general muted but when you click on the "on" button it plays the respective song of the scene, kind of like how in games you can mute the music at the main menu but then unmute it throughout gameplay;Also in general how would I go about making a play/pause button (I am assuming an "if else" statement might work but not sure)...Read more