Help with sub movieclips appear/disappear

Hey folks, looking for some early feedback. So in a large movieclip that I drag, I have sub movieclips. Due to them being large they cause the drag/flick/scroll get clunky at times. So I thought about dynamically loading them depending on where the main movieclip is based on a Y state. So this seems to work BUT before I go down this long road, there has to be a better way do this. I've bolded the way I'm planning to go about it.
function mouseDownHandler(event: MouseEvent): void {
  TweenLite.killTweensOf(main);
  y1 = y2 = main.y;
  yOffset = this.mouseY - main.y;
  yOverlap = Math.max(0, main.height - bounds.height);
  t1 = t2 = getTimer();
  main.stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
  main.stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
function mouseMoveHandler(event: MouseEvent): void {
  var y: Number = this.mouseY - yOffset;
  //if main's position exceeds the bounds, make it drag only half as far with each mouse movement (like iPhone/iPad behavior)
  if (y > bounds.top) {
  main.y = (y + bounds.top) * 0.5;
  } else if (y < bounds.top - yOverlap) {
  main.y = (y + bounds.top - yOverlap) * 0.5;
  } else {
  main.y = y;
  blitMask.update();
  var t: uint = getTimer();
  //if the frame rate is too high, we won't be able to track the velocity as well, so only update the values 20 times per second
  if (t - t2 > 50) {
  y2 = y1;
  t2 = t1;
  y1 = main.y;
  t1 = t;
  event.updateAfterEvent();
  if (main.y < 30) {
  main.OFbandTWO.visible = true;
  } else if (main.y < 20) {
  main.OFbandTWO.visible = true;
  main.OFbandTHREE.visible = true;
  } else if (main.y < 0) {
  main.OFbandTWO.visible = true;
  main.OFbandTHREE.visible = true;
  main.OFbandFOUR.visible = true;
  } else {
  main.OFbandTWO.visible = false;
  main.OFbandTHREE.visible = false;
  main.OFbandFOUR.visible = false;
function mouseUpHandler(event: MouseEvent): void {
  blitMask.bitmapMode = true;
  main.stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
  main.stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
  var time: Number = (getTimer() - t2) / 1000;
  var yVelocity: Number = (main.y - y2) / time;
  ThrowPropsPlugin.to(main, {
  throwProps: {
  y: {
  velocity: yVelocity,
  max: bounds.top,
  min: bounds.top - yOverlap,
  resistance: 50
  onUpdate: blitMask.update,
  ease: Strong.easeOut
  }, 2, 0.3, 0.5);
  blitMask.bitmapMode = false;

also if I want to have the item only appear when it's on the stage and be not visible when off it, I figured i'd use a set of y coordinates that when it's between them, change vis to true, when not, change vis to false. But the logic is escaping me. So if I want band "two" only visible when on the stage, would this work?
  if (main.y < 30 || main.y > -400) {
  main.OFbandTWO.visible = true;

Similar Messages

  • Need help with slideshow widget appearing online

    Hey out there a big thanks in advance for this.
    I have slideshow widgets set up for my artwork and graphics pages on my website and they were working fine before the last Muse update.  I then went into Muse to add more images to said slideshows and export and upload them just like normal.  Everything went fine and then I finished uploading and viewed my site and the widgets did not appear...I also experienced some margin formatting difficulties but that is probably unrelated.  I have not changed any permissions and have not changed anything besides adding in a few images only to one of the two slideshow widgets.  I have completely deleted and re-exported and re-uploaded everything as in all of the files twice and still nothing.  I really need some help with this one as soon as possible.  Again a huge thank you.  To see my site please go to www.joeldsiegel.com  I have been using stablehost and the ftp client is CPanel if that is of any other help.  Thanks again!!

    Sorry, should've been more clear on that. Yes, the images
    have been converted to movie clips, adn the linkage ID's are
    img1-img8. The reasoning behind that is that, at some point, new
    pictures will take the place of the current pictures.
    The attempt at randomness is actually a leftover from a
    previous incarnation of this project. Ideally I'd like the pictures
    to always play through in the same order, but I'd like it to start
    at a random place in that order so it's not always the same image
    coming up when the page first comes up. So, basically, I left it in
    for lack of a better idea.
    As for the setInterval() and runTimer() and "Void" question,
    that part is complete patchwork on my part. I'm not surprised that
    I missed something or included something extra. There isn't any
    code beyond what's attached in my previous post.
    I think, at the time, I was hoping that the "if(timePassed
    > nTimeout){" part was on the right track, but are you saying
    that the void cancels that part out?

  • Need help with duplicating Movieclips!!!

    Hi! I have a movie where I want to call in a movieclip from
    the library (circleMC) and duplicate it 20 times horizontally and
    15 times vertically and offsetting the new duplicates by 20 pixels
    in both directions to fill the stage.
    Also it would be neat if I could set a slight time delay
    between the duplications.
    So far I have the following script but this doesn't
    duplicates the clip in the y direction:
    count = 1;
    while (count<20) {
    _root.circleMc.duplicateMovieClip("circleDup"+count, count);
    setProperty("circleDup"+count, _x, count*20);
    count++;
    Can somebody help with this issue? thank you in advance for
    any help, Attila

    Hi,
    you could use something like this:
    var count:Number = 1;
    function duplicate(){
    _root.attachMovie("circleMC","mc"+count,count,{_x:count%20*20,_y:count%15*20});
    count++;
    if (count == 20) clearInterval(intervalID);
    var intervalID:Number = setInterval(duplicate,100);
    The library symbol must have the linkage ID 'circleMC'
    (rightclick on the MC in the library > linkage > export for
    AS). The attachMovie method can have an initObject parameter where
    you can set the _x and _y properties. The MC gets attached with
    those properties. To have it delayed, put it all in a setInterval.
    hth,
    blemmo

  • Help with sub-menus

    I need to add four more pages to my website already setup and running.  I want to add the additional pages under one of the pages already functioning.  Like a sub file or something on that particular page. 
    Ex;
    Page 1
    Page 2
    Page 3 —page 3a; page 3b; page 3c; page 3d
    Page 4
    Page 5
    Page 6
    I used DW CS5, two column, liquid with left sidebar, header and footer.  I would n’t like to mess with my left side navigation bar unless unavoidable.
    I need the whole procedure from A to Z, since new to DW.
    Any help given is very much appreciated.

    Go to File > New > Blank HTML page > Layout [none].
    File > SaveAs > SpryTest.html
    Insert > Spry > Spry Menu bar...
    Now you can see Spry code.
    Before you customize your Spry CSS, read these links:
    Spry Menus 10 Commandments
    http://www.dwcourse.com/dreamweaver/ten-commandments-spry-menubars.php
    Fixing Spry Menus 1.6.1
    http://www.projectseven.com/testing/adobe-bugs/spry-menus/
    Nancy O.

  • Help with Sub-catalog CSS not rendering properly

    I am having a issue with  deep Sub-catalogs not displaying an external style sheet, possibly being overwritten by modulestylesheet?
    Sorry if it looks a little sloppy, the site is still a work in progress...
    If you look here at this main catalog : http://www.4plotters.com/shop/   --------- >the css is being applied properly,
    the next level down here : http://www.4plotters.com/shop/Toner-Ink  --------------> css also applied properly.
    but... when you go one more level deep   here : http://www.4plotters.com/shop/Toner-Ink/ink-wide-format  -----> css is not being applied from my external css (much of its functionality is to overwrite the modulestyle sheet) Notice the link colors change to blue, and the catalog images and headers don't match the catalogs before it.
    I have some other external twitter bootstrap css files that are still being applied, so I am a little confused. I am fairly new to css and html (and self taught) so I might be just missing some fundamental precedence rules.
    Thanks in advance!
    *Edit* When I change the parent catalog to the top level "Shop" catalog, the css is once again applied properly. It is something about being 2 or 3 levels deep that breaks the css link.

    Hi,
    Go into your template and remove the ".." prior to the CSS reference to help correct this issue. 
    Before:
    After:
    Hope this helps!
    -Sidney

  • Help with photos that appear in PSE8 with white sqares in lower right corners?

        All of a sudden some of my photos appear in PSE8 with completely white squares or rectangles in the lower right corner. About 1 in 30 or so.  Any ideas?
    Don

    Is this in the Organizer?  That could be indicating that the image file is used in a project.
    If that's not it, can you attach a screenshot here?
    Ken

  • Help with flipping movieclip

    in my code i made the option to change the direction of your
    character by pressing ctrl. this works fine, up until you press any
    other key, then it stops working. the wy it works is i made two
    frames on the character movie clip, one of him facing left, one of
    him facing right. all it does when i press ctrl is play(). but
    somehow this doesn't work...
    if anyone could help it would be much appreciated
    on a side note, does anyone know how to keep the same _x
    position when using _xscale to flip? that is when the movieclip
    moves. what happens to me is it flips the movieclip and gives it
    the opposite _x position from the center

    you probably want to use nextFrame() instead of play(). and
    how you adjust your movieclip's _x property after scaling depends
    upon the location of your movieclip's registration point.

  • Need help with optimizing text appearance when exporting video

    Here's what I'm trying to do:
    1. Convert a Powerpoint presentation to an MP4 (AVC) file, frame rate 30 (actually defaults to 29.97) and video bit rate of 1200kbps,using Wondershare PPT2VideoPro.  (There are no actual video clips contained in the original PPT file).
    2. Import the newly created MP4 video into a new project in Premeire Elements.
    3. Add audio files (WAV) created by Audacity.
    4. Export the final product as a video.
    Here's the problem:
    The text quality in the final exported film is very poor, and the screen occasionally seems to sublty flicker once and a while.  I've tried multiple different settings, but all with the same result.
    Can anyone offer suggestions on optimal settings for exporting the final product such that the text is as clear as possible?  (The text in the MP4 file created by Wondershare looks great.)
    Thanks!
    - Ernest

    One option would be to create the Text Images in Photoshop, and Save_As a PSD.
    For large sets of Titles, I do the text portion in Word/WordPerfect, so I can use Spell-Check. Then in PS, I just Copy/Paste the text into an Image, where I apply all of the PS Styles that I need. Because I use PrPro for most of my NLE work, I will often do the Titles with Layered Text, and Import those as a Sequence, so that the Layers are not Flattened. This allows me to independently animate each Layer, as I need. Unfortunately, PrE does not allow one to Import the Layered PSD's, Unflattened, as it does not have Sequences.
    Also note that PrE's Titler's Styles are just a starting point. Once applied, one can alter most aspects, and when they are satisfied with the changes, they can then Save the new Style and re-use it over and over. Do not forget the ability to modify those Styles.
    From PowerPoint, and this depends on the version, the best that one can usually do is to Export each "slide" as a TIFF, and Import those into the NLE program.
    Good luck,
    Hunt

  • Help with pages! It disappeared!

    Please, I need help. About an hour ago I was using pages on my iPad 2 and it asked me to upgrade to the latest version. I did so, but I got a message saying upgrading could not be completed. I kept on working on the document and then it froze and I closed it.
    Since then on, the app icon has disapeared. And, what is more, when I try to instal it again, through the app centre, it says it is already installed and  when I press the open button, it doesn't work.
    I have turned my iPad on and off twice but that doesn't do anything.
    Please help me!!

    Please clearly define "Drifting"

  • Help with a magically appearing Server

    Hey all,
    I don't know what else to title this post. I have searched everything I can think of for an answer and I just can't figure this one out!
    I use this Mac in a business setting. We have a PC servers we connect to for different things.
    OKAY...NOW!
    Suddenly one of these servers started magically popping up asking for my username and password. Out of the blue. Not when I've manually connected or anything. It just pops up with a box to enter information. It got so annoying that I finally told it to remember my information and now on startup it will mount the server.
    To make things worse sometimes this server will hang my system entirely. I try to trash it and it gives the spinning beach ball of death.
    Has anyone run into this and do you have any suggestions for what might be causing my computer to think it needs to mount this server. I have looked every where for the reason.
    Thanks!

    You lost me at netinfo. I don't have a clue what that is!
    Check BD's instruction below. After getting it open you want to navigate to /Mounts and see if there is anything listed there.
    I am the only user so I'm guessing this is the Root account.
    Doubtful. root is a system account not normally enabled for login or usage. Its more likeley you are the primary admin (GID 501) as opposed to root.
    How do you "bind your machine" perhaps I did this and didn't know?
    Well its not complex but i doubt you could do it by accident. But if your computer is administer by the IT staff at work then the network admin may have done it. If you have an IT department or Administrator you might want to check with them.

  • Help with Dreamweaver and appearance

    I'm new at creating websites. I need control of where to
    place stuff on the page so I'm using layers.
    I need to know HOW to format my page so that when people
    increase the font size on their browser, the whole page increases
    proportionally and doesn't look wonky.

    I think you must mean Lucille! Did they?
    "Murray *ACE*" <[email protected]> wrote
    in message
    news:[email protected]...
    > That would be "LUCY" please! And I think they both said
    it. 8)
    >
    > --
    > Murray --- ICQ 71997575
    > Adobe Community Expert
    > (If you *MUST* email me, don't LAUGH when you do so!)
    > ==================
    >
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    > ==================
    >
    >
    > "Baxter" <baxter(RemoveThe :-)@gtlakes.com> wrote
    in message
    > news:[email protected]...
    > >I thought Lucie said that???
    > > "Murray *ACE*"
    <[email protected]> wrote in message
    > > news:[email protected]...
    > >> > I'm new at creating websites. I need
    control of where to place stuff
    on
    > >> > the
    > >> > page so I'm using layers.
    > >> > I need to know HOW to format my page so
    that when people increase the
    > > font
    > >> > size on their browser, the whole page
    increases proportionally and
    > > doesn't
    > >> > look
    > >> > wonky.
    > >>
    > >> Simple. Don't use layers. Among many other
    unexpected and unpleasant
    > >> results, what you are asking to avoid is the
    very consequence of
    "needing
    > >> control of where to place stuff on the page so
    I'm using layers". In
    > > fact,
    > >> that's the very worst way to control where you
    are placing stuff on the
    > >> page.
    > >>
    > >> The best way to build your layout is to forget
    that layers exist.
    > > Instead,
    > >> use the normal flow of the page to stack your
    containers like building
    > >> blocks, and then use CSS float, margin and
    padding to get the
    horizontal
    > >> arrangement, and details of the vertical
    spacing right. If this sounds
    > > like
    > >> a foreign language, it is. As Desi said
    (paraphrased) "You got lots of
    > >> learnin' to do"!
    > >>
    > >> Start here -
    http://www.w3schools.com. The
    more you know about HTML
    and
    > >> CSS, the less you need to know about DW.
    > >>
    > >>
    > >> --
    > >> Murray --- ICQ 71997575
    > >> Adobe Community Expert
    > >> (If you *MUST* email me, don't LAUGH when you
    do so!)
    > >> ==================
    > >>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    > >>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    > >> ==================
    > >>
    > >>
    > >> "natalinacarp"
    <[email protected]> wrote in message
    > >> news:[email protected]...
    > >> > I'm new at creating websites. I need
    control of where to place stuff
    on
    > >> > the
    > >> > page so I'm using layers.
    > >> > I need to know HOW to format my page so
    that when people increase the
    > > font
    > >> > size on their browser, the whole page
    increases proportionally and
    > > doesn't
    > >> > look
    > >> > wonky.
    > >> >
    > >>
    > >
    > >
    >

  • Help with scroll/throw a movieclip

    hey guys,
    I'm not an expert coder by any means and this is for a proof of concept. I have a large movieclip called "main" that contains sub movieclips of pictures. Now the code I have put in below allows me to drag and throw the main moviecilp like a regular parallax web page. Due to the size of the photos and child movieclips it's a little choppy, only when I flick the movieclip. So can you guys see any way to clean this code up? I've looked at reducing the size of the child mcs but I still get a stutter if someone flicks it quick. Or do you wizards know any other code snippets that will do what I need in a more concise and effective manner? Listen, any help is greatly appreciately. BTW i'm using the throwprops plug in by greensock.
    main.CFbandEIGHTEEN.CFbandEIGHTEENbutton.addEventListener(MouseEvent.CLICK, CFbandEIGHTEENbutton);
    var bounds: Rectangle = new Rectangle(0, 0, 1280.15, 720);
    var blitMask: BlitMask = new BlitMask(main, bounds.x, bounds.y, bounds.width, bounds.height, false);
    blitMask.bitmapMode = false; // allows me to click on the child movieclips
    var t1: uint, t2: uint, y1: Number, y2: Number, yOverlap: Number, yOffset: Number;
    blitMask.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
    function mouseDownHandler(event: MouseEvent): void {
      TweenLite.killTweensOf(main);
      y1 = y2 = main.y;
      yOffset = this.mouseY - main.y;
      yOverlap = Math.max(0, main.height - bounds.height);
      t1 = t2 = getTimer();
      main.stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
      main.stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
    function mouseMoveHandler(event: MouseEvent): void {
      var y: Number = this.mouseY - yOffset;
      //if main's position exceeds the bounds, make it drag only half as far with each mouse movement (like iPhone/iPad behavior)
      if (y > bounds.top) {
      main.y = (y + bounds.top) * 0.5;
      } else if (y < bounds.top - yOverlap) {
      main.y = (y + bounds.top - yOverlap) * 0.5;
      } else {
      main.y = y;
      blitMask.update();
      var t: uint = getTimer();
      //if the frame rate is too high, we won't be able to track the velocity as well, so only update the values 20 times per second
      if (t - t2 > 50) {
      y2 = y1;
      t2 = t1;
      y1 = main.y;
      t1 = t;
      event.updateAfterEvent();
    function mouseUpHandler(event: MouseEvent): void {
      main.stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
      main.stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
      var time: Number = (getTimer() - t2) / 1000;
      var yVelocity: Number = (main.y - y2) / time;
      ThrowPropsPlugin.to(main, {
      throwProps: {
      y: {
      velocity: yVelocity,
      max: bounds.top,
      min: bounds.top - yOverlap,
      resistance: 50
      onUpdate: blitMask.update,
      ease: Strong.easeOut
      }, 2, 0.3, 0.5);

    anyone?

  • All navigational subheadings near top of screen in previous version of ff disappeared when installed ff4. they included Wikipidia, news(with sub-options LA times, NY times,BBC etc), YouTube, mail & others. how do i recover previous version?

    all navigational subheadings near top of screen in previous version of ff disappeared when installed ff4. they included wikipedia, news(with sub-options LA times, NY times, BBC etc),YouTube, mail & others. how do i recover previous version?

    You are welcome. I'm glad you got it back up.
    (1) You say you did the symbolic link. I will assume this is set correctly; it's very important that it is.
    (2) I don't know what you mean by "Been feeding the [email protected] for several weeks now, 700 emails each day at least." After the initial training period, SpamAssassin doesn't learn from mail it has already processed correctly. At this point, you only need to teach SpamAssassin when it is wrong. [email protected] should only be getting spam that is being passed as clean. Likewise, [email protected] should only be getting legitimate mail that is being flagged as junk. You are redirecting mail to both [email protected] and [email protected] ... right? SpamAssassin needs both.
    (3) Next, as I said before, you need to implement those "Frontline spam defense for Mac OS X Server." Once you have that done and issue "postfix reload" you can look at your SMTP log in Server Admin and watch as Postfix blocks one piece of junk mail after another. It's kind of cool.
    (4) Add some SARE rules:
    Visit http://www.rulesemporium.com/rules.htm and download the following rules:
    70sareadult.cf
    70saregenlsubj0.cf
    70sareheader0.cf
    70sarehtml0.cf
    70sareobfu0.cf
    70sareoem.cf
    70sarespoof.cf
    70sarestocks.cf
    70sareunsub.cf
    72sare_redirectpost
    Visit http://www.rulesemporium.com/other-rules.htm and download the following rules:
    backhair.cf
    bogus-virus-warnings.cf
    chickenpox.cf
    weeds.cf
    Copy these rules to /etc/mail/spamassassin/
    Then stop and restart mail services.
    There are other things you can do, and you'll find differing opinions about such things. In general, I think implementing the "Frontline spam defense for Mac OS X Server" and adding the SARE rules will help a lot. Good luck!

  • Help with menus, sub menus and such.....

    Hello
    I have spent ages getting to this point and after checking everything over and over and over yet again I cannot figure out what is happening with the menus at the top of my page.
    The first menu "Garrett Smith" operates fine. The sub menus appear directly under it as they should when it is moused over.
    It is the second menu "Work" in which I am having a problem. When you mouseover "Work", "View by Discipline" should open directly underneath. Once "View by Discipline" is clicked the four submenus should then open, again directly underneath "Work" and "View by Discipline". Then once "Print", "Printmaking", "Illustration" or "Photography" is moused over the test menus should in turn pop up to the side of them lining up with the top of each, depending on which one is moused over.
    I have checked my CSS, javascript and everything else over and over. I imagine it is something simple that I am simply overlooking as I have been searching though all of this for the better part of the day so it is all blending together.
    Here is the link to the site if you need to see my attempts thus far:
    http://garrettsmithprintdesign.com/
    Any help would be greatly appreciated.

    Hi Garrett,
       I'm not as familiar with a jquery script, but in many of the drop-downs I've created, the submenu is built as a nested sub-set of it's parent... for instance instead of this:
    <li class="printbutton"><a href="#">Print</a></li>
    <li class="printmakingbutton"><a href="#">Printmaking</a></li>
    <li class="illustrationbutton"><a href="#">Illustration</a></li>
    <li class="photographybutton"><a href="#">Photography</a></li>
                    </ul>
              </li>
              </ul>
    <div id="print">
    <ul id="printmenu">
    <li><a href="#">test</a></li>
    <li><a href="#">test</a></li>
    <li><a href="#">test</a></li>
    <li><a href="#">test</a></li>
    </ul>
    </div>
    You may have something that looks more like this:
    <li class="printbutton"><a href="#">Print</a>
      <ul>
       <li><a href="#">test</a></li>
       <li><a href="#">test</a></li>
       <li><a href="#">test</a></li>
       <li><a href="#">test</a></li>
      </ul>
    </li>
    <li class="printmakingbutton"><a href="#">Printmaking</a></li>               
    <li class="illustrationbutton"><a href="#">Illustration</a></li>
    <li class="photographybutton"><a href="#">Photography</a></li>
    </ul>           </li>           </ul>
    This is just an example - NOT the solution, but I think this will put you more on track if you experiment a bit along these lines. Note that closing "<li> tag for the "print" link is AFTER the nested "<ul> tags of it's submenu.
    Also, if this is still problematic, note that there are tons of free samples on the web (as well as many you can purchase). Also, I've found  Dreamweaver's "Spry menu system" isn't a bad place to start - it does have a few bugs, but it begins with a very basic double-drop down menu that you can fairly easily customize by editing the css...
    Hope that helps,
    Jesse

  • Not having ALL the sub links appearing on top of page? Please help...

    Is there any way to set up a "main" page for the photo gallery on iWeb, and have that particular page link to various sub pages, without having all the sub galleries appear in the link section at the top of the page?
    To be more clear, I am a graphic designer and when I am in "Design" and you click on "Identities" it takes you to a new page with a logo, then you click next, see the next one...ect...but all these sub pages appear.... I just want "Design" to be up there, not all the sub pages.
    Thanks a lot to whomever can figure it out... getting frustrated here : (

    Welcome to the discussions. In iWeb, display the page you don't want to be displayed in the navigation menu, and in the Inspector > Page tab, uncheck "Include page in navigation menu". (Repeat that for each page you don't want to be displayed in the navigation menu.) Here's a _video tutorial_.

Maybe you are looking for