Zoom In/Out Auto

I'm doing a project in Macromedia Director MX 2004 (windows
xp). The project includes a gallery.
I would like to know how you can have a zoom in auto effect
when you rollover the mouse pointer on a thumbnail of the gallery
and a zoom out effect when you leave the thumbnail area (something
like the Bar Menu on Mac OS). Please! Any help would be useful!
Thanks

That is a terrible way to do your zoom effect. For several
reasons.
Using globals for the a,b,c, and d values is overkill. Unless
other
sprites need access to those values, it is better to use
properties, and
in fact, you can use a single property to store the entire
rect. Also,
you don't need to hard code the values. The way I did it will
store the
original rect that you set in authoring mode, so you can use
the same
behaviour without any changes on multiple sprites. Also,
doing your
scaling on mouseWithin is not a good idea for several
reasons. First
off, it is difficult to make it zoom back out since there is
no
opposite, like mouseNotWithin. Second, it messes up some time
based
animations, so using enterFrame like I did here is a better
method.
Basically, there is a property called pGrowing which is set
to 0 at
first. When it is 0, nothing happens. On enterFrame, it gets
set to 1.
As long as pGrowning is 1, then it will start to scale
upwards, until
it is 10 pixels larger in each direction, then pGrowing gets
set back to
0 so it stops growing.
And on mouseLeave, it gets set to -1 which means start
shrinking. And
the same process happens in reverse.
Watch for inadvertent line breaks... this should be exactly
35 lines of
code.
property pGrowing, pRect
on beginSprite me
pRect=sprite(me.spriteNum).rect
pGrowing=0
end
on mouseEnter me
cursor 280
pGrowing=1
end
on mouseLeave me
cursor -1
pGrowing=-1
end
on enterFrame me
case pGrowing of
1: --growing
if sprite(me.spriteNum).rect[1] = pRect[1]-10 then
pGrowing=0
else
sprite(me.spriteNum).rect =
sprite(me.spriteNum).rect+rect(-1,-1,1,1)
end if
-1: --shrinking
if sprite(me.spriteNum).rect[1] = pRect[1] then
pGrowing=0
else
sprite(me.spriteNum).rect =
sprite(me.spriteNum).rect-rect(-1,-1,1,1)
end if
end case
end

