Can I make a class as a function parameter type?

Thus, AS2, I had a function that would create a different movieclips based on variables, that I went in (because attachMovie() took the name of the movieclip as a string - for example attachMovie("man",...) or attachMovie ('car'...)).

In AS3, it did more correctly now, with a new var = Man() mc or new Car().

Is there a way for me to pass the type of class (man or car) as a function parameter to a function:

for example

public void MakeMovieClip(classType:<something>):MovieClip {}
return new classType();
}

or do I have to do basically a block giant switch/case that switches from channels (which is what I currently do)?


Thank you

--
Ken

If you have a library item with the name of the man class, use the following code to add a movieclip Man to the scene.

Learn more about this here.

Tags: Adobe Animate

Similar Questions

  • In my laptop, when I open the itunes window there is an option 'Internet Radio' to listen to the different type of music. This "Internet radio" function can be used on my iphone5? And if so, how can I make it work?

    In my laptop, when I open the itunes window there is an option 'Internet Radio' to listen to the different type of music. This "Internet Radio" function can be used on my iphone 5? And if so, how can I make it work?

    No more. It merged with the Apple's music.

  • How can I make sure that all components in my opinion have been instantiated to test

    I'm testing a view 'view', which has an ADG but the ADG is null.

    Try this code:

    view.adg.dataProvider = data;

    How can I make sure that all components in my opinion have been instantiated to test?

    private var view: UserManagement;
    [Front]
    public void Setup (): void
    {

    view = new UserManagement;

    }

    [Test]
    public function testSaveData (): void
    {
    var data: collection ArrayCollection = new ArrayCollection();
    for (var i: int = 0; i < 1000; i ++)
    {
    var item: Object = new Object;
    element.isModifiedClientSide = Math.round (Math.random () * 1);
    data.addItem (element);

    }
    view.adg.dataProvider = data;

    }

    You have instantiated your view.  Usually, when I'm working with a view, mine looks like this

    private var myView:MyViewClass;

    [Before(async,ui)]
    

    public void Setup (): void

    {

    Bird = new MyViewClass();

    Async.proceedOnEvent (this, opinion, FlexEvent.CREATION_COMPLETE, 500);

    UIImpersonator.addChild (bird);

    }

    [After]

    public function teardown (): void

    {

    UIImpersonator.removeChild (bird);

    Bird = null;

    }

    Here is a link detailing using display classes in unit tests

    http://docs.FlexUnit.org/index.php?title=UIImpersonator

  • How can I make my Introduction_mc automatically disappear after 10 seconds and load Home_mc?

    Hello

    How can I make my Introduction_mc automatically disappear after 10 seconds and load Home_mc (automatically)? I don't want the user to change this introductory page by itself. It should be done automatically.

    What is the procedure and the code to achieve this, please?

    Thank you.

    Hello

    I gues you use AS2.0, then use setInterval, AS3.0 user class Timer.

    AS2.0

    var interval: Number = setInterval (doubts, 10000); in milliseconds

    function doubts (): Void {}
    do something;
    }

    AS3.0

    var: timer = new Timer (10000: 1);

    timer.addEventListener (TimerEvent.TIMER_COMPLETE, onTimerCompleteHandler, false, 0, true)

    function onTimerCompleteHandler(event:TimerEvent):void {}
    do something;
    }

    For more information: http://blogs.adobe.com/pdehaan/2006/07/using_the_timer_class_in_actio.html

    Best regards
    Etienne Das
    http://deepanjandas.WordPress.com

  • Updated to IOS 10.0.2 and can now make calls

    I have upgraded to IOS 10.0.2 this morning on my iphone 5 and now I can't make cell calls - I can get the texts, voicemails, go on the Internet (Safari), but no cell bars!  Has taken my iphone from Verizon, and they installed a new SIM card and also did a reset... still nothing.  Is this a problem with IOS? Others have it?

    The ability to make calls is a function of carrier. This wouldn't be a problem to iOS. They should take a look at your cellular account. If you can get text messages and data works, then your account is not properly configured for calls. I suggest you take it to a shop of the company rather than a dealer to have it checked, or call Verizon customer service and explain your situation and what has already been done.

  • Can I make a record on the Air of MacMook, etc.. ?

    In our master class, we use "Collaborate" for audio visual. Here is a somewhat convoluted series of question for which I couldn't find an answer online.

    1. can I I dictate a recording on MacBook Air? When I try to play the record AND dictate, there is no sound. That is, it seems that I can have one or the other, but not both.

    2. just behind that, can I make a voice memo to my iPhone? I know that it will be on my MacBook but I encounter the same problem. Is there an "end-around" that would allow me to do this?

    3. is there a software that would allow me to do this?

    4. is there a way that I could use a splitter microphone cable that allow me to do that?

    5. Finally, if I have a 3.5 male cable, it would allow me to dictate (or save) from the iPhone directly on the MacBook Air.

    Any help on this maze would be a great help. Also, I'm techno-challenged so a process step by step would also be useful.

    Thank you!

    I suggest you section in the Apple local store for a discussion with one of the geniuses.

    I guess this app is the Blackboard application work?

    1: Yes, OS X can record audio.    GarageBand from Apple iLife app is commonly used for this and can be effective to record audio and to overlay additional tracks on audio existing.   Better get a mic if you can manage that, the microphone has a terrible audio quality.   The people of Blue Microphone products with good reputation, as do AudioTechnica and other sellers...

    1a: simultaneous record and playback means that you pick up playback during recording if you're not careful.  Which means a helmet or another mechanism to keep the isolated audio tracks or a directional microphone with noise cancellation.  Headphones are probably preferable here, too.   Mikes can and do pick up all kinds of noise, even the most accomplished.

    2: Yes, there is an audio recorder app on iOS.

    2a: same problem as 1 a - you need to separate the channels to the inputs and outputs.

    3: See what GarageBand can do - but it is the registration center and not collaboration - and maybe the products proposed by Rogue Amoeba or Audacity.

    4: again, you must separate channels of input and output (and headset), or you get the audio output in return via the input channel.

    5: I think technically possible, but you will get the output on the input and sound from the microphone of the iPhone is not very good either.

    To save a collaboration and not the typical rather more static recording with GarageBand, the various applications that are people doing podcasting are probably in the arena just for your needs here, especially if they can - as different packages can do, either directly or through the products of Rogue Amoeba - audio capture from several sources.   Several people use these tools for audio Messages (for example) or Skype capture of several participants, as part of the capture of content for an audio podcast.

    There are various podcasting discussions around, too.

  • How can I make several outputs scanned in a single folder? DeskJet 2050 J510

    DeskJet 2050 - J510

    Windows 7

    At present, each image that I scan appears in a separate folder.  It's a nuisance for the mutiple image scans.  How can I make all the images in one session are displayed in the same fiolde, preferably on my desk?

    Hello kayecy

    Lets try to reinstall the software. Please follow the instructions below.

    1. open Control Panel
    2. click on uninstall a program
    3 uninstall the Deskjet 2050 in the list
    4 restart your computer
    5. download and install the latest version of Adobe flash player
     http://get.Adobe.com/flashplayer/
    6 download the drivers and full software functionality, and then reinstall the printer.

    Complete software Deskjet 2050 features

    Let me know if something changes or if the same interface of shows.

  • Can I make a backup of my time on a second external drive capsule

    It is perhaps an exaggeration, but as I have a Seagate external drive, I thought it wise to make a second backup. Is there a procedure that I can set up to automatically duplicate what I save on my TC.

    I run a 27 inch mid 2011 iMac with the last OS of El Capitan. I use my Time capsule using the airport on 12 hours automatic backup.

    Can I make a backup of my time on a second external drive Capsule

    Yes, you can... but the procedure will not "auto".  Connect the hard drive to the USB port on the Time Capsule and use the Archives in the utility AirPort.

    This copies everything on the Time Capsule on the USB.

    Upside down... you have a copy of all of your backups on the Time Capsule. Downside... you must check manually... and... f there are problems with the backups on the Time Capsule, these same questions will be copied on the USB.

    IF... connect you the player to the USB port on the Time Capsule, rather using the manual function Archive... you don't have the opportunity to have Time Machine backup automatically at a time Capsule of time and the USB on the Time Capsule.  Time Machine automatically alternates backups from one disk to another.

    Even better, more reliable and much faster would be to connect the USB directly to your Mac and have Time Machine automatically backup the disk in addition to the time Capsule.

    There are other options of backup as well, but they would not be using Time Machine.

  • How can I make Pages capitalize the first word in a sentence?

    How can I make Pages capitalize the first word in a sentence? The I phone t - it, the iPad does, why not not iMac using Pages capitalize the first word on a new sentence?

    Pages of IOS and IOS itself remain different implementations of Pages v5.6.1 for Mac and OS X. In any version of Pages v5, if there was an option to preferences in Pages ' 09, there is no auto-capitalisation function.

    See my previous post is launching an OS X App Store free application, which can be applied to auto-capitalisation to your Pages v5 documents.

  • How can I make a copy of my Vista operating system

    How can I make a copy of my Vista OS Backup I lost the original purposes?

    Buy an external USB disk and use the a next Image backup software. If you do regular backups before installing new software or a Windows Update, it can be a life saver when it come to the recovery of a computer unbootable plu.

    Norton Ghost version 15 - has a 30 day trial available
    http://www.Symantec.com/Norton/Ghost
    Media: CDR/RW, DVD + R/RW, Blu - Ray, USB and FireWire® devices (IEEE 1394), Iomega Zip® and Jaz® drives
    (Note: trial does not create a Bootable restore CD you will need to restore the image)
    http://www.Symantec.com/Norton/downloads/trialsoftware/register.jsp?PVID=ghost15
    User Guide: ftp://ftp.symantec.com/public/english_us_canada/products/ghost/15/manuals/ngh_15_user_guide.pdf

    Acronis True Image 2011 - has a fully functional trial version of 30 days available.
    (Note: install Acronis and then create a bootable media restoration/rescue CD before you start creating your first image backup)
    http://www.Acronis.com/homecomputing/products/TrueImage/
    The version comparison: http://www.acronis.com/homecomputing/products/trueimage/comparison.html
    True Image User Guides and documentation:
    http://www.Acronis.com/homecomputing/download/docs/

    Product review
    http://www.PCWorld.com/reviews/product/384118/review/Norton_Ghost_15.html
    Ghost 15 screenshots:
    http://www.Softpedia.com/get/system/back-up-and-recovery/Symantec-Norton-Ghost.shtml

    Acronis True Image Home 2011 product review:
    http://www.whatsabyte.com/P1/ATI_2010_Review.html
    http://www.allacronis.com/Acronis-True-Image-home-review.php

    Acronis True Image Seagate Edition (drive Assistant)
    http://www.Seagate.com/www/en-us/support/downloads/DiscWizard

    Acronis True Image edition of Western Digital (WD)
    http://support.wdc.com/product/downloaddetail.asp?Swid=119&wdc_lang=en

    Also copy disc to disc with Norton Ghost
    http://Service1.Symantec.com/support/PowerQuest.nsf/docid/2004111701520562?OpenDocument&src=hot&prod=Norton+Ghost&ver=10.0&CSM=no&SEG=HHO

    Free alternatives:
    EASEUS Todo Backup home V2
    (Note: Todo Install, then create a diskette "emergency" before you start creating your first image backup)
    http://www.TODO-backup.com/

    Untested alternatives
    Reflect disk imaging:
    http://www.Macrium.com/reflectfree.asp

    Paragon Backup & Recovery Free Edition:
    http://www.Paragon-Software.com/home/DB-Express/download.htm

    J W Stuart: http://www.pagestart.com

  • How can I make my adodc more quickly connect my SqlServer?, its takes a minute before that I can view thousands of record in my listview.

    How can I make my adodc more quickly connect my SqlServer?, its takes a minute (so long) before I can view thousands of record in my listview.please someone help me.

    I'm using...

    Public Class McheckpaymentNew
    Cn as New ADODB. Connection
    Private RS As New ADODB. Recordset

    Private Sub McheckpaymentNew_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    Try

    CN. ConnectionString = "DSN = database; UID = user; PWD = password"
    CN. Open()

    RS. CursorLocation = ADODB. CursorLocationEnum.adUseClient
    RS. CursorType = ADODB. CursorTypeEnum.adOpenStatic
    RS. LockType = ADODB. LockTypeEnum.adLockBatchOptimistic

    Catch ex As Exception
    MsgBox ("could not connect!, please check your network connections, or Contact MIS Dept. for assistance.", vbCritical, "Error connecting to the database...")
    End
    End Try

    End Sub

    Please correct if I wrong use, causing the delay.please someone help me...


    This issue is beyond the scope of this site and must be placed on Technet or MSDN

    http://social.msdn.Microsoft.com/forums/en-us/home

  • How can we make a visible element on the screen based on the selection of an existing menu in the same screen

    February 2015 release OPA

    How can we make a visible element on the screen based on the selection of an existing menu in the same screen.

    I have a list box and a text box in the same screen.

    I have a visibility rule on the text box saying that it is only available for one of the selection in the menu dropdown.

    problem is now unless I hit the button next to the screen and return to the original screen the text box does not appear.

    Is there a solution to more to come this problem.

    Please help me

    The feature you describe is called "dynamic visibility" (http://documentation.custhelp.com/euf/assets/devdocs/february2015/PolicyAutomation/en/Default.htm#Guides/Policy%20Modeling%20User%20Guide/Interviews/Screens/Add_questions_to_screens.htm#Dynamic). It allows to control the visibility of another article on the same screen, without writing a separate rule of visibility and click on Submit.

    Using out-of-the-box functionality, you can have dynamic visibility based on Boolean values and value lists (but not regular drop-down lists).

    The example in the February 2015 User Guide based on a Boolean value on the same screen. See slide 27 of the bridge-features and benefits for an example of what it looks like to a list of value: http://www.oracle.com/technetwork/apps-tech/policy-automation/overview/opafeb2015featuresbenefits-2431219.pdf

    If you are wondering what is a list of values, see here: http://documentation.custhelp.com/euf/assets/devdocs/february2015/PolicyAutomation/en/Default.htm#Guides/Policy Modeling User Guide/Value_lists/What_is_a_value_list.htm

    See you soon,.

    Jasmine

  • How can I make my default visible layer panel?

    It was when I opened Photoshop, right panels had all my layers, displayed by default.  Now that the box is empty until I clicked on the "Layers" tab, then it shows my diapers.  How can I make show them default without having to click on the tab?  Thank you!

    Could you please reset the Photoshop preferences once and then check.

    Preference file functions, names, places | Photoshop CC 2014

  • How can I make the page of form for the Yahoo host?

    How can I make the page of form for the Yahoo host?

    I guess you want a contact form that sends data to your e-mail account.

    1. Find out if your hosting plan supports PHP code and the PHP mail() function.
      If so, try this tutorial into 3 parts:
      ALT-Web Design & Publishing: sensitive Contact form with 3.2 Bootstrap and PHP (part 1)
    2. If your hosting plan does NOT support scripts, you will need to use a 3rd party like Wufoo.com service.  They host the form processing scripts on their own servers for you.

    Nancy O.

  • Can we call the procedure inside the function?

    Hello

    Can we call the procedure inside the function?

    Thank you
    Brij

    845712 wrote:

    Can we call the procedure inside the function?

    Strange question to ask.

    Yes. This is the standard behavior in most (if not all) procedural and object oriented languages.

    A procedure, function or a method is a unit of code.

    You can call one of the other units. Units can call themselves (recursion). Technically, this means simply by pushing the battery current (to save the stack of the current device memory), the call to the new unit and then popping up battery when control is returned to the unity of the appellant.

    There are very few exceptions to this. The only one that comes to mind programming languages I've used through the years, is natural 1 - could not call a new unit of code to replace the existing one in memory. If no call-and-return was possible.

    Exactly what did you ask this question? Some newcomers to confused Oracle SQL and PL/SQL - two different languages aside server. And then also mistaken for PL/SQL client command vocabulary of SQL * more.

    You will need to make sure that understand the basics of programming (applies to most current programming languages) and Oracle concepts.

Maybe you are looking for

  • T110-10R will not start after a fall

    Hello I have a T110-10R and he worked very hard, while I was working on it one night he fell on the floor, nothing happened and I continued to work on normal, after that I stopped it it restarts.I tried starting upward normal and all I get is a black

  • Save as PDF task not found on your device

    I was scanning documents to my imac to "Save as PDF".  Without any change, this afternoon, I get an error message. The task of 'Save as PDF' found on your device is not available on your system.  Please select another task.  I get the same type of re

  • No sound when playing a video from an SD through Windows Media Player

    Original title: NO SOUND? Trying to play a video from an SD card through Windows Media Player - no sound on Windows Media player (for this and other media) - required for work to class tomorrow - project help!  Yes, I checked the volume level (it is

  • to restore the msvcrt40.dll file

    to restore the msvcrt40.dll file

  • Z2 Camera Lag

    I have Xperia z2. When I start the camera it works with lag as low light view. It's like low fps. When I compared with Z1. Z1 is better than this all without lag. Is - this hardware problem or a software problem. Watch this video https://www.YouTube.