How to control timleline with mouse x coordinates
Hi,
Does anyone know a good tutorial on how to create a movie with a sequence of pictures and controlling the timeline frames with mouse x-coordinates?
Regards,
MH
basiclly,these swfs didn't work in mailtimeline movies.some of them were created by flash3D .
the point is some functions what created mouseX & DisplayMovies mapping like this
function mouseMoveH(e){
displayrender()
function mapping(){
return fun(mouseX)
function displayrender(){
showFrame(mapping)
Similar Messages
-
Control frames with mouse x coordinates
Hi,
I will try to rewrite an earlier question to be more precise:
I want to take a folder with 20 pictures, in some way convert them into a movie. And then apply so that I can navigate the frames one by one in the movieclip by moving the mouse right and left (move mouse left - navigate backwards frame by frame, move mouse right - navigate forward frame by frame).
Anyone knows a good tutorial for this? Or maybe some tips to get started? I'm pretty new to Flash CS3.
Thanks,
MHI don't know that there will be a good tutorial for this, if any, mainly because as described, it may not be a desirable means of controlling a movieclip's timeline. While the "in some way convert them into a movie" is your call, assuming that movie will occupy a timeline, the controlling of frames by moving the mouse may need a little more thought/criteria resolution.
If the desired control is to merely make it such that moving the mouse left or right changes it one frame for each movement, then you can use a variable that keeps track of the mouseX value (where the mouse was) and a MOUSE_MOVE listener to trigger a function that tests where it is. If the new mouseX value is greater than the stored value, the mouse moved right, so you advance one frame in the movie's timeline.
The thing with this approach is that you really want to wait for the mouse to stop moving before you process a command to move, or somehow otherwise build in some stalling, otherwise one movement could end up moving several frames of the movie. Also, one movement could limit how much space you have left to continue moving--running out of room to move.... You would need to sneak around to the opposite end of the stage at some point in order to keep moving in one direction.
It may be better to create another area/movieclip that you use as a stepper control... if you pass the cursor over it from left to right, it advances the movie one frame and vice versa. You use rollover and rollout detection to capture the position of the mouse for each event and that can tell you which way the mouse was moving. -
How to control HP8350B with HP83592A and HP8757A
I want to control HP8350B with plug in HP83592A and HP8757A by NI GPIB,using Labview language and print out HP8757A screen chart to printer, but when I sent command to HP8757A according to HP8350B manual ,such as "PT19",the instrument has no response,could andbody has experience on it and tell me how to do?
"[email protected]" wrote in
news:506500000008000000296D0000-1031838699000@exchange.ni.com:
> I want to control HP8350B with plug in HP83592A and HP8757A by NI
> GPIB,using Labview language and print out HP8757A screen chart to
> printer, but when I sent command to HP8757A according to HP8350B
> manual ,such as "PT19",the instrument has no response,could andbody
> has experience on it and tell me how to do?
After you send "PT19" to the 8757, usually at address 16.
Send the commands you want to go to the 8350 to address 17.
To terminate the passthru mode, send any command to address of the 16.
Ex:
To Address 16: PT19;
To Address 17: FA 8 GZ;FB 16 GZ;PL 0 DM;
To Address 16: C1 IA; -
Which is the best tool for PRC animation? and how to control it with javascript?
Hi I created animations through Deep Exploration. But I want to know how to create PRC animation with tools and how to control it? I already tried with tetra4D but the javascript can control only u3d format. I have no idea to control prc animation. Please let me know.
Thanks and Regards
Chenet0005 @ Chenthil KumarPRC files don't support embedded animations.
You can still control the mesh directly with 3D JavaScript (e.g. by using rotateInPlace and a time event handler) but you can't import a timeline as you can with U3D. -
How to control animation with touch
Hello! I need some help with controlling animations with touch. I am building a fake app and need to 'unlock' an iphone (slide an arrow along a track and then have it fade into another page). I have been using http://forums.adobe.com/message/4865693 that thread. The prototype link listed there is similar to waht I need to recreate, but I think I need an 'on touch' actino instead of a mousemove one.
http://assets.ordienetworks.com.s3.amazonaws.com/the_occasional/checkerPro/checkerPro.html
That is a link to the Edge file I have been working on, using the info in the thread above. It is broken at the moment, and I am terrible with javascript and have no idea how to move forward. I have figured that I'll need an 'on touch' action instead of the mouseover one, but I'm not sure how to build it.
If there is a working example of this on a different thread that I've missed I'd love a link as well!!
Thank you!!Hi, akall-
There are a number of touch events that you can use to accomplish what you want. You can try using the touchmove event instead of the mousemove event, and stick your code in there.
Hope that helps,
-Elaine -
How to control scrubbing with the keyboard?
The headline is already the question: I would like to use the keyboad to fast forwad in songs. In the 'itunes a-z' there is only an info how to do this with the mouse. Arrow Keys do not seem to work for this, they only switch to the next or previos song, or album. Ah, I am using utine s10.5.2.11 with WIndows 7.
Any idea?
Thanks, AlexHere are a few more to try:
setxkbmap
xkbset is the one I currently use, you can find at https://aur.archlinux.org/packages/xkbset/
keynav might also be worth a look. I haven't tried it though. It can be found in the AUR also. -
How to control display with X-Y Axis interval
Is there a graceful way to control the display of X, Y Axis in SVG chart with line mode?
When more records retrieved, it is hard to read from the X axis.
How does Axes settings work?
Thanks,
DanielIs there a graceful way to control the display of X, Y Axis in SVG chart with line mode?
When more records retrieved, it is hard to read from the X axis.
How does Axes settings work?
Thanks,
Daniel -
How to control DIO with VC++
Dear master.
This is south korea. Sorry I'm poor english.
I saw example file. but I can't found bit control (Just found byte control)
My project is Z-stage control with step motor.
check sensor(limit)
then If true generate pulse CW (for Step motor P3.7)
if false generate pulse CCW (for step motor P3.6)
now I can understand read data(8bit) and check one bit...
but I can't code write data(1 bit) for step motor
How can I do this...
Please help me...hi
i'm no pro yet, but i think you can use the following method
CNiDAQmxDigitalSingleChannelWriter :: WriteSingleSampleSingleLine( bool autoStart, bool data)
to send a single boolean sample to a single line ( as the name of the method tells you
hope this helps
regard, markus
Message Edited by QuickNick on 07-04-2005 09:38 AM -
I'm using LabView 6.1 on Win XP Pro. I'm trying to highlight points on a graph picked (by using a mouse click) by a user. The mouse click event returns x,y in pixels relative to the upper left corner. I know the upper left corner of my control. I also know the width and height of the plotting area within the control, but I don't know the position of the plotting area within the control. Without that piece of info, I can't do the mapping.
Hi,
You May Want to do this a bit Differently but achieve the same Goal i.e. the user Picks Points on a Graph and you highlight these points and Draw A graph or impart some other functionality.
Here is an idea -
1. Let the User Position the Cursor on the Point they want. To aid the user you can make the cursor legend visible which shows the X and Y Axis values for the cursor. To accuartely Position the User can use the the 4 Buttons that are a part of the Cursor Legend.
2. Put a Button next to the graph saying "Select this Point"
3. After Positioning the Cursor when the user Clicks this Button you use the "Cursor Position" Property of the graph to extract the value of the cursor.
4. Next you may want to add this Point to Cluster Array which displays
the Points on the Graph. If this Array is Empty and you add this one Element to the Graph then this Point will be Visible. The User may now reposition to another Point and Repeat the Process.
5. To aid the user you may want to Provide " Delete last Point" and "Clear All" Buttons. The Functionality is to Delete Last Element in array or Clear all Elements in the Array.
The Structure of this whole routine probably is Event Structure(to trap Button Clicks "Select", "Delete" etc) Inside a Case Structure (State Machine to Perform the Operations User Clicked) All Inside a While Loop.
This is a Short Description of how this Functionality can be Built. To Automatically Extract Cursor position from the Graph and then try to Map it to Coordiante Axis For a Point is More Involved and a Little Convoluted.
Why not keep it simple? IF anything is unclear, I will be glad to explain or post an example (Only if time permits!!)
Good Luck
Mache
Good Luck!
Mache -
Controlling movie with mouse location
I am a designer trying to be a flash programmer and I have a
navigation idea that I've been struggling with. I am simply trying
to do this: put a movie on the stage and as the mouse moves closer
or farther from the movie, it plays forwards and backwards. The
movie I made is a circular logo with navigation buttons curling out
from it like a jack knife. My idea is to have the buttons curl out
as the user moves the mouse closer to the logo and curl back in as
the mouse moves away.
I understand the coding concept - calculate where the cursor
is on the stage, figure out the distance of the cursor to the logo
movie, and just go to certain frames in the logo movie based on
that distance.
I have the stage, the logo movie, and even the code to figure
out the the mouse location. But beyond that, I need help. I just
don't know enough about actionscript syntax and although
conceptually this seems like a basic exercise, I really don't know
where to start. If anyone is willing to help, the .fla file can be
downloaded here:
http://0099d33.netsolhost.com/westside-home2.fla
Thanks so much for any help you can offer.
nullYou would replace the one mDistance line in your original
with the three I've given you. But if you weren't able to figure
that bit out, you might not be able to figure out how to modify the
whichFrame line either? Do you have a conceptual understanding of
what your code is doing? Being able to read the code and understand
what it is doing is really central to Actionscript. So here goes:
mcLogo.onEnterframe: this is attaching some code that will
repeat at the frame rate of the movie to the mcLogo instance. Even
if there is a stop() on the timeline, this code will continue to
repeat at the framerate set by your movie. By attaching it to
mcLogo your scope will be mcLogo.
In both version the next line (or three in my case) say find
the distance between the current mouse position and this._x (for
example). Since we are inside an onEnterFrame which is attache to
mcLogo, so "this" refers to that time line. So this._x is saying
the _x location of the mcLogo clip.
If you remember basic geometry a right hand triangle's long
side (the hypotenuse) is given by h^2 = a^2 + b^2. (The square of
the hypotenuse is equal to the sum of the squares of the other two
sides.) So we are figuring out how far between mcLogo and the mouse
in the x and the y directions. This gives us the other two sides.
So the distance between the mouse and the clip is the square root
of the sum of the squares of those two sides.
Finally since you need to adjust the distance to some scale
of the number of frames you have added to your clip. So your have
some code that makes the distance proportional to the number for
frames in your clip.
As for the second part of your question, "Don't use scenes!"
So that makes that easy. Scenes are great tools for organizing your
timelines when you are just doing some timeline-based animations.
But when using Actionscript there are some bugs and limitation in
scenes and you are only asking for trouble.
So if you have this code say on frame ten with a stop().
There is no looping that needs to happen. The onEnterFrame will
continue doing the animation until someone clicks.
Add maybe ten blank frames after 10 and then on frame 20 put
your new thing you want – perhaps even give it a frame label
called, "home" or "about" or whatever section it is about. Then you
can use:
this.gotoAndPlay("about");
Also don't forget that you will want to remove the
onEnterFrame event because otherwise it will keep running. So you
should probably also include:
delete mcLogo.onEnterframe; -
Unwanted Mission control openings with mouse movement
Many times Mission Control will open when I make a fast movement up or down with Magic Mouse. It's happening more and more, and very annoying.
ais there any way to turn it off? I can't figure out what iscausing it. Thanks - RickIt's caused by a double-tap with two fingers on top of the Mouse.
You can turn it off in System Preferences > Mouse > More Gestures tab > uncheck Mission Control.
Regards,
Captfred -
How to highlight Icon with mouse click ?
This program will open up a JFileChooser, Select one or more than one images from your computer. It will display them as Icons.
I am trying to highlight any icon with mouseclick from the program below but I am not able to do it. Please help. Thanks in advance.
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.RenderingHints;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.image.BufferedImage;
import java.io.File;
import javax.swing.*;
import javax.swing.border.Border;
public class IconIllustrate extends JFrame implements ActionListener, MouseListener
JLabel[] lblimage = new JLabel[10];
JPanel panAttachment = new JPanel();
JPanel panButton = new JPanel();
JButton bAdd = new JButton("Add");
Component comp = null;
Component c = null;
boolean bolVal = false;
public IconIllustrate()
// TODO Auto-generated constructor stub
panButton.add(bAdd);
bAdd.addActionListener(this);
this.getContentPane().setLayout(new BorderLayout());
this.getContentPane().add(panAttachment, BorderLayout.CENTER);
this.getContentPane().add(panButton, BorderLayout.SOUTH);
* @param args
public static void main(String[] s)
// TODO Auto-generated method stub
IconIllustrate ii = new IconIllustrate();
ii.setLocation(300, 200);
ii.setTitle("Testing Highlight Icon");
ii.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
ii.setSize(400, 300);
ii.setVisible(true);
public void actionPerformed(ActionEvent ae)
// TODO Auto-generated method stub
if(ae.getSource().equals(bAdd))
JFileChooser chooser = new JFileChooser();
chooser.setMultiSelectionEnabled(true);
int answer = chooser.showOpenDialog(this);
File[] file = null;
String[] fileName = new String[10];
if(answer == JFileChooser.OPEN_DIALOG)
file = chooser.getSelectedFiles();
ImageIcon icon;
try
for(int i = 0; i < file.length; i++)
icon = new ImageIcon(file.toString());
ImageIcon thumbnailIcon = new ImageIcon(getScaledImage(icon.getImage(), 50, 40));
lblimage = new JLabel[10];
lblimage[i] = new JLabel();
lblimage[i].addMouseListener(this);
lblimage[i].setName("" + i);
lblimage[i].setBorder(BorderFactory.createEmptyBorder());
lblimage[i].setVerticalTextPosition(JLabel.BOTTOM);
lblimage[i].setHorizontalTextPosition(JLabel.CENTER);
lblimage[i].setHorizontalAlignment(JLabel.CENTER);
lblimage[i].setIcon(thumbnailIcon);
panAttachment.add(lblimage[i]);
panAttachment.revalidate();
catch(Exception ex )
ex.printStackTrace();
private Image getScaledImage(Image srcImg, int w, int h)
BufferedImage resizedImg = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
Graphics2D g2 = resizedImg.createGraphics();
g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BILINEAR);
g2.drawImage(srcImg, 0, 0, w, h, null);
g2.dispose();
return resizedImg;
public void mouseClicked(MouseEvent me)
// TODO Auto-generated method stub
int clickCount = me.getClickCount();
if(clickCount == 1 || clickCount == 2)
Component comp = me.getComponent();
Component c = comp.getComponentAt(me.getX(), me.getY());
// c.setPreferredSize(new Dimension(100, 100));
c.setBackground(Color.CYAN);
System.out.println("clickCount");
repaint();
this.panAttachment.revalidate();
public void mouseEntered(MouseEvent arg0)
// TODO Auto-generated method stub
public void mouseExited(MouseEvent arg0)
// TODO Auto-generated method stub
public void mousePressed(MouseEvent arg0)
// TODO Auto-generated method stub
public void mouseReleased(MouseEvent arg0)
// TODO Auto-generated method stubHi,
phungho2000 wrote:
Thank you for the Code. Now I am able to set the label border. I need to figure out how keep track of the last selected component so that I can reset the border.**g**
No, you have still fundamental misunderstood how listeners are working. You add a listener to a component. From this time on, this listener is watching this component. It listens if something occurs with this component therefor it is competent. If so, then it will pay attention to this. So the listener always knows the components it is in charge of. There is no need for you to "keep track of the last selected component" because the listener is doing this for you already.
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.GridLayout;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import javax.swing.*;
public class FocusTesting extends JFrame implements FocusListener, MouseListener
// There is no need for JLabel fields here.
//JLabel labelA = new JLabel("Label A");
//JLabel labelB = new JLabel("Label B");
public FocusTesting()
super("FocusTesting");
JPanel paneFirst = new JPanel();
JPanel paneSecond = new JPanel();
paneSecond.setBackground(Color.gray);
//use simply FlowLayout for testing this
//paneFirst.setLayout(new BorderLayout());
paneFirst.setBorder(BorderFactory.createBevelBorder(2));
// pane.setBackground(Color.blue);
JLabel labelA = new JLabel("Label A");
// give the labelA a name only to show you, that the listener knows about the compontent it ist added to
labelA.setName(labelA.getText());
labelA.addMouseListener(this);
labelA.addFocusListener(this);
labelA.setFocusable(true);
JLabel labelB = new JLabel("Label B");
// give the labelB a name only to show you, that the listener knows about the compontent it ist added to
labelB.setName(labelB.getText());
labelB.addMouseListener(this);
labelB.addFocusListener(this);
labelB.setFocusable(true);
paneFirst.add(labelA);
paneFirst.add(labelB);
this.getContentPane().setLayout(new GridLayout(2, 1));
this.getContentPane().add(paneFirst);
this.getContentPane().add(paneSecond);
public static void main(String[] s)
//separate the initial thread form the event dispatch thread
SwingUtilities.invokeLater(new Runnable() {
public void run() {
FocusTesting ft = new FocusTesting();
ft.setLocation(300, 200);
ft.setSize(300, 200);
ft.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
ft.setVisible(true);
public void focusGained(FocusEvent fe)
// TODO Auto-generated method stub
JComponent jcomp = (JComponent)fe.getComponent();
jcomp.setBorder(BorderFactory.createLineBorder(Color.GREEN, 5));
System.out.println("focusGained " + jcomp.getName());
public void focusLost(FocusEvent fe)
// TODO Auto-generated method stub
JComponent jcomp = (JComponent)fe.getComponent();
jcomp.setBorder(BorderFactory.createEmptyBorder());
System.out.println("focusLost " + jcomp.getName());
public void mouseClicked(MouseEvent me)
Component comp = me.getComponent();
comp.requestFocusInWindow();
System.out.println("mouseClicked " + comp.getName());
public void mouseEntered(MouseEvent arg0)
// TODO Auto-generated method stub
public void mouseExited(MouseEvent arg0)
// TODO Auto-generated method stub
public void mousePressed(MouseEvent arg0)
// TODO Auto-generated method stub
public void mouseReleased(MouseEvent arg0)
// TODO Auto-generated method stub
} You also should read again the Java Tutorial about Concurrency in Swing. Especially why and how to separate the initial thread form the event dispatch thread. [http://java.sun.com/docs/books/tutorial/uiswing/concurrency/initial.html]
Also have a look on [http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html], especially [http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html#focusable] for why use the MouseListener too.
And if you have understood that all, then you may think about in what way it would be much easier to use JButton's instead of JLabel's for your clickable and focusable thumbnails.
best regards
Axel -
How to control Mac with a iPhone without WiFi
i use this app with full screen shared control
Mocha VNC Lite
it just doesn't work whenever I leave the nearby WIFI network.Your observation is correct, MochaVNC is for local network only
See Teamviewer for remote control across the internet
http://www.teamviewer.com/en/index.aspx -
How to control brightness with slider
i would like to know how can i make a slider on xcode control the brightness. where should i put the coding ? view controller.m or .h ?
The N95 should unlock the keypad automatically when you open the slider (or the lens protector for that matter). The sensor would appear to be working since the keypad is locked when you close the slider, so it's probably a software issue. I'd start by uninstalling ShutUp beta, which is installed according to your signature.
Was this post helpful? If so, please click on the white "Kudos!" star below. Thank you! -
How to control time with great precision
Hello everybody.I know Timer could control time.But it uses thread.sleep(),isn't it.That means it is not guaranteed.So,does anybody know some approach to control time precisely?
thanks in advance!Hello everybody.I know Timer could control time.But it
uses thread.sleep(),isn't it.That means it is not
guaranteed.What do you mean by "not guaranteed". How can you expect a non-realtime multitasking OS that uses virtual memory (i suppose you are using a system like windows or linux) to guarantee anything? Some systems are better in this regard, but in addition to this you aslo have the garbage collection. Of course there might be ways to implement soemthing more precise in Java , but without a special VM on a special OS there is no guarantee that it will really work imho.
Maybe you are looking for
-
Dynamic rendering of date intervals for a single query
Hi, I am new to BW so I am not sure if this is even possible, or if there is a better way to do this. I am trying to build a query in the Query Designer to basically display sales data for a Business Partner where a user is able to select a date rang
-
Older Macbook and new 24-inch LED display
Is it possible to connect a mid-2007 Macbook (I think this has the mini DVI connection) to the new LED Cinema Display? Is an adaptor needed? Does one exist? Thanks.
-
When I sign iin to ICloud I get server error
When I sign iin to ICloud on my I get You can't sign in due to server error and icoud status. I checked my status and they are all green. None of the articles in a previous discussion helped. I also reset on my MAC the calendar. I did remove it a
-
Hi All, There is this function module which is used to extract values into BW. "FCIW_HIERARCHY_TRANSFER_CSIT" I guess this is a standard SAP FM. I want to know if there are table names mentioned for extracting the Nodes of the hierarchies, in this co
-
MM_editRedirectUrl on insert not working
I'm trying to just insert a record then move on to other parts of the form by passing the ID, but I can't seem to get it to work. here's what doesn't work: MM_editRedirectUrl = "insert3.asp?projectID=" & rsProjectID.Fields.Item("projectID").Value Mic