currentFrame AS 3.0 question

According to me, only missing me something basic here. In my external .as file, I'm saying that "if my current image has the image of"enterdone"tag, then go to the section with the label"enter".

The clip is called _cedars and all my labels image, variable, etc. are set up correctly.

Here is my code:

If (_cedars.currentFrame == "enterdone") {}

_cedars.gotoAndPlay ("enter");

}

I get error #1176: comparison between a value with a static type int and may be unrelated to a String type.

I appreciate any help!

you want to compare the currentLabel of your movieclip with this string.  (and that the code should run repeatedly).

Tags: Adobe Animate

Similar Questions

  • question of hitTestObject in a base class of an object library in Flash Pro.

    Hello.

    I have a flash file with a number of clips in the library - various bubbles that can be skipped in a clilck.

    The fla has a class of documents - BubbleGame.as, and all various mcies of bubble in the library are exported for action script (using their own names, but) with a mutual Base class - BubbleBase.as, so that all the different video clips bubbles behave the same: load in a random position, play their own deadlines, pop when you click them and if not burst - reload in another post.

    Here, everything works fine, however, I want the video clips removed if they hit an object on the stage. The object has an instance name of sym_mc and I tried different bits of code causes the bubble to remove when it hits this object, but I'm not getting more errors or nada.

    I tried to do the code hitTestObject in document and the base class class. It seems more appropriate to have in the base class - BubbleBase.as (below), because who says the bubbles do.

    In any case, I am neglecting and would appreciate it if you people took a glance at my code of the base class and the help.

    Thank you: *)

    package

    {

    import flash.display. *;

    import flash.events. *;

    SerializableAttribute public class BubbleBase extends MovieClip

    {

    var thisBubble:MovieClip;

    var navdock:MovieClip;

    var thisParent: *;

    public void BubbleBase()

    {

    this.addEventListener (Event.ADDED, initialize);

    this.addEventListener (MouseEvent.CLICK, pop);

    }

    function initialize(event:Event):void

    {

    thisParent = event.currentTarget.parent;

    navdock = thisParent.sym_mc;

    thisBubble = MovieClip (this.parent.getChildByName (this.name));

    if(currentFrame == 1)

    {

    This.x = Math.Random () * stage.stageWidth;

    This.y = Math.Random () * stage.stageHeight;

    Turning = Math.Random () *-90;

    }

    this.addEventListener (Event.ENTER_FRAME, moveBubble);

    }

    function moveBubble(event:Event):void

    {

    this / * if (this.hitTestObject (navdock)) is commented out, because it generates an error – TypeError: Error #2007: hitTestObject parameter must be null.

    {

    trace ("hit!");

    this.removeEventListener (Event.ENTER_FRAME, moveBubble);

    thisBubble.removeEventListener (Event.ENTER_FRAME, onEnterFrame);

    this.removeEventListener (MouseEvent.CLICK, pop);

    this.parent.removeChild (thisBubble);

    }

    on the other

    {

    This.x = Math.Random () * stage.stageWidth;

    This.y = Math.Random () * stage.stageWidth;

    }*/

    }

    function pop(event:MouseEvent):void

    {

    this.removeEventListener (Event.ADDED, initialize);

    var host: MovieClip = MovieClip (this.parent.parent);

    main.increaseScore ();

    this.parent.removeChild (thisBubble);

    }

    }

    }

    Hi ned. _spoyboyle

    Guess what?, I have corrected the code - see below, noting the change added

    to ADDED_TO_STAGE in the constructor, with removeEventListeners as a result

    in the rest.

    And to fix the error null, I added to remove the pop function;  I could not

    figure that a person on until after I was able to get sym_mc to be identifiable

    -by the change in the type (ADDED_TO_STAGE).

    I managed the setting, BTW, thanks to you, Ned, in terms of making the simplified

    version coming out specific errors, which iwas able to isolate, to

    Look up in the search field Flash as such - "TypeError: Error #1009: cannot.

    access a property or method of an object reference null + at

    Flash.Display::Sprite/constructChildren().

    Which lead me to various options, among which was that -

    http://kb2.adobe.com/cps/838/cpsid_83815.html - that was the solution.

    But also through _spoboyle, providing the correct 'if' statemnt with

    no = null.

    Thank you so much, people

    And now, I feel silly to tell you all that after getting this work.

    my bubble game is less good looking than before that the hitTestObject was

    added, because after a few runs (bubbles in jumps, removed, and)

    regenerated) some of the bubbles are removed without for as much hit

    the item on stage - but little to chance, plus button that generates

    more bubbles (bubbleMaker.start ()); is not as responsive as it is without

    the ifHitTestObj and finally, my processor - healthy and strong although it

    is, is tested with all these bubbles and their maturities, but

    all this is another question for later review.

    For now, thanks again :)

    package

    {

    import flash.display. *;

    import flash.events. *;

    SerializableAttribute public class BubbleBaseNew extends MovieClip

    {

    var thisBubble:MovieClip;

    var navdock:MovieClip;

    var thisParent: *;

    public void BubbleBaseNew()

    {

    this.addEventListener (Event.ADDED_TO_STAGE, initialize); off

    http://kb2.Adobe.com/CPS/838/cpsid_83815.html do ADDED_TO_STAGE instead

    added

    this.addEventListener (MouseEvent.CLICK, pop);

    }

    function initialize(event:Event):void

    {

    this.removeEventListener (Event.ADDED_TO_STAGE,

    Initialize); This causes sym_mc be defined as an object

    thisParent = event.currentTarget.parent;

    navdock = thisParent.nav_mc;

    thisBubble = MovieClip (this.parent.getChildByName (this.name));

    this.addEventListener (Event.ENTER_FRAME, moveBubble);

    }

    function moveBubble(event:Event):void

    {

    If (navdock! = null & this.hitTestObject (navdock))

    {

    trace ("hit!");

    this.removeEventListener (Event.ENTER_FRAME, moveBubble);

    thisBubble.removeEventListener (Event.ENTER_FRAME,

    onEnterFrame);

    this.removeEventListener (MouseEvent.CLICK, pop);

    this.parent.removeChild (thisBubble);

    }

    on the other

    {//this times normal (the chronology of the bubble), but the trace says

    sym_mc: undefined

    var mc:MovieClip = event.target as MovieClip;

    if(currentFrame == 1)

    {

    MC.x = Math.Random () * stage.stageWidth;

    MC.y = Math.Random () * stage.stageHeight;

    Turning = Math.Random () *-90;

    }

    }

    }

    function pop(event:MouseEvent):void

    {

    this.removeEventListener (Event.ADDED_TO_STAGE, initialize);

    this.removeEventListener (MouseEvent.CLICK, pop);

    this.removeEventListener (Event.ENTER_FRAME, moveBubble);

    var host: MovieClip = MovieClip (this.parent.parent);

    main.increaseScore ();

    this.parent.removeChild (thisBubble);

    }

    }

  • Navigation button question

    OK, I'm moderator, and not much of a programmer.

    What I have is a button which acts like a music video. you fly over and he did some aninmation, roll-off and and the reversal of the animation. Here's the code.

    What I can't understand is when the button is clicked, I want the navigation to occur on the main timeline or root. My question is, what is the code that I have to place instead of the route command that will allow me to position the main timeline is a framework or an instance of movieclip? Thank you

    anim_mc. Stop();

    anim_mc.addEventListener (MouseEvent.MOUSE_OVER, onMouseOver);
    anim_mc.addEventListener (MouseEvent.MOUSE_OUT, onMouseOut);
    anim_mc.addEventListener (MouseEvent.CLICK, onClick);

    anim_mc.buttonMode = true;
    anim_mc.mouseChildren = false;

    function onClick(e:MouseEvent):void
    {
    trace ("Click");
    }

    function onMouseOver(e:MouseEvent):void
    {
    var mc:MovieClip = MovieClip (e.currentTarget);

    mc.removeEventListener (Event.ENTER_FRAME, rewind);

    MC. Play();
    mc.addEventListener (Event.ENTER_FRAME, advance);
    }

    function onMouseOut(e:MouseEvent):void
    {
    var mc:MovieClip = MovieClip (e.currentTarget);

    mc.removeEventListener (Event.ENTER_FRAME, advance);

    mc.prevFrame ();
    mc.addEventListener (Event.ENTER_FRAME, rewind);
    }

    function advance(e:Event):void
    {
    var mc:MovieClip = MovieClip (e.currentTarget);

    If (mc.currentFrame is mc.totalFrames)
    {
    MC. Stop();
    mc.removeEventListener (Event.ENTER_FRAME, advance);
    }
    }

    function rewind(e:Event):void
    {
    var mc:MovieClip = MovieClip (e.currentTarget);

    If (mc.currentFrame == 1)
    {
    MC. Stop();
    mc.removeEventListener (Event.ENTER_FRAME, rewind);
    }
    on the other
    {
    mc.prevFrame ();
    }
    }

    If this code is on the main timeline, use:

    anim_mc. Stop();

    anim_mc.addEventListener (MouseEvent.MOUSE_OVER, onMouseOver);
    anim_mc.addEventListener (MouseEvent.MOUSE_OUT, onMouseOut);
    anim_mc.addEventListener (MouseEvent.CLICK, onClick);

    anim_mc.buttonMode = true;
    anim_mc.mouseChildren = false;

    function onClick(e:MouseEvent):void
    {
    this.gotoAndPlay ("maintimelineframelabel");

    otherwise, as a last resort, you can always use: MovieClip (root) .gotoAndPlay ("maintimelineframelabel");

    }

    function onMouseOver(e:MouseEvent):void
    {
    var mc:MovieClip = MovieClip (e.currentTarget);

    mc.removeEventListener (Event.ENTER_FRAME, rewind);

    MC. Play();
    mc.addEventListener (Event.ENTER_FRAME, advance);
    }

    function onMouseOut(e:MouseEvent):void
    {
    var mc:MovieClip = MovieClip (e.currentTarget);

    mc.removeEventListener (Event.ENTER_FRAME, advance);

    mc.prevFrame ();
    mc.addEventListener (Event.ENTER_FRAME, rewind);
    }

    function advance(e:Event):void
    {
    var mc:MovieClip = MovieClip (e.currentTarget);

    If (mc.currentFrame is mc.totalFrames)
    {
    MC. Stop();
    mc.removeEventListener (Event.ENTER_FRAME, advance);
    }
    }

    function rewind(e:Event):void
    {
    var mc:MovieClip = MovieClip (e.currentTarget);

    If (mc.currentFrame == 1)
    {
    MC. Stop();
    mc.removeEventListener (Event.ENTER_FRAME, rewind);
    }
    on the other
    {
    mc.prevFrame ();
    }
    }

  • iOS 10 people record problem/question

    Hello

    I have a couple of "faces" in the issue of people who are coming in white, but acknowledged same 'face' of many times.  Is anyway to update it for photo comes actually?  At a few faces, I don't know that facial recognition found since it is coming from white.

    Hi JohnP007,

    Congratulations on your iPhone 7 more running iOS 10! I understand that some of your faces in the album of people pull up as a draft and you want to refresh. You can try to use the steps below to fix the faces on the thumbnails in albums.

    Difficulty faces and names mixed-up

    If you notice that there is a photo of someone in a collection that is poorly identified, you can remove it.

    1. Tap the person you want to remove in the album of people > select.
    2. Type Show done face to emphasize his face in every photo.
    3. Press on each photo that is not the person.
    4. Type > not this person.

    Hide people

    You can hide the people or groups that you don't want in your album of people.

    1. Open the album people and press Select.
    2. Touch the people you don't want to see.
    3. Click Hide.

    If you want to see the people that you have hidden, press on show hidden people.

    People in the Photos on your iPhone, iPad or iPod touch

    This should be corrected without delay faces. Please use the Apple Support communities to post your question. Good day.

  • Questions - and answers forgotten

    How to get my 'secret' answers to the questions that I have noted the way back when?

    If you forgot the answers to your questions of security of Apple ID - Apple Support

  • I can't reset the security questions. We received notice as below:

    Hello world

    I can't reset the security questions. We received notice as below:

    "Cannot reset Security Questions."

    We have insufficient information to reset your security questions. "

    Please help me as soon as possible! Thank you very much.

    Hello

    You will need to contact the Apple Support.

    The information is available here:

    Contact Apple for assistance with the security of the Apple ID - Apple Support accounts

    (I'm afraid that no one here can solve the problem for you - this is a user-based community).

  • Question of cloning for SSD upgrade on 12 Macbook Pro

    Previously, I did an upgrade to SSD on my Macbook Air to 2012 according to the instructions of JetDrive transcend. Basically connection via USB 3 and using Mac OS X to clear (and format) disc utilities new SSD, then restore again SSD and then remove the original 128 GB SSD and insert the new 480 GB SSD.  For about a month and so far without problem.

    Now I'm trying to 2012 Macbook upgrade my Pro partner (on 10.11.6).  I got a Crucial SSD MX300 to replace his HARD drive.  Crucial comes with (or recommend) Acronis software.  And a lot of the messages of the forum recommend Carbon Copy Clone.

    My question is if I can use the same method for the cloning of the HD as my Macbook Air (just restore disk of Mac OS X utilities)?  This time, I'm upgrading HARD drive and I don't know if something is different.  At the same time, if I got lucky the first time, I don't not ruin Macbook Pro my spouse this time.

    Thank you.

    Yes, you can use disk utility to clone your MBP wives, but unlike CCC, it will not clone the recovery and Partition.

  • Question about resolution movie downloads

    If I buy a movie at a certain resolution (780p for example), but I want more later re - download at a higher or lower resolution (SD or 1080 p), can I do so and how?

    Same question perhaps for music. Some of my songs have been bought before the latest Apple codecs.

    Any help is appreciated!

    THX!

    Once you have made a purchase on the iTunes store, you will see your purchased items in the menu under accounts bar > bought. You can simply select the item purchased and re-upload.

    With regard to the resolution of the film for films that are offered, and you select the resolution, you can download it again and select a different resolution. For movies that are available as separate download to SD, 780, or 1080 points, you would be limited to the original resolution you selected.

  • Why I can't ask questions.

    I just have a question.  I said that I can't ask questions.

    Do exactly what you did to make this post, but your question in there instead.

  • Cannot reset the Security Questions

    Hello my dear

    -J' forgot my account security questions, but I remember password

    And I'm changing my Security Questions, but show me this sentence

    "Cannot reset Security Questions."

    We have insufficient information to reset your security questions. "

    -I want to solve this problem as soon as possible if permitted

    You should contact the account of Apple security team. To join, click here and choose a method; If this page does not list one for your country or if you are unable to call, complete and submit this form.

    (145081)

  • Bootcamp Windows 10 question

    Hi all

    Stumbled upon a problem, try to install Windows 10 an end 2014 27' iMac w/retina education runs Yosemite 10.10.5. Bootcamp is V 5.1.4. 32 GB, 3.5 ghz Intel I5. Disk of 1 TB of Fusion. Before you try this, I read the guide of Bootcamp to install windows, but also a number of other tutorials and forum messages about potential problems. This research, I learned that for EDU edition you must change the name of the file from Win10_1607_Education_English_x64.iso to Win10_1607_English_x64.iso. Apparently to have the former name of the file may cause OS X to not recognize the ISO. That fact I started Bootcamp, waited while the software downloaded and created a bootable USB key and partitioned my drive giving Windows 70 GB of space. After that, I got the message that my computer is restarts. Upon restarting, I got the black screen with the blue Windows logo and a spinning loading animation. After a few minutes, a blue screen with a message "Windows has encountered and error with computer and must restart," or something similar. He was pretty quick, so maybe it's not word for Word, but it was not a helpful post in terms of saying something specific. When the computer reboots, I am sent directly to OS X, though a bit slower than normal. I tried to restart with the flash drive to see if the installer would start up, no dice. Try now the Option key at startup, the flash player is not available. Went into my settings to see if I could change my startup on Win disk install USB, no luck it no more.

    Now for the question: How can I get the Windows installation again? What I have to start the process, and if so, what should I use Bootcamp to delete the partition that was created? I have re-run Bootcamp and the only option that is checked is the partition and start and install/uninstall windows and delete the partition.

    Thanks for the help.

    Perform the following two procedures

    Reset the management system (SCM) controller on your Mac - Apple Support

    How to reset the NVRAM on your Mac - Apple Support

    If you use a USB drive, not a USB flash drive, you will have problems. It is recommended to use a 8-16 GB USB2 flash drive.

    If the installation program is located on a USB Flash drive, stop your Mac, connect the USB key, restart and hold down the alt/option key and select the Windows icon in the USB port. This installs Windows in BIOS mode. If you click the start EFI icon, it will install using the EFI mode (faster). You may need to change the partition from MBR to GPT using GPT Fdisk.

  • Yahoo account question

    Yes, I understand these are the Apple support forums, but I don't know where else to ask this question and I thought some of you would have the answer to this question.

    I deleted my Yahoo account last week, but I've heard that the 500 million Yahoo accounts were hacked in 2014. I made my account in 2015. Im sure it is hacked since I made my account a year after the supposed hack, but if my account has been hacked and I deleted which would be safe?

    If your account did not exist in 2014, then it is has not been hacked. Removal of the guarantees it will not be new since there was more pirate. Normally, at least the hackers got access to more information in the narrative, as credit card numbers, change your Yahoo password would have sufficed.

  • Text backup question / deleted

    I accidentally deleted one of my iPhone SMS 6 Plus.  They always show on my iMac and iPad but I fear when an AutoSave occurs, it will back up the iPhone and remove them to two other devices. What will happen?  I use iCloud if that makes a difference.

    Hi melissahh625,

    I understand that you have questions about your messages deleted on different devices. I know that it is important to have a handle on your data, so I'm happy to help you.

    When you receive messages, they are stored on different devices. This means that when you delete a device they will not be deleted on the other. This is the case, even if one of your backup devices to iCloud that these backups are specific to devices, as well.

    Thank you for using communities Support from Apple. See you soon!

  • Question

    Look I went to a new site called collabmix.com, and in any case I tried one of my samples Logic Pro download for someone else to try to collaborate with and help me through my song production. In any case when I go to download, the site accepts only gif, jpg, jpeg, or png. How to record my song pro logic and make a jpeg or jpg file? Please someone... IM new to this site and maybe someone asked this already so I'm sorry if this is a redundant question. Anyway ill be looking for a response from the community here. Thank you

    GIF, jpg, jpeg, or png are all formats of image, audio files or formats of logic.

    I got a peek on the site but I'm not register. I'm going to guess and say you are in the wrong place to download your song.

  • Great list of 'How To' Questions

    I am a newbie to iTunes learn the tricks of the trade, and I learned a lot of ed2345, who led me to still more questions:

    1. a few songs that I managed to acquire have nothing in the kind column. So that this information will be available on the impressions of my playlists, is there a way I can key this information in me?

    2. I was unhappy to see small numbers began to appear to the left of the names of my songs, and I'm sure that must have been added when I said to organize my library. Is there a way I can get rid of them now?

    3 re the small icons 'cloud' next to my name of the song: one with the line through it saying "duplicate". If I delete one of them, I will always have it on my PC? (This whole business of some things being only in iCloud I do not understand yet.)

    4. a few other icons 'cloud' have an exclamation in them, which means that it is not able to be downloaded to iCloud due to an error. In all cases, there are an extra copy of the file in my library. Is this the reason why it didn't download?

    5. I'm fighting a lot to try to understand how certain things can be on iCloud and others do not. I mainly paid my $25 to Match service so I could keep transfer my playlists (and songs) to other computers on my LAN House (at this point, I don't have an iPad, iPhone or etc..). Now, I noticed that in the preferences that I can share my share my library on my network, which is an Ethernet wired with 4 PC and a Mac. If I check that box library share will I still game?

    6. on the other hand, if I want to share a playlist with a friend who has iTunes, I would want to use game for this?

    7. Finally, I know especially with PCs; I just bought the Mac this month. I find it there any equivalent to the files of Microsoft Explorer, except on an external hard drive, I connected to it. Specifically, I can't find the directory structure accessed by iTunes - a feature that could be very useful for me, for example in the collection in a single folder the files of one kind or a particular type (for example MP3). We're not supposed to do that?

    I hope that the answers to these questions will be useful to others, too.

    Thank you.

    1. You can use Get Info and enter the relevant information yourself. Select the album or the titles you want to edit and press CMD + I (Mac) or Ctrl + I (Windows).
    2. You see these numbers in a separate column in iTunes or in the name column, or in the Finder? ITunes is generally tracks numbers which are useful for playback of tracks in an album in the correct order. In some cases where the unmarked files are imported into iTunes, for example those in .wav format, numbers in the file name will become the name of the track in iTunes and other properties such as artist or album will be missing.
    3. See on iCloud library icons and status - Apple Support. If your support is not entirely possible that different versions of the same track are treated as duplicates so that they should not be. If you have duplicates real then they should be cleaned.
    4. Once again see on iCloud library icons and status - Apple Support. This indicates an error with a load of attempt.
    5. iTunes game is a great service if you want to replace any old purchases DRM with DRM 256 k new releases, like on the continuous access go to the entire library of your iOS devices or keep libraries iTunes on two remote sites in sync without manually copying files to and from portable hard drives. If the goal is simply to move a library from one computer to another, it's usually better achieved by copying the folder iTunes set to a portable player and then copying it in the new computer. A network share can also be used.
    6. You can't easily share a playlist with a friend. Normally iTunes playlists are sorted in lists of references to tracks in your library. They work only import if all the tracks already exist in the same paths that stored in the list. Having said that this is something which can be done in a certain measure with music from Apple, because each user has access to a common library of streaming content from the iTunes Store and their rights to listen to it.
    7. Equivalent of the Mac of the Explorer Windows is called Finder. It should be pretty easy to find. Macs are more lenient if you move the files in the same volume, but usually don't. Let iTunes manage physical files on disk when you store the logical organisation within the library. See make a split portable library for images of the typical presentation of the iTunes library. The images come from Windows, but the General layout on a Mac is the same.

    TT2

Maybe you are looking for

  • Impossible to use any website with Java

    Good then since I updated to Firefox 4 I can't use any Java at all. I tried searching for a solution, but none of them work. When I go to an area that requires Java, it tells me I don't have Java installed, and there is nothing wrong with my plugins.

  • Speakers got jumpy/jump music

    Hi all My speakers suddenly got nervous when I booted up my mac today, when I played the music from iTunes, speakers have played an image of the song then jumped the next image. He reiterated that for the entire song. It's not something wrong with my

  • A7000: How can I make the smartphone as a USB storage device when I connect to the computer?

    When I connect the a7000 to my PC, it shows the Lenovo_Suit but I want to reach my data inside without using the MagicPlus.

  • Removed my volume controls TV

    I accidentally deleted my TV from my hp Pavilion g7-1070us Notebook PC's volume controls (windows 7).» I went from the use of the device to "use this device (enabled)" to 'do not use this device (disabled);' now I can't hear any sound when when I hav

  • No sound on T61p after going to Windows 7

    I installed Windows 7 RC build and lost all sound. I looked around, but it doesn't seem like there is still a driver out. Is this correct? I tried to install the latest driver (6.10.2.5510) in Vista compatibility mode, but that did not help either. W