Support for the creation of menus in which is the center of the screen using AS3, with MovieClip that contains buttons

Hello beautiful ActionScript Guru-

I'm new on learn AS3 and have run obstacle after roadblock to getting what, in my view, should be a simple thing to work. I'm trying to create a menu on many levels using a MovieClip that contains simple buttons. I'm facing 2 problems while posting what I've built.

1. my Menu.as (code below), says it takes "5000: the class 'Menu' must subclass"flash.display.SimpleButton"because it is linked to a symbol in the library of this type.» That's fine, except when I don't change the code to reflect the change the error message wants to difficulty, my beautiful menu driven with options turns into an absolutely useless image, with no opportunity to serve a menu at all. I have read other forums that I have what Miss me is to create a MovieClip that contains buttons, but I think that's exactly what I did. I'm not sure how to fix this error.

2. when I compile my main class (ConsStartMenu.as) did not finish the compilation error 1119: line 29 and 46, claiming that my link to my subclass (Menu.as) called a potentially indefinite property Menu through a reference with static type ConsStartMenu. After searching on Google and the forums navigation for long hours, I do have absolutely no idea what means this error, or what he wants me to difficulty. I think that this is also the reason why my sizing and centering code does not work. It's as if he can't quite find my Menu.as. Maybe a quick glance at my code will shed some light on this?

Thank you very much in advance for your help.

-connor

errors.png

ConsStartMenu.as-

package {}

import flash.display.MovieClip;

import stuff from the lib of valve

Import ValveLib.Globals;

Import ValveLib.ResizeManager;

SerializableAttribute public class ConsStartMenu extends MovieClip {}

These three variables are required by the engine

public var gameAPI:Object;

public var globals: Object;

public var elementName:String;

public void ConsStartMenu(): void {}

}

This function is called when the user interface is loaded

public void onLoaded(): void {}

make this visible user interface

Visible = true;

Let customer across the user interface

Globals.instance.resizeManager.AddListener (this);

trace ("Cons Start Menu loaded!");

This. Menu.Setup (this.gameAPI, this.globals);

}

public void onResize(re:ResizeManager): * {}

var scaleRatioY:Number = re. ScreenHeight/900;

If (re. ScreenHeight > 900) {}

scaleRatioY = 1;

}

This. Menu.screenResize (re. ScreenWidth, re. ScreenHeight, scaleRatioY);

}

}

}

Menu.As-

package {}

import flash.display.MovieClip;

import flash.events.MouseEvent;

Import fl.transitions.Tween;

Fl.transitions.easing import. *;

to import flash.display.SimpleButton;

SerializableAttribute public class Menu extends MovieClip {}

var gameAPI:Object;

globals var: Object;

public void Menu() {}

}

public void Setup (api: Object, globals: Object) {}

define our variables

api = this.gameAPI;

Globals = This.Globals;

}

public void screenResize (stageX:int, stageY: int, scaleRatio:Number) {}

'this', the position being this module, in the center of the screen

This.x = stageX/2;

This.y = stageY/2;

Save the original scale of this movieClip

If (this ["originalXScale"] is nothing)

{

This ["originalXScale"] =-this.scaleX;

This ["originalYScale"] = this.scaleY;

}

This module/movieClip to scale the scaleRatio

this.scaleX = this.originalXScale * scaleRatio;

this.scaleY = this.originalYScale * scaleRatio;

}

}

}

you are missing a fundamental knowledge of classes and how they work.

the bottom line: you cannot reference Menu unless it's a static class.

You must create an instance of your class of Menu:

menu: Menu of var = new Menu();

and then you can add to your addChild (menu) for the use of ConsStartMenu, or maybe that you don't have.  I can't.

is ConsStartMenu your document class?

Tags: Adobe Animate