Similar Messages

  • Browsers auto zoom in/out

    Hello,
    Recently my browsers (safari,chrome) behave oddly, it auto zoom in/out, sometimes really fast like it shaking or something, so far it only happens when i'm using Wacom tablet, I don't know exactly when this started, I guess when I upgraded to 10.6.6, i've asked Wacom Support they suggested to re-install driver, but still problem persist. Maybe anyone here knows what's going on?

    Must be a setting on the tablet. You need to speak to Wacom.

  • Adobe illustrator CC Zoom in & out problem

    Hi,
    I am facing an issue right now..
    When i open a large AI file that above 1GB, then i zoom in & out .. the design will go out of form.
    However, when i open small file like 400+ MB, no issue on zoom in & out.
    I really no idea for this issue..
    Here is my PC spec,
    Windows 8.1 Professional
    3.40 gigahertz Intel Core i7
    32GB RAM
    NVIDIA GeForce GTX 650
    TQ.

    Moving this discussion to the Illustrator forum.
    Wandasgirl I would recommend reviewing your installation logs for errors.  Please see Troubleshoot install issues with log files | CC - http://helpx.adobe.com/creative-cloud/kb/troubleshoot-install-logs-cc.html for information on how to locate and interpret your installation log files.  You are welcome to post any errors you discover to this discussion.

  • Alt & scroll wheel not working on Photoshop CC to zoom in / out

    Hey! So i'm using the latest version of Photoshop CC, and i'm also running the Technical Preview of Windows 10. So In Photshop, usually when you hold the alt key and scroll with the scroll wheel on your mouse, it will zoom in / out of the image on Photoshop. Well i'm having some problems with that, it isn't working at all. In preferences I have it set to zoom with scroll wheel. Anyone know why it isn't working? Could it be something with the Windows 10 Preview?

    Please report Windows 10 issues to Microsoft, so they can get the information they need to fix the OS bugs before shipping the final version.

  • Zoom in-out and rotation in trackpad doesn't work in iPhoto and Aperture. Any solution?

    Zoom in-out and rotation in trackpad doesn't work in iPhoto and Aperture. Any solution?

    Sound like a trackpad problem and not an iPhoto one.  Have you asked in the forum dedicated to the Mac model you're using or is this an add on trackpad?
    OT

  • Alt + mouse scroll (Zoom-In/Out) doesn't work. [was: Why it doesn't work in Illustrator?]

    Alt + mouse scroll (Zoom-In/Out) doesn't work in my illustrator program.
    What should I do?

    It is a know issue, no solution for the moment.
    But Adobe is working on this see here-> http://forums.adobe.com/message/5423070#5423070

  • Sometimes when panning with the hand tool, it zooms way out instead of just moving the canvas

    So normally when you hold the space key and drag, it just moves the canvas, but every now and then, seemingly randomly, it zooms way out and shows a little box which is the size and shape of the area of canvas I was previously looking at. If I move the box and let go of space, it zooms to that location, but all I wanted was to move normally. I don't think I've ever wanted the zoom out, move, then zoom back in behavior. What causes that? How do I make it stop?

    It's "bird's eye view" and by coincidence, your problem was discussed in another thread last night: Problem with zoom in Photoshop CS6

  • I am unable to zoom in/out using the touch pad; yesterday i could zoom in/out of website pages, pics, etc, now today it is not letting me; how do i fix this?

    i am unable to zoom in/out using the touch pad; yesterday i could zoom in/out of website pages, pics, etc, now today it is not letting me; how do i fix this?

    See Here  >  http://support.apple.com/kb/HT1212

  • T510: TouchPad no longer allowing for zoom in/out

    My TouchPad is all the sudden no longer allowing for zoom in/out.  How do I restore that function. 
    Moderator Note: Edited subject to match content.

    My T520 has recently developed a similar problem.
    With no obvious warning it now seems unable to recognise the trackpad/point. I've tried various combinations of uninstalling/installing drivers etc with no success.
    When clicking on the mouse tab in Control Panel an error message says: Unable to connect to the Synaptics Pointing Device. It then suggests removing the synaptics driver and then reinstalling other mouse drivers. This doesn't make sense as I don't have any other mouse drivers installed (bar the in-built Win7 ones which can't be removed anyway). Then rebooting the system results in no pointing devices being available at all. The trackpad gets recognised as a PS2-compliant device and prompts installation of drivers (from synaptic) which just gets back to square one.
    Also, the control panel mouse tab won't show the ultranav utility even though that is installed properly.
    So, I'm having to use an external mouse as the system doesn't seem to be able to properly use the trackpad/point. I'll keep troubleshooting but suspect this may be a software/driver issue as it was working perfectly up until recently and the hardware can still "see" the device. Both are enabled in BIOS.
    Any other people experienced similar problems?
    T520 (4242-CTO) Win7 64Pro

  • ScrollPane zoom in/out

    Hello, this is my first post.
    I'd like to add zoom in/out function to my ScrollPane, and make shortcut (CTRL+MOUSE SCROLL UP/DOWN) for it. ( like Inkscape )
    I made the following code ( Canvas ) to achieve this, but have some problems.
    *1. How can I prevent ScrollBar's thumb to move when pressing CTRL?*
    When ScrollBar is visible and ScrollBar's thumb (or scroller, knob) has room to move, CTRL+MOUSE SCROLL UP/DOWN doesn't work because the thumb moves instead of zooming in/out.
    When the thumb moves up/down to bar's end, then zoom in/out finally works fine.
    *2. ScrollEvent handler is sometimes not called in ScrollPane*
    When ScrollBarPolicy is not ScrollBarPolicy.ALWAYS and Scrollbar is not visible, SOMETIMES CTRL+SCROLL UP/DOWN operation dosen't work.
    (ScrollEvent handler is not called. For other panes, ScrollEvent works fine. Please check MouseScrollEventTest below)
    Thank you in advance.
    Canvas
    public class Canvas extends Application {
         DoubleProperty zoom = new SimpleDoubleProperty(1.0);
         final double MAX_ZOOM = 3.0;
         final double MIN_ZOOM = 0.1;
         @Override
         public void start(Stage stage) throws Exception {
              Rectangle rectangle = RectangleBuilder.create()
                   .width(1000).height(1000)
                   .fill( LinearGradientBuilder.create()
                        .stops(new Stop(0, Color.BLUE), new Stop(1, Color.RED))
                        .build()
                   ).build();
              ScrollPane scrollPane = ScrollPaneBuilder.create()
                   .content(
                        GroupBuilder.create()
                             .children(rectangle)
                             .build())
    //               .hbarPolicy(ScrollBarPolicy.ALWAYS)
    //               .vbarPolicy(ScrollBarPolicy.ALWAYS)
                   .build();
              rectangle.scaleXProperty().bind(zoom);
              rectangle.scaleYProperty().bind(zoom);
              scrollPane.setOnScroll(new EventHandler<ScrollEvent>(){
                   public void handle(ScrollEvent event) {
                        if( !event.isControlDown() ) return ;
                        double zoomValue;
                        if ( event.getDeltaY() > 0 ) {
                             zoomValue = zoom.get() + 0.1;
                        } else {
                             zoomValue = zoom.get() - 0.1;
                        if( zoomValue > MAX_ZOOM || zoomValue < MIN_ZOOM ) return ;
                        zoom.set(zoomValue);
              Scene scene = SceneBuilder.create()
                        .width(500).height(500)
                        .root(scrollPane)
                        .build();
              stage.setScene(scene);
              stage.show();
         public static void main(String[] args) {
              launch(args);
    Mouse Scroll Event Test
    public class MouseScrollEventTest extends Application {
         BorderPane bPane;
         ScrollPane sPane;
         public void start(Stage stage) throws Exception {
              EventHandler<ScrollEvent> handler = new EventHandler<ScrollEvent>() {
                   public void handle(ScrollEvent event) {
                        System.out.println(event);
              bPane = new BorderPane();
              bPane.setPrefSize(100, 100);
              sPane = new ScrollPane();
              sPane.setPrefSize(100, 100);
    //          sPane.setContent( new Rectangle(50,50) );
    //             This works fine.
              bPane.setOnScroll(handler);
    //             Sometimes, this is not called.
              sPane.setOnScroll(handler);
              HBox root = new HBox();
              root.getChildren().addAll(bPane, sPane);
              Scene scene = new Scene(root);
    //          scene.setOnScroll(handler);
              stage.setScene(scene);
              stage.show();
         public static void main(String[] args) {
              launch(args);
    }--- My Environment
    Windows Vista
    JavaFX 2.0 SDK
    Edited by: 932474 on 2012/05/07 4:31
    Edited by: 932474 on 2012/05/07 4:47

    Thank you for the good example.
    But actually, I just give up using ScrollPane and created a ZoomCanvas which can zoom in/out and pan.
    The code is here.
    Any comments or improvement would be appreciated.
    ZoomCanvas
    public class ZoomCanvas extends StackPane {
         private ZoomController zoomController;
         private Group contentWrapper;
         private double translateXWhenMousePressed, translateYWhenMousePressed;
         private double xWhenMousePressed , yWhenMousePressed;
         private static class ZoomController {
              private int deltaCount = 0;
              private final double DEFAULT_ZOOM = 1.0;
              private boolean useAnimation = true;
              private DoubleProperty zoomMax   = new SimpleDoubleProperty(10.0);
              private DoubleProperty zoomMin   = new SimpleDoubleProperty(0.1);
              private DoubleProperty zoomDelta = new SimpleDoubleProperty(1.2);
              private DoubleProperty zoom      = new SimpleDoubleProperty( DEFAULT_ZOOM );
              public ZoomController() {
              public void zoomIn() {
                   double zoomValue = DEFAULT_ZOOM * Math.pow(zoomDelta.get(), deltaCount+1);
                   if( zoomValue > zoomMax.get() ) {
                        setZoom(zoomMax.get());
                        return;
                   deltaCount++;
                   setZoom( zoomValue );
              public void zoomOut() {
                   double zoomValue = DEFAULT_ZOOM * Math.pow(zoomDelta.get(), deltaCount-1);
                   if( zoomValue < zoomMin.get() ) {
                        setZoom(zoomMin.get());
                        return;
                   deltaCount--;
                   setZoom( zoomValue );
              public void setZoom( double zoomValue ) {
                   if( useAnimation ) {
                        Timeline zoomTimeline = new Timeline();
                        zoomTimeline.getKeyFrames().add(
                             new KeyFrame(Duration.millis(300), new KeyValue(zoom, zoomValue))
                        zoomTimeline.play();
                   } else {
                        zoom.set(zoomValue);
         public ZoomCanvas(Node content) {
              super();
              Rectangle clip = new Rectangle();
              clip.widthProperty().bind(widthProperty());
              clip.heightProperty().bind(heightProperty());
              // to adjust layoutBounds when drawingPane's scale changes
              contentWrapper = new Group(content);          
              StackPane.setAlignment(contentWrapper, Pos.CENTER);
              getChildren().add(contentWrapper);
              zoomController = new ZoomController();
              content.scaleXProperty().bind(zoomController.zoom);
              content.scaleYProperty().bind(zoomController.zoom);
              content.translateXProperty();
              hookEvents();
              setClip(clip);
         private void hookEvents() {
              setOnScroll(new EventHandler<ScrollEvent>() {
                   public void handle(ScrollEvent event) {
                        if( event.getDeltaY() > 0 ) {
                             zoomController.zoomIn();
                        } else {
                             zoomController.zoomOut();
              setOnMousePressed(new EventHandler<MouseEvent>(){
                   public void handle(MouseEvent event) {
                        if( !event.isMiddleButtonDown() ) return ;
                        translateXWhenMousePressed = contentWrapper.getTranslateX();
                        translateYWhenMousePressed = contentWrapper.getTranslateY();
                        xWhenMousePressed = event.getX();
                        yWhenMousePressed = event.getY();
                        setCursor(Cursor.MOVE);
                        event.consume();
              setOnMouseReleased(new EventHandler<MouseEvent>(){
                   public void handle(MouseEvent event) {
                        setCursor(Cursor.DEFAULT);
              setOnMouseDragged(new EventHandler<MouseEvent>(){
                   public void handle(MouseEvent event) {
                        if(!event.isMiddleButtonDown())
                             return;
                        contentWrapper.setTranslateX( translateXWhenMousePressed +  event.getX() - xWhenMousePressed );
                        contentWrapper.setTranslateY( translateYWhenMousePressed +  event.getY() - yWhenMousePressed );
                        event.consume();
    ZoomCanvasTest
    public class ZoomCanvasTest extends Application {
         public void start(Stage primaryStage) throws Exception {
              Rectangle rect = new Rectangle(0,0,100,100);
              rect.setStyle("-fx-fill: blue;");
              Circle circle = new Circle(100,100,50);
              circle.setStyle("-fx-fill: red;");
              Pane canvasContent = new Pane();
              canvasContent.setStyle(
                        "-fx-background-color: papayawhip;" +
                        "-fx-border-color: black;");
              canvasContent.getChildren().add(circle);
              canvasContent.getChildren().add(rect);
              ZoomCanvas canvas = new ZoomCanvas(canvasContent);
              canvas.setStyle(
                   "-fx-background-color: mistyrose;" +
                   "-fx-border-color: black;"
              ToolBar toolBar = new ToolBar();
              toolBar.setOrientation(Orientation.VERTICAL);
              toolBar.getItems().add( new Button("sample") );
              BorderPane root = new BorderPane();
              root.setCenter(canvas);
              root.setRight(toolBar);
    //          root.getChildren().addAll(canvas, toolBar);
              Scene scene = new Scene(root);
              primaryStage.setScene(scene);
              primaryStage.show();
         public static void main(String[] args) {
              launch(args);
    }Edited by: 932474 on 2012/05/08 10:17
    Edited by: 932474 on 2012/05/08 10:40
    Edited by: 932474 on 2012/05/08 10:56

  • After zoom in/out to open callout is wrong position

    Dear All
    After zoom in/out screen , i open callout.
    I'm having problems with its position
    code:
        <fx:Declarations>   
              <s:Callout   id="bCallout"
                      mouseDownOutside="bCallout.close()"
                      mouseUp="bCallout.close()"
                      backgroundColor="0x999999"
                      contentBackgroundAlpha="0"/>
       </fx:Declarations>
      <fx:Script>
         private function zoom_action(act:String):void {
                   var z:Number;
                    if(act=='+'){
                          z=0.25;
                    }else{
                           z=-0.25;
                    var my_matrix:Matrix = new Matrix();
                    my_matrix.scale(gr1.scaleX+z, gr1.scaleX+z);
                    gr1.transform.matrix=my_matrix;
       </fx:Script>
      <s:Group id="gr1">
              <s:Button id="btn1"  x="24" y="50" label="btnA" click="bCallout.open(btn1)"/>
              <s:Button id="btn2"  x="100" y="100" label="btnB" click="bCallout.open(btn2)"/>
               <s:Button id="btn3"  x="170" y="150" label="btnC" click="bCallout.open(btn3)"/>
      </s:Group>
      <s:Button id="zoomin" y="10" right="108" width="44" height="42" label="+" alpha="0.5"
                                    click="zoom_action('+')"/>
      <s:Button id="zoomout" y="10" right="59" width="44" height="42" label="-" alpha="0.5"
                                    click="zoom_action('-')"/>
    Any ideas what I'm doing wrong?

    You need a Mac user to come along and give you better advice, but meanwhile, Goggle
    photoshop cc lag yosemite
    You are _not_ alone.

  • Video zoom in/out

    i am having troulbe zooming in/out in video mode. i have to manually zoom in/out in photo mode, then go back to video mode to stay at those current settings, and shoot the video from there... how can i change my zoom lense in video mode?

    sniper8752 wrote:
    well thats dumb!
    The camera is not the video recorder, two separate applications, they don't interact.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Cant zoom back out  on iMac

    using magic mouse , i have accidently zoomed in and i cannot find how to zoom back out without actually having to close the program. i am a newbie - obviously.
    regards
    P

    Check your settings in:    System Preferences > Mouse
    Deselect:  Smart Zoom
    And check settings  in System Preferences > Accessibility > Zoom

  • Zoom in-out and rotation in trackpad

    Zoom in-out and rotation in trackpad doesn't work in iPhoto, Aperture, Preview, Finder. Any solution?
    It works perfect at safari

    What context in the Finder would you expect zoom to work?  same question for rotate?
    I am able to see rotate and zoom working in iPhoto and Preview.  I do not have Aperture so I cannot check.

  • OBI HD App No zoom in/out option

    Hi Experts,
    I have got Oracle BI HD App on my ipad2 and its pointing to OBIEE 11.1.1.6.8 version and Zoom in/out is not avialable in it. I can see the dashboards as i see on any web browser.
    Earlier when i pointed Oracle BI HD App to OBIEE 11.1.1.5.0 , zoom in/out option was avaiable and I need not have to scroll out horizontally(verticall scroll is fine).
    please provide inputs if there is any configuration required for OBIEE 11.1.1.6.8 version Zoom in/out so that whole dashboard tab fits into my ipad screen and zoom in/out can be used.
    Cheers
    Ankit

    Oracle Mobile HD on iPad Doesn't Allow to "Pinch to Zoom" or to Switch to "Mobile Layout" [ID 1534983.1]
    Follow - BUG:15940998 - OBIEE MOBILE FEATURES MISSING AFTER PATCHING FROM 11.1.1.5 TO 11.1.1.6.X
    HTH,
    SVS

Maybe you are looking for

  • Flash Player has screwed up my whole computer!

    My computer was working fine until last night. When I opened a page it said you may need to download ActiveX something or other and gave me a link to download Flash Player 10. The problem is it will not download all the way, it just pauses. I also tr

  • Cess on TDS is not calculating at the time of posting F-47

    Dear All, Cess on TDS is not calculating at the time of F-47 (vendor Down payment Requst) Mean system is deducting TDS amount only, not deducting Cess amount on TDS . at the time invoice posting Cess & TDS calculating in this company code (1111)     

  • Multiple logon pages according to aliaas

    hello all, I need to display different logon pages according to the url used to access the portal. can anyone please help me. I have tried portal aliases but this does not give the wanted effect. it is driving me crazy. thanks a lot for your time, ol

  • Officejet 5610 not able to create custom print sizes

    Hi -- I use my Officejet 5610 for both my work and my personal printing needs.  On my work computer which has Windows XP as the operating system,  when I got to Properties and Paper Options/Quality tab there is a button for me to select "Custom Size"

  • Help: Can't delete email account in OSX Mail

    I have verizon.net email account that I had to update because verizon changed the incoming and outgoing servers. Each of my family members has a separate profile on my Mac and I was able to successfully update their settings. I have the admin account