Android :: Air App - Music Does Not Turn Off When User Leaves App
Dec 30, 2011
I have a AS3 Android Application that is playing background music but when the user leaves the application, the music still is playing in the background. Is there a method to call that senses the user leaving the application so that I can turn off my music?
I'm getting no errors on this, Go (comeback) is my movie clip which should turn up when the mouse leaves the stage area and leave when the mouse enters the stage. I know it's probably my removeChild command but I don't know how to fix it.
I am creating a website that should have music playing abilities. (Sounds cool that way lol). I have a music player MovieClip and in it, it has some actions. It is placed on a frame on the main timeline. I also have an actions layer that has some code controlling other contents of that page on the site.
The music player works fine but when I leave the frame which the music player is loaded on the main timeline, the music keeps playing. How do I stop it?
I have been working on a tool for use in our office which creates XML. The problem is if a user leaves any of the text fields blank, I get only the end tag, for example </text>. This only happens if a text field is blank. Does anyone have any suggestions as to how to handle this. Do I have to check every field for data? I am at home now so I can not post the code right now. But basically, I set a variable which holds the XML structure and is filled in with variables from the text fields.
I am trying to work out if FMS is the solution I am looking for. I am trying to create a system that will store data, and upload it to a database when the user leaves the page. I thought the best way to achieve this would be to send a data object to the media server, check on an interval to see if the user is still active and then somehow upload the data when their "session" times out.
I know how to turn music on/off but I now want to find out how to do the following. On 50cent.com, you can select from a variety of songs, then play the one you wish. I want to know how to do that, with the buttons changing the songs, then being able to press play, and stop. Could someone tell me how to do this, or redirect me to a tutorial that will teach me. I have flash mx, so you could post a flash mx tutorial if you wish. Another example is shown on West49.com, but I dont need to know how to open the playlist option they have. Just a simple left and right button changing the songs, thena a play and a stop button.
Is it possible to have one button the toggle my 'my_sound.setVolume();' between 0 and 100. I'm having a hard time getting the as correct, but here is my idea:
I have a number of different music selections on each on their own layer. Is there a way to simply turn off the sound in a layer so I can test different music tracks without having to delete the layer and drag a new sound in? In short when I preview my movie all of the sounds play at once but is there a way to simply turn off the sounds in each layer to test each music track separately.
I have a website that reloads same flash swf on different pages. It has music attached to the swf file. My question is how to make people turn off music on a single page and when they look at other pages, the pages remain 0 volume, and when they turn on the music on a single page, it globally turn on all other swf files music.
I have a bunch of areas on a map that I've turned into buttons. When the user does a MOUSE_OVER on a button, I'd like an info box to show up so they can see some information. So far, I've created my info boxes as movies clips with fade-in/out tweens between frames.
Recently I came across a long and details blog post or tutorial about creating a music player for air on android, but the audio management was with a native extension.I didn't bookmark it, I have searched quite a bit and I just cant find it again!!!It was only 2 or 3 weeks ago.
I need to make the cursor turn into to a hand when the user is with the mouse over the movie clip. when I use the following code the entire movie turns into to a hand but I just want it on my movie clip.
I'm trying to do that when the user touch (not click with mouse the program runs on androidthe code gets the (position of) touch x and y (like _xmouse but it dosen't work on ndroid) How can I do it?
I am fairly new to actionscript 3, and coding in general, and I am trying to build a music application with a user account system, using which each different user can access their own music files.
I have found many tutorials online on how to create music players and playlists, user login systems, but nothing that combines these into one application.
I have some question, Please check out this two site. [URL] My question is how this is done? Both in the front end and back end. How does the system recognize which music to play when the timeline hit in the front end. And how does the backend compile the DIY music file for the user to download. It just so dynamic.
I have a site that includes a Flash music player integrated into the layout. I want users to be able to navigate around the site without interrupting the music. I've done plenty of research and thinking and the following are the options I came up with (keeping in mind I want to be as SEO friendly as possible).
AJAX: I set up a version that changes the main content div to whatever nav link they click, thereby not interrupting the Flash player. I set it up in the proper search-engine-friendly manner with direct links and JQuery/Ajax functions. If someone goes to site.com/ and clicks the Contact nav link, it loads what's in the main content div on site.com/contact.php into the main content div and changes the URL bar to site.com/#Contact. The same goes for if they go to site.com/contact.php and click About in the nav, it loads the About content and changes the URL bar to site.com/contact.php#About. Obviously this opens up a whole new can of worms with AJAX and hash navigation/history issues, and I would end up with people possibly linking to things like site.com/contact.php#About (which I think looks terrible and can't be too great for SEO). Store the Flash player vars somewhere and reload them with the page: I'm not sure how to go about this, but I thought about keeping my regular navigation without AJAX and have it so when a user clicks a nav link, before it changes pages it stores the Flash player vars (current song and song position) somewhere, then loads them into Flash when the new page loads. Something with an iframe? Good alternative to a Flash player that will work for this type of application?
So I am a complete novice at actionscript as was evident in my attempts to figure this out on my own. I have the following code to control the "Songs" section of my website and I would like the following features:
1. Not have the music automatically start when the user enters the frame. (I thought this was due to line 3 code but it still played after I deleted that code)
2. Add a "Back" button to go back 1 song.I currently have it set up with the following code on my "Songs" Page:
I have a service that uses computer webcam via Flash. Now I'd like to develop an Android optimized version of the service using HTML5 + Flash and then use some HTML5 wrapper to get an app.
I wonder if it's possible to use the same ability of Flash that provides an access to user's phone camera (frontal) on the Android (tablet pcs, smart phones). I know Android supports Flash since 2.2, but I failed to find any information on hardware access.
I am trying to use the Flash + Set the browser to a desktop agent on the Galaxy Tab.
mWebview.getSettings().setUserAgentString("Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.11) Gecko/20101019 Firefox/3.6.11"); mWebview.getSettings().setPluginsEnabled(true);
So the issues is, when the UserAgentString param is enabled, flash player wont load as many websites like Iplayer don't recognise the browser in the WebView.
This may be a bug in the Samsung browser. Anyone have any desktop agents that the WebView will accept whilst enabling flash?
I'll start off by saying I'm a newbie, just putting that out there. How do you make a turn by turn multiplayer flash game? I don't know if an engine is made in AS3, PHP, Javascript, or whatever,I made my game already, it's just that it isn'tmultiplayer yet. Basically, there are lines, and each player crosses out a number of lines, and the last player to cross out a line is the loser. I want it where one user crosses out some lines, then presses End Turn, then the other does their turn and then presses End Turn to allow the other player to move his cursor. But how can I get both players to see the same frame and only have one player have the ability to move the cursor during a turn? Is there some easily adaptable multiplayer engine for flash for newbies out there
I want a site to have background music, but when I attach the music to the file it makes it quite large ...3 meg and the site is slow to load. Is there any way of having the music separate from the flash file and still have start stop music buttons?
I'm working on an animation where I have my "dog" fighting the evil vacuum cleaner. I got most of it to work the way I want it to.
1) I have movie clips entitled pepper_mc (where my dog is supposed to be walking), swirl (where a swirly-type symbol is supposed to spin over the dead vacuum's head), and vacuum_mc (where the evil vacuum is supposed to have a swinging arm (called vacuumarm_mc) that I created using the bone tool). When I add them to the stage and test them, the animations within the movie clips don't happen.
2) I have background music that I'd like to stop playing at the end of the animation, but I'm not sure how to do that. (using the stop(); actionscript doesn't help).Where am I going wrong? I'm using Flash Pro CS5.
Here's the file --> Pepper and the Vacuum of DOOM!
When the movies performs the getURL action, I want the music to continue playing, but the getURL function seems to stop the music at frame 152 (where the getURL action is placed), when I wanted the music to continue to frame 257 (the end of the movie). I hope I've explained this clearly
I am trying to create a music animator. It will have bars that move up and down do the beat of the music. This is like windows media player where the music animations play. I want it to be verticle bars, where some are in sync with like the base and others are in sync with the tempo. Does anyone know of a tutorial for this? I am trying to emplement it within my website so that whatever music I am playing will auto control the bars and sync.
I downloaded a flash template and have modified it to suit our company but there is something that I can't do. When the file loads in the browser, music immediately plays and loops until you click a button to stop the music. On our video page, we have video that we need to play that has sound in it. How do I get the background music to stop when my video plays without having to go up and stop the music manually. The videos are loaded via an external XML document and there are no buttons in the FLA file to link code to. the website is [URL]
I am streaming music from my site using flash, but after the 3rd music is done, it just stops. Do i have to flush something or create a new music object for each 3 songs?
I have 'Sound On' and 'Sound Off' buttons on mutiple scenes and I am playing the music loop in my flash movie by loading an external swf. When I move to the next scene the sound reloads which I do not want. How do I use an if-statement that checks whether or not the music.swf, that needs to be loaded is found and when it is found, go to a frame?
i have an AIR android app which i am running on an android device ( samsung TAB ). i want the app to get laid out in landscape mode when the user starts the app holding the device in landscape ( same goes with portrait ).
but the AIR app always gets started in portrait mode irrespective of the way the device is held.
i tried the following ways use stage.deviceorientation (but when the app starts (after the applicationComplete notification ) the value is UNKNOWN) use stage resize event. (this gets triggered at start itself, a manual resize is not required - the values are based on portrait mode though - the width is 600 and height is 1024 (should have been otherway) )
i get correct values when i try changing the orientation of device, only at the startup i see problem with the required values.