Similar Questions

  • Display too large for the screen prevents access to apply or OK buttons to implement changes to the resolution.

    Can not access to apply or the buttons OK for changes in the resolution, because the text size too wide and does not scroll in.   Having the same problem trying to scanning/printing document.   How to restore the default resolution without being able to click OK?

    You are welcome.

  • Add support for the new html tag

    Most browsers have support for the < object / > tag.

    I want to integrate a video player on my site to play .mkv videos, but I can't use most because him are based on flash, which can play only .flv & .f4v.

    That's why I go to the < object / > tag

    But, if I wanted to integrate a tag with the name of < mkvvideo / >, a simple plugin that is associated with this tag would be usable or Basic programming of the firefox browser which deals?

    Thank you

    If you want to integrate MKV videos in a web page, see

  • Where is the support for the iPhone with some of these issues?  It's amazing that none of the iphone Tech responded to the unanswered questions.

    Where is the support for the iPhone with some of these issues?  It's amazing that none of the iphone Tech responded to the unanswered questions.

    This is a user forum. You to read the terms of use to which you agreed to when registering, you would have been aware that the participation of Apple here is minimal.

  • BlackBerry smartphones is supported for the East Asian languages for the Blackberry Bold 9780 on O2?

    Hello, I hope someone can help me with my problem. I'm new to the whole Blackberry I just bought my first BB camera a few days ago so please understand if I don't know what words are in the world of Blackberry. The questions will be in bold.

    So, I recently bought a Blackberry Bold 9780 and I am very satisfied with the overall product. However I was wondering if there was support for the East Asian languages (Chinese, Japanese, Korean etc) for my 9780 BB which is on O2 UK.

    Right now, in my languages options, I can only entry for most European languages (English, Spanish, French, etc.) There are no options for languages of East Asia at all. When I try to display all messages or go on the browser which are languages of East Asia, I don't see one set of black boxes.

    I know there are software updates to update your device to take charge of specific languages, so I checked the software downloads page that interests me.

    O2 - UK users, they have two packages:

    -BlackBerry Handheld Software v6.0.0.905 (all languages)

    Package Version: 6.0.0.905
    Composed of:

    • Applications: 6.0.0.294
    • Software platform: 6.5.0.54
    • File name: 9780AllLang_PBr6.0.0_rel905_PL6.5.0.54_A6.0.0.294_O2_UK.exe
    • File size: 180,72 MB

    -BlackBerry Handheld Software v6.0.0.0905 (Multilingual)

    Package Version: 6.0.0.905
    Composed of:

    • Applications: 6.0.0.294
    • Software platform: 6.5.0.54
    • File name: 9780jAllLang_PBr6.0.0_rel905_PL6.5.0.54_A6.0.0.294_O2_UK.exe
    • File size: 185,61 MB

    Then How do I know which package I currently installed on my device because the application number and the number of software are identical.

    On my device it details shows: v6.0.0.294, (905 Bundle, platform 6.5.0.54)

    So I wonder if none of the above two packages have the option to enable East Asian language support.

    I'm sure I have the latest update for my camera that I can't update more far depending on the desktop software and my phone. So If I move to another package, how do I go to do?

    I mainly use a MAC, but I can also have access to a PC too. I don't know if it's important, but I think that there is a difference between the Desktop software on each computer that is used to update your software.

    If possible, it is that I would be able to download another package that has the support of another service provider East Asia and update on my own? Or is it too risky because it may crash my machine?

    And my last question, so it is likely that O2 can do in the near future if there is no option for the language support East Asia now,?

    Sorry if I rambled on a bit too much or too many questions. I just want to know if its possible to enable language support is now, otherwise I will waste countless hours looking for a method. I looked to see if there were similar questions, asked the Board of Directors, but none was really specific to my needs.

    A big thank you to everyone who sits reading through this. I appreciate the responses.

    Thank you.

    Do not know if you understand how to do this, but I did these steps and it worked fine:

    1. https://www.blackberry.com/Downloads/contactFormPreload.do?code=7D2A383E54274888B4B73B97E1AAA491&dl=... go here and download the version of v6.0.0.0905 (Multilingual) BlackBerry Handheld Software.

    2 install the downloaded OS on your computer, you need the files of this new OS more later to add multi language support for your BlackBerry device.
    C:\Program Files\Common search in Motion\Shared\Loader Files\9780AllLang_v6.0.0.294_P6.5.0.54
    The CJK.alx is the file that you will use later.

    3. use Desktop Manager to save your BlackBerry (better safe than sorry)

    4. before installation, go to your AppLoader folder, for example C:\Program Files Research In Motion\AppLoader and move the Vendor.xml to a backup directory, if you have kept a copy of the file. The loader.exe allows to load up the AppLoader, follow the instructions in the wizard.

    He automatically gave me a list of applications and languages, if you scroll down see you East Asian languages check those you want that I checked Japanese and Thai language and font support. If you do not see these click on 'Add' at the top and navigate to the CJK.alx file.

    So let the application loader it's thing, after that everything should work.

    Hope this works for you also. I take no responsibility of bricking your phone.

    BlackBerry should be an option to install more languages via the phone.

  • VixDiskLib_Cleanup always returns vixError (6) - the operation is not supported for the specified parameters

    Any ideas how we can determine what parameters it dislikes?  I am the appellant after VixDiskLib_Disconnect as recomment docs and using the same connection params struct I used with VixDiskLib_ConnectEx.

    Thank you

    -Ron

    UInt32 numCleanedUp = 0, numRemaining = 0;

    /= VDDK 1.1 header says connection spec should be null =/.

    connectParamsP - & gt; vmxSpec = (char *) NULL;

    vixError = VixDiskLib_Cleanup (connectParamsP, & numCleanedUp, & numRemaining);

    vixError (6) - the operation is not supported for the specified parameters

    Ron,

    I think that your connection is probably not use all transport advanced, in which case _Cleanup does nothing. If you connect without using advanced transport, cleaning returns 6 - there is nothing to clean up.

    Thank you

    Annick

  • Add support for the iPhone in an application already published

    Hello

    Is it possible to add support for the iPhone to a multi-folio application which we have already published in iPad format.

    If so, what are the steps before you download a .ipa file revised to Apple for review?

    There are a few paragraphs on the update of the application in general on p58 here but nothing specific to add support for additional platforms to an existing application.

    Thanks in advance for your help.

    Ross

    You must do two things to make your application work on the iPad and the iPhone:

    1. create fact sheets for the iPhone.

    http://help.Adobe.com/en_US/digitalpubsuite/using/WS4cb2576c7954973c-70d16164136e6c7cfbc-8 000. HTML

    2. create and submit a new version of the viewer using DPS App Builder. Select iPhone and iPad. Use the same files mobileprovision and CERT.

    You also need to create some application icons and splash for iPhone screens.

  • [Consolidation-locked] Please add support for the Nikon D600 RAW to Lightroom as soon as possible!

    My Adobe lounge

    Please add support for the Nikon D600 RAW to Lightroom as soon as possible!

    ViewNX allows me to get images, but check back! I know that Lightroom and you, ViewNX, don't be no Lightroom.

    Yes, I see all other D600 support request. I am here to pray for her! Don't make me wait much longer!

    Title of the message was edited by: Brett N

    Title of the message was edited by: Brett N

    4.2 Lightroom was released, which supports the Nikon D600. In Lightroom, choose Help > check for updates to download.

    Please visit: http://forums.adobe.com/message/4785056

  • Where can I find detailed, systematic support for the advanced Thunderbird related topics?

    In moving from XP to Windows 7, I opted for Thunderbird as a mail client in order to circumvent hyper intrusive Windows Live Mail to Microsoft (I used Outlook Express for years).

    I have a very complicated E-mail structure, and it took me weeks (seriously) to learn how to reproduce it in TBird. Now, I try to customize TBird more, but none of the TBird articles/forum Q & A / searches on Google to ask my questions.

    There is no support direct tech TBird, and I'm almost ready to leave for good. However - a last effort: where can I find detailed, systematic support for the advanced Thunderbird related topics?

    Thank you.

    https://www.flossmanuals.NET/Thunderbird/

  • When does support for the end of windows vista Home premium

    When does support for the end of windows vista Home premium

    Original title: support

    Watch the news of Vista on this page:

    http://Windows.Microsoft.com/en-us/Windows/products/lifecycle

  • Software support for the Dell Management Pack Suite - Dell VRTX SNMP monitoring

    Hi-

    Anyone know where I can get the support for the continuation of the Dell Management Pack - Dell Poweredge SNMP monitoring in SCOM VRTX?

    Thank you

    Hello

    Please visit our Dell Tech Wiki Page for more information on Dell Server Management Pack and forum for your comments and observations.

    Thank you

    Srinivas Carlos.

  • No support for the Nikon D7200? Seriously?

    I just upgraded from the Nikon D7100 to the D7200.  I was shocked and very disappointed to see that Adobe is not support for the D7200 files.  I use ambient light for all of my editing, and it is essentially useless to me now.  WHEN will Adobe be be solve this?

    In fact, it was fixed quite earlier. Support has been added in Lightroom 6 and Lightroom CC 2015. Apparently, you may be using an older version of Lightroom, 5.7.1. The D7200 came out after updates that version had been released, and there will be no updates Lightroom 5. You can either upgrade from Lightroom 6, or you can use the free DNG Converter to create copies DNG that you can use in older versions of Lightroom.

  • Can you please put me in touch with support for the trial version of adobe acrobat pro XI that I had tried on 15 March for 30 days. I tried to cancel because the cost is too, and Acrobat Reader are good for me. I can't uninstall program.

    Can you please put me in touch with support for the trial version of adobe acrobat pro XI that I had tried on 15 March for 30 days. I tried to cancel because the cost is too, and Acrobat Reader are good for me. I can't uninstall program.

    I had to wipe my drive since then with the trouble with Apple Store without acknowledging my machine and Time Machine reloading gave complications. Can you please cancel my trial and make my money from trial.

    Hi jack gordon.

    Adobe does not charge for the 30 day trial, but it seems that you have subscribed to Acrobat Pro (as a simple app for creative cloud membership) return March 15. To cancel your subscription, please contact customer service.

    Please let us know if you have any additional questions.

    Best,

    Sara

  • When will Hi there, there be support for the Olympus PEN E - PL7?

    When will Hi there, there be support for the Olympus PEN E - PL7?

    It's on our radar and hoping to incorporate it in a next update.

    As soon as it is available, it will be updated in the article below. Camera Raw plugin | Compatible cameras

    ~ David

  • [Consolidation-locked] Support for the Nikon D600 RAW?

    When the update of Adobe RAW will build for the Nikon D600?

    Title of the message was edited by: Brett N

    Lightroom and Camera Raw 7.2 4.2 (11 items) are currently available and provide support for the Nikon D600.

    Go to help > (check) updates installed.

    Please visit: http://forums.adobe.com/message/4785056

Maybe you are looking for