ActionScript 3.0 :: Handle Back, Menu And Home Button On Android?
Aug 15, 2011I'm developing an Adobe Air 2.6 app for android tablets (using ActionScript 3.0 and Flash Builder 4.5).I want to know how can I handle user back key press.
View 1 RepliesI'm developing an Adobe Air 2.6 app for android tablets (using ActionScript 3.0 and Flash Builder 4.5).I want to know how can I handle user back key press.
View 1 RepliesI have two questions:
1.Where is the Adobe Air for Android (or Flash for Android) or Adobe sanctioned mobile development forum?
2. I am developing a Flash/AS3 app for Android.
I've created an swf file in After Effects and uploaded it to my website. It works fine, HOWEVER. when you click onto another menu tab and then switch back to Home the swf has dissapeared.To see for yourself look at [URL]
View 9 RepliesI've created an andriod app in flash and need it to exit when the user clicks the home button. I found the following actionscript 3 online
// Check if we are on a Android / iPhoney device.if(Capabilities.cpuArchitecture=="ARM"){ NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, handleActivate, false, 0, true); NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE , handleDeactivate, false, 0, true);
[code]....
However I'm getting errors at lines starting with "private function handle" saying "The private attribute may be used only on class property definitions."
I would not have asked the question if I owned an iphone, but so far I only have an android phone for development.
The question is: Should I use the View.viewMenuItems that are provided by flex mobile? Or should I better embed the functionality in another way? I don't know what possibilities might exist on iphone to open the menu, because it has no hardware button "menu".
By the way: How could I open the menu in the Flash-Builder mobile device emulator - there are no buttons, too..
I'm developing an Adobe Air 2.6 app for android tablets (using ActionScript 3.0).
I want to know how can I handle user back key press.
I read somewhere there is a specific Adobe Air SDK for Android, but I read it on a forum from 2010.
I'm trying to add a back button once I click a main menu button then remove the back button once it is pressed. I get the title error.
[Code]...
I'm working on a little project where I have a list of working text I converted to buttons and scituated vertically along the left hand side of the stage. Each button when pressed, triggers a different image with some text. This all works great. The problem is that I have a "Back to Main Menu" button located at teh bottom center of the stage. When depressed, I want this button to clear out the image and text on the stage and leave the user looking at just the original list of buttons along the left hand side of the stage.
I can easily get the main menu button to do this for my first image and text. Here's the code for that:
gbtext_btn.addEventListener(MouseEvent.CLICK, playGearbox);
menu_btn.addEventListener(MouseEvent.CLICK, stopGearbox);
function playGearbox(event:MouseEvent):void { gearbox_mc.visible = true;
[Code].....
i need to fire separate method for individual menu item clicked ,so that individual item can handle separate method.and i need know what all the properties are available in menu item like type="radio".
<mx:MenuBar id="jj" labelField="@label" itemClick="MenuItemClick(event)" x="23" y="228">
<mx:XMLList>
<menuitem label="File">[code]......
I have a menu for a website I'm making that consists of buttons that play a drop-down menu movie clip when the mouse moves over them. The problem is, if the user moves the mouse off the button the movie clip stops playing and disappears. I would like it so that if the user moves the mouse away from the button, the drop-down movie clip will reverse itself from its current position and move back up into the button.I've been trying to use the on (rollout) condition, but it doesn't seem to do anything.
View 1 RepliesI've got a slight problem with a drop down menu.. Obviously ha. Whenever I click to drop down the menu that works fine; however, when I roll over a button in the menu it scrolls back up..
[Code]...
I've also attached the fla to view in cs4 and cs3 formats.
I have a site at [url]... with flash content on the home page. The preloader works fine the first time you load the page, but if you click any link on the page, and then hit "back" in Internet Explorer to get back to the home page, the preloader shows stuck at 100%.
The movie file has 2 frames. The 1st for the preloader, and the 2nd for the content. Here's the code for my preloader[code]...
I am creating an application. At one view I have three states. If I changes state and than back button pressed it unloads the application.I am developing it in Adobe AIR.
View 1 Repliesi am using google maps and when i have put a button on the fourm to navigate home i am getting a error #1009 here my code hope someone can spot my error
Code:
import com.google.maps.LatLng;
import com.google.maps.Map;
[code]....
I've got an intro for a movie,and a single button appears around frame 58,and I've tried giving it a function so it will skip to fram 478 and play the whole movie from there on:
PlayCompl_btn.onRelease = function() {
gotoAndPlay(478);
}
but it keeps saying "statement must appear within handler" and I've got the same problem when the movie reaches frame 477 I want it to go back to frame 58 and play from there so it would loop all until the button is clicked:
PlayCompl_btn.onEnterFrame = function() {
gotoAndPlay(58);
};
I have several swfs that now need to be brought together from one navigation menu/home screen that I need to create. This was easily done in as2 (replacing one swf with another when loading). Is this at all possible with as3? and if so what's the best approach?further info:the navigation screen will be an arial shot of a cartoon village, when you click on a house it should open up the swf activities than i've already created.
View 2 RepliesI'm having trouble creating code logic for 2 doors that open up to a business and personal section. I want them to be coded for all these scenarios:
1. when user's mouse is over the door (or section), the door opens up. the other stays put where it is. (done)
2. when the user exits the zone, the door closes shut (but slower than the opening)
3. if the user's mouse exits and reenters very quickly, i need to detect that somehow and rewind the easing function? example
if (user left and reentered in 2 sec){
trace(personalDoor.rewind());
}
what kind of method or class gives access to a rewind function.
[URL] put an http: before that and the whole link will work.
I am trying to create a dropdown menu from the top of my home page for navigation similar to this site.I'm just having a little difficulty on the correct process.Not sure if I make a movie clip for the bar to drop down when rolled over and how to place the text buttons so they appear when the bar drops down.
View 1 RepliesBasically I'm building CD extras for a band, and they have a bunch of videos that are embedded in the timeline that need to automatically return the menu when they finish playing.I have the menu working fine, and all the videos are linked and playing; is it just a simple matter of replacing the "gotoAndStop" command or is it more complicated?
View 2 Repliesi built this navigation bar where there is an arrow and menus - when u roll over a menu the arrow slides to it....now what i'm trying to do is that when u press a menu and then u roll over another menu and when u roll out that menu it slides back to the pressed menu - like a magnet affect..
View 9 RepliesI'm working on a web menu, that has sub menus. I'm currently trying to get the sub menu to jump back to the main menu if the mouse is no longer inside the submenu zone.
It works if I move the mouse quickly to another part of the Flash area, but if I quickly move it out of the Flash area and onto say the html document, it doesn't update fast enough, and thus still thinks the mouse is hovering over it.
I know I can simply update the movie frame rate which does work, but I was wondering if there is any way to get Flash to check to see if the mouse IS ACTUALLY ACTIVE over it, and if not close the submenu?
I do not know why but I see that itemclick event on a menubar do not fired unless you click a sub item. What is the clean way to handle clicks on menuitems which are on the top level and do not have sub menu items. For example I want to fire an event whenever MenuItem B is clicked.
<?xml version="1.0"?>
<!-- menus/MenuBarControl.mxml -->
<mx:Application xmlns:mx="[URL]" >
<mx:MenuBar id="myMenuBar" labelField="@label" itemClick="{itemClick(event)}" >
<mx:XMLList>
[Code] .....
basically this code will work like a browser back button its very simple but "could end up very long" basically it will act "similiar to the browser back button"
Code:
on (release) {
if(page1 = _currentframe){
_root.gotoAndStop("quiz");
} else if (page0 = _currentframe){
[code]....
it works when the (page1 = _currentframe){ is rotated with the first if statement...because for somereason it seems to not recognise the "else if's"
i have a movie clip (mc_1) inside of this movieclip i made
-one button ("start") : by its event Roll_Over the animation (of mc_1) starts
-ten menu buttons (b_1,b_2,b_3,....,b_10) : at first they're not on the stage, but they appear one by one,frames by frames, after I rolled over "start".
-one invisible button (inv_btn): placed right under the area occupied by those previous buttons..by its RollOut event i make the menu rewind so the ten buttons disappera one after one other.
now i have to put the menu buttons inside an array (cause i made a script for dynamic loading images from XML) but i receive #1009: Cannot access a property or method of a null object reference. this is why i put in the array buttons that at first doesn't even exist...and when the menu closes disappear again..how can I handle the situation?
//this is the array code i put in the first frame of mc_1.
var bottone:Array = new Array(b_1,b_2,b_3,b_4,b_5,b_6,b_7,b_8,b_9);
for(var i=0;i<bottone.length; i++) {
var but_var:MovieClip = MovieClip(bottone[i])
but_var.buttonMode = true;
but_var.id = i;
I have a home.swf that is inside home.html.inside home.swf there is a btn with the following
cinema_btn.onRelease = function() {loadMovieNum("video_main.swf", 0);
inside video_main.swf is the following
loadMovieNum("video1/reels.swf",1);
the idea is to load reels.swf in level1 on top of video_main.swf in level 0 why reels.swf size looks much larger even though all swf's are 900 x 800?
[Code]...
Basically, I have a button and on click it displays a menu. I want to click that menu a second time and the menu closes. Currently, every time you click the button, the menu reopens. I pasted the Flex livedoc example below. If you click the button, the menu keeps reopening.Now, I rigged it up by setting a var to open and closed, so when clicking the button it does a check. However, if you click away from the screen, the HIDE event gets dispatched, and the menu closes. This messed up the open close var being set.
How could I make this Flex example below show the menu on button click, and then on a second button click, it closes the menu? Take into affect that if you click away from the menu, it closes it.Also, I played around with the MOUSE_DOWN_OUTSIDE event for the button and set the preventDefault, and the FlexMouseEvent event.cancelable is set to false.Changing to a PopUpMenuButton is not an option. I have to much skinning involved.Here is the Flex example:
<mx:Script>
<![CDATA[
// Import the Menu control.
import mx.controls.Menu;
[code]....
I have a Flash website with 3 interfaces( 3 frames with movie clips inside). they have a button that goes to different loaded .html page(text). But once the back button is pushed on the web browser, it always goes back to the first frame instead of the actual last page, which might have been frame 2 or 3.
View 1 RepliesI've developed a small portfolio website, and have created a "home" button, but I can't get it to program correctly. I've tried using the Action Script to Go To and Stop at Frame feature, but it doesn't work. I need the "Home" button, whenever pressed to take the viewer BACK to frame 10.
View 3 Repliesi want to know how we can make back button in flash to go back to page same like browser back button.
View 1 RepliesSo I've just embedded a .swf file as a header to my blog and the home button, the logo, is not working.Everything is linked up correctly. When I test it in Flash, it brings up my blog. However, when I'm actually on the site, the button does nothing.
View 6 Replies