RH11. Script to make Next and Prev buttons work as they do in a standard browser?
Hello.
I know that the Next and Prev button arrows in the navigation pane take the user to the next or previous topic specified in the browser sequence. This means that the Help author has to design one or more browse sequences, which can be time-consuming and hard to maintain.
Has anyone created a script, or know if one exists, that can turn the Next and Prev buttons into buttons that perform standard browser actions. For example:
User opens Topic A.
User opens Topic J.
User presses Prev button.
Help opens Topic A.
At the moment the results depend on the browse sequence.
User opens Topic A.
User opens Topic J.
User presses Prev button.
Help opens Topic I (the topic preceding Topic J in the browse sequence).
Thank you.[
Carol Levine
What you are looking at are the properties for the Single Source Layout. Notice that your properties have a location that says "Default Window:"
That option allows you to choose the window I was showing earlier. So you need to click View > Pods > Project Set up, then expand the Windows category and change the settings for the CHM window. You may not actually have one defined. For example, in the image below, all I see is a WebHelp window. And in that case, I need to right-click, point at New Window and choose Microsoft HTML Help. Then you will see the image I showed earlier.
Once you have your window defined, you then choose it in the Single Source Layout settings.
Cheers... Rick
Similar Messages
-
How to make next and previous button function
Hello
Can anybody help me with how to achieve next and previous button function such as the one at www.bestbuy.com?
I would appreciate any help or suggestion.
Thank you!if you're not familiar with flash it might be easiest to place your initial "page" in frame 1, the 2nd (or next) page in frame 2, the 3rd/next page in frame 3 etc.
place your previous and next buttons in their own layer that spans the main timeline (which will have as many frames as you have "pages"). give them instance names (say prevBtn and nextBtn).
you can then use the following code placed in frame 1:
var tl:MovieClip=this
prevBtn.onRelease=function(){
tl.prevFrame();
nextBtn.onRelease=function(){
tl.nextFrame(); -
Lightbox gallery widget next and prev buttons do not work with iOS?
This widget works perfectly on Windows, but these two buttons do not appear on either iPhones or iPads. Does anyone know why not and if there is a fix?
Hello
I have checked Vista download page and your notebook A110 (PSAB2) is not listed there. Usually you need Toshiba controls but with Vista this tool is not available separately. I presume it is a part of Value Added Package.
Have you already installed anything downloaded from Toshiba download page http://pc-support.toshiba-europe.com/vista/ ? -
Problems with Next and Back Buttons ActionScript 3.0
Hi,
I have set up a Back, Play and Next buttons in a slideshow I am making. The next and back buttons work correctly until it gets to the end.
If I press the Next button it goes back to what appears to be Frame 1 and will not go to the next slide. If I press the Back button it will then go to Frame 201 and If I press next again it will go to Frame 1. It will only go back and forth in between those frames.
If I press the Back button from the beginning it goes through the slide show correctly then it gets stuck at Frame 1. If I press next button it goes to Frame 121 and gets stuck in between 121 and 1.
I can't figure this out please help.
My code on Frame 1 is:
stop();
play_btn.addEventListener(MouseEvent.CLICK,playslideshow);
function playslideshow(event:MouseEvent) { gotoAndPlay(2); }
forward_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_2);
function fl_ClickToGoToAndStopAtFrame_2(event:MouseEvent):void
gotoAndStop(40);
back_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_8);
function fl_ClickToGoToAndStopAtFrame_8(event:MouseEvent):void
gotoAndStop(281);
My code on Frame 40 is:
forward_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_7);
function fl_ClickToGoToAndStopAtFrame_7(event:MouseEvent):void
gotoAndStop(121);
back_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_9);
function fl_ClickToGoToAndStopAtFrame_9(event:MouseEvent):void
gotoAndStop(1);
My code on Frame 121 is:
forward_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_3);
function fl_ClickToGoToAndStopAtFrame_3(event:MouseEvent):void
gotoAndStop(201);
back_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_10);
function fl_ClickToGoToAndStopAtFrame_10(event:MouseEvent):void
gotoAndStop(40);
My code on Frame 201 is:
forward_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_4);
function fl_ClickToGoToAndStopAtFrame_4(event:MouseEvent):void
gotoAndStop(281);
back_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_11);
function fl_ClickToGoToAndStopAtFrame_11(event:MouseEvent):void
gotoAndStop(121);
My code on Frame 281 is:
forward_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_5);
function fl_ClickToGoToAndStopAtFrame_5(event:MouseEvent):void
gotoAndStop(1);
back_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_12);
function fl_ClickToGoToAndStopAtFrame_12(event:MouseEvent):void
gotoAndStop(201);I found the solution! Flash CS5 Tutorial 6 Click On Button Go To Another Frame.avi - YouTube
I had to Convert to Keyframes each frames I wanted to jump to on the buttons layer. Then highlight the button and give each another instance name! Like forward1_btn, forward2_btn, back1_btn, back2_btn... I did that and adjusted the action-script for each button.
Frame 1
stop();
play_btn.addEventListener(MouseEvent.CLICK,playslideshow);
function playslideshow(event:MouseEvent)
gotoAndPlay(2);
forward1_btn.addEventListener(MouseEvent.CLICK, Shoot_1);
function Shoot_1(event:MouseEvent):void
gotoAndStop(40);
back1_btn.addEventListener(MouseEvent.CLICK, Back_1);
function Back_1(event:MouseEvent):void
gotoAndStop(281);
Frame 40
forward2_btn.addEventListener(MouseEvent.CLICK, Shoot_2);
function Shoot_2(event:MouseEvent):void
gotoAndStop(121);
back5_btn.addEventListener(MouseEvent.CLICK, Back_5);
function Back_5(event:MouseEvent):void
gotoAndStop(1);
And so on... -
Next and Previous button on detail page
I am new to Apex development and have a need to develop an application that has 2 pages. The first page displays a list of employees for instance and allows the user to sort the list on difference columns e.g., first name, last name, salary etc. The user then clicks on a employee and navigates to a second page which shows the details of the employee that the user can update and save. The second page should also include Next and Previous buttons which show the details of the next or previous employee from the SORTED list on the first page so that the user can avoid constantly switching between the two pages. How do I implement this? I thought of using collections but I don't know how to populate the collection when the user navigates out of the first page and how to reference the collection on the second page. Note that in the real application there could be a large number of rows on the first page (a few thousand) and response time is critical. Any help would be much appreciated. I am using Apex 2.2.
Thanks
SadanandThanks Anton. And apologies for the delay in responding to your message. I will give it a try soon.
On a related note and as alternate implementation (i.e. not using collections), is it possible to have a tabular form (showing only one row) on the second page using the same query and filter/sort conditions as the first page with an additional feature that the first time the page is displayed, the record selected on the first page is the one shown in the tabular form? I can then use the default Next and Prev buttons of tabular forms to navigate through the records in exactly same order as the first page (assuming ofcourse that new rows have not been added by an external process in the meantime). I hope I am clear in my description.
Thanks for your help.
Regards
Sadanand -
Tabbing to "Prev", "Next" and "Submit" buttons in FormsCentral template
I try to use my mouse as little as possible when entering data in forms. How does one tab to "Prev", "Next" and "Submit" buttons in FormsCentral template so that all one has to do is press "enter" on the keyboard or spacebar?
Thanks Roman for your response. Press Tab or Shift-Tab works fine on my Windows computers but does not appear to work on my IPad. Maybe it’s an Apple thing. BTW – loving what I’m seeing so far in FormsCentral.
Dixie Folzenlogen
Dixie Folzenlogen
Project Coordinator
Striker Land Services Northeastern, L.L.C.
6801 N Broadway, Ste 310
Oklahoma City, OK 73116
330-492-2401 (office)
405-229-3907 (mobile) -
'Next' and 'Previous' buttons in master/detail region
Hi,
I've managed to successfully create a master/detail region
which is basically a very simple photo gallery.
The left column shows the thumbnails, and when I click on
them it shows the full-size version in the right column.
I've been trawling userguides and forums for hours now, and I
just can't work out how I can put a 'next' and 'previous' button
beneath the large image enabling the viewer to move to the next
image.
I'm guessing it might be something to do with setRowNumber,
but I'm just not sure.
I'm pulling my (receding) hair out on this one, so any help
or useful links would be much appreciated!
My (basic) code below
<div spry:region="dsGT" id="thumbholder">
<div id="thumb" spry:repeat="dsGT"><img
src="onlinegallery/thumbs/{@path}" width="50" height="50"
spry:setrow="dsGT"></div>
</div>
</div>
<!--End Navigation Div-->
<div id="copy">
<div id="fullimage">
<div spry:detailregion="dsGT">
<img src="onlinegallery/main/{@path}" />
</div>
Many thanks!They make a call to JavaScript, I'm guessing you knew that?
I'm 96.7% JS illiterate, so I'm incapable of explaining it.
You have to download the Spry Framework, unpackage it, look
in the Demos folder, then look in the Gallery folder. Gallery.js, i
think, is where that JS call goes to in order to switch out the
next/prev image.
the download is here:
http://labs.adobe.com/technologies/spry/ -
Next and Previous buttons in Single Row View
Hi All,
How can we add Javascript function call to Next and Previous buttons in IR Single Row View. Any ones help is much appreciated.
ThanksThey make a call to JavaScript, I'm guessing you knew that?
I'm 96.7% JS illiterate, so I'm incapable of explaining it.
You have to download the Spry Framework, unpackage it, look
in the Demos folder, then look in the Gallery folder. Gallery.js, i
think, is where that JS call goes to in order to switch out the
next/prev image.
the download is here:
http://labs.adobe.com/technologies/spry/ -
I am working on an interactive book and have set up each page as a separate composition in edge.
I am using the edge commons JS library to load multiple compositions into a main composition.
You can see how this works here: Edge Commons - Extension Library for Edge Animate and Edge Reflow | EdgeDocks.com
The way the edge commons tutorial is set up requires a button for each composition i want to load. I am interested in loading multiple compositions with a "next" and "back" button, and a "swipe left, "swipe right" gesture on the content symbol that each composition is loaded into. I also need the swipe features on the content symbol not to interfere with the interactive elements on the loaded composition.
Please suggest a solution that will work without adding additional scripts beyond edge commons and jquery.Sort of. I'm using this code inside an action for a button symbol. But it doesn't work perfectly. Trying to debug it.
Let me know if you have any luck.
//Check to see if pageCounter already exists
if (typeof EC.pageCounter === 'undefined') {
// it doesn't exist so initialize it to first page
EC.pageCounter = 2;
//check if the page is only 1 digit -- patch for single digit
if (EC.pageCounter < 9) {
// it is, so we need to pad a 0 on the front.
EC.pageCounterString = "0" + EC.pageCounter;
//e.g. 01 ...09,11,12,13....115,222352,,....
else {
EC.pageCounterString = EC.pageCounter;
EC.loadComposition(EC.pageCounterString + "/publish/web/" + EC.pageCounterString + ".html", sym.$("container"));
EC.pageCounter = EC.pageCounter + 1;
//TODO for back -1 -
How do I change the lable of next and previous button in GAF of FPM
Hi Experts,
How do I change the label of next and previous button in GAF application using FPM in each individual step?
Thanks!Hello Anthony,
as far as I am aware only the final step before the confirmation screen can be changed. Which you can do by clicking on it in the configuration view - click on the last but one step - and click on the next button - at the bottom of the screen you'll get a view where you can change the label of the step.
There is some logic in this - in that it does make for a more consistent user experience across various apps.
It's different to how we could do things in Java - but it's nice that there is a certain level of conformity across FPM apps.
hope this helps,
Cheers,
Chris -
Hi,
Just got back from the APEX class. Very new at this.
I just created two button called PREVIOUS AND NEXT. When I press PREVIOUS or NEXT button I want it to go to previous or next record within the same form page.
What do I have to do to make it functional in APEX. I mean, what code,processes is needed and how to do it.
I would appreciate it if someone has done it and maybe show me the code/process of how to do it. Maybe they can share their application on apex.oracle.com.
Please let me know.
Appreciate a lot
Munish
Edited by: user4848861 on Sep 4, 2009 8:37 AMHi,
When I first come to a page, I show an interactive report. Interactive report has an edit button.
When user clicks on the edit button, it goes to a form where user can edit the record.
Once the user edits the record, they want to go to the next or previous record. What needs to be done on next and previous button to accomplish that.
For eg. If I am on record 1, when I press NEXT I should go to record 2. -
Next and Previous Button Question
First my code :)
import java.util.*;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.awt.GridLayout;
import java.lang.Object;
import java.awt.Image;
public class Inventory // Main class
//main method begins execution of java application
public static void main(String args[])
int i;
double totalInventory = 0.0;
final int dispProd = 0; // variable for actionEvents
final part[] myPart = new part[4];
for (i=0; i<4; i++)
myPart[0] = new part("Glass Break", 730, 12, 32.19);
myPart[1] = new part("Motion", 995, 14, 37.69);
myPart[2] = new part("Keypad", 220, 12, 50.69);
myPart[3] = new part("Contact", 944, 44, 1.19);
final JButton firstBtn = new JButton("First");
final JButton prevBtn = new JButton("Previous");
final JButton nextBtn = new JButton("Next");
final JButton lastBtn = new JButton("Last");
final JLabel label;
final JTextArea textArea;
final JPanel buttonJPanel;
//Add Logo
ImageIcon icon = new ImageIcon("javashield.JPG");
label = new JLabel("Some Company Inc.", icon, JLabel.RIGHT);
//Set the position of the text, relative to the icon:
label.setVerticalTextPosition(JLabel.BOTTOM);
label.setHorizontalTextPosition(JLabel.CENTER);
buttonJPanel = new JPanel(); // set up panel
buttonJPanel.setLayout( new GridLayout(1, 4)); //set layout
// add buttons to buttonPanel
buttonJPanel.add(firstBtn);
buttonJPanel.add(prevBtn);
buttonJPanel.add(nextBtn);
buttonJPanel.add(lastBtn);
textArea = new JTextArea(myPart[3]+" "); // create textArea for product display
// add total inventory value to GUI
textArea.append("\nTotal value of Inventory "+new java.text.DecimalFormat("$0.00").format(totalInventory)+"\n\n");
textArea.setEditable(false);
JFrame invFrame = new JFrame();
invFrame.setLayout(new BorderLayout());
invFrame.getContentPane().add(new JScrollPane(textArea), BorderLayout.CENTER);
invFrame.getContentPane().add(buttonJPanel, BorderLayout.SOUTH);
invFrame.getContentPane().add(label, BorderLayout.NORTH);
invFrame.setTitle("INVENTORY:");
invFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
invFrame.setSize(350, 350);
invFrame.setLocationRelativeTo(null);
invFrame.setVisible(true);
// assign actionListener and actionEvent for each button
firstBtn.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
textArea.setText(myPart[0]+"\n");
}); // end firstBtn
prevBtn.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
textArea.setText(myPart[1]+"\n");
}); // end prevBtn
nextBtn.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
textArea.setText(myPart[2]+"\n");
}); // end nextBtn
lastBtn.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
textArea.setText(myPart[3]+"\n");
}); // end lastBtn
} // end main
} // end class Inventory6
class part
public String partName;
public int itemNum;
public double units;
public double price;
//default constructor
public part()
partName = "";
itemNum = 0;
units = 0.0;
price = 0.00;
}//end default constructor
//Parameterized Constructor
public part( String partName, int itemNum, double units, double price)
this.partName = partName;
this.itemNum = itemNum;
this.units = units;
this.price = price;
}//end constructor
public void setpartName(String partName) {
this.partName = partName;
public String getpartName()
return partName;
public void setitemNum ( int itemNum )
this.itemNum = itemNum;
public int getitemNum()
return itemNum;
public void setunits ( double units )
this.units = units;
public double getunits()
return units;
public void setprice ( double price )
this.price = price;
public double getprice()
return price;
//calculates product total
public double invTotal()
return (units * price);
public String toString()
return "Part: "+partName+
"\nPart Number: "+itemNum+
"\nUnits on hand: "+(int)units+
"\nPrice per unit: $"+price+
"\nPart Total: $"+invTotal();
//end Class Part
// Class Part holds Part information
class Wireless extends part
private String wlPart; // variable for added feature
public Wireless(String partName, int itemNum, double units, double price, String addWL)
// call to superclass constructor
super(partName, itemNum, units, price);
wlPart = addWL;
}// end constructor
public void setwlPart(String addWL) // method to set added feature
wlPart = addWL;
public String getwlPart() // method to get added feature
return wlPart;
public double totalRestock() // method to set value and add restock fee
return units * price * 0.05;
public String toString()
return "Part: "+partName+
"\nPart Number: "+itemNum+
"\nUnits on hand: "+(int)units+
"\nPrice per unit: $"+price+
"\nRestock Fee: $"+totalRestock()+
"\nPart Total: $"+invTotal();
} I need to make my next and previous button keep going through the array. They go next or previous one time and stop. I know it is because of the way I wrote the statement
textArea.setText(myPart[2]+"\n");What I can't figure out is how to make that statement be the current myPart and add 1 to it. I tried textArea.setText(myPart[i]+1+"\n");and it did not work either, I got these errors:
C:\Inventory\Inventory.java:92: local variable i is accessed from within inner class; needs to be declared final
textArea.setText(myPart[i]+1+"\n");
^
C:\Inventory\Inventory.java:92: operator + cannot be applied to part,int
textArea.setText(myPart[i]+1+"\n");
^
2 errors
So I tried to write {nextItem()}
and writing a method for next item,
nextBtn.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
nextItem();
}); // end nextBtn
lastBtn.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
textArea.setText(myPart[3]+"n");
} // end lastBtn actionEvent
}); // end lastBtn actionListener
} // end main
private static void nextItem();
if (myPart < myPart[]-1)
myPart++;
textArea.setText(myPart[0]);
}and I get this error
C:\Inventory\Inventory.java:109: '.class' expected
if (myPart < myPart[]-1){
^
1 error
I thought '.class' expected meant I was missing a bracket, but I can't see where I am missing a bracket.
I feel dumber by the minute.
Am I not seeing something?Another suggestion. First create a non-GUI Inventory class, something like this:
public class Inventory
private part[] myPart;
private int index = 0;
public Inventory()
myPart = new part[4];
myPart[0] = new part("Glass Break", 730, 12, 32.19);
myPart[1] = new part("Motion", 995, 14, 37.69);
myPart[2] = new part("Keypad", 220, 12, 50.69);
myPart[3] = new part("Contact", 944, 44, 1.19);
public part getPart(int i)
//TODO fill this in
public part getFirst()
//TODO fill this in
public part getLast()
//TODO fill this in
public part getNext()
//TODO fill this in
public part getPrev()
//TODO fill this in
public double getTotalInventory()
//TODO fill this in
// this main is here only to test out the class
public static void main(String[] args)
Inventory inv = new Inventory();
for (int i = 0; i < 4; i++)
System.out.println(inv.getPart(i));
System.out.println();
System.out.println("getFirst: " + inv.getFirst());
System.out.println();
for (int j = 0; j < 6; j++) // deliberately set to be > 4
System.out.println("getNext: " + inv.getNext());
System.out.println();
for (int j = 0; j < 6; j++)
System.out.println("getPrev: " + inv.getPrev());
System.out.println();
System.out.println("getLast: " + inv.getLast());
}Then use this class as a variable within another class, say InventoryGUI. In this second class, the "next" button would call the Inventory object's getNext() method. -
Next and previous buttons, Cluster, Image Ring problem
Hello, I'm a pretty new user, and I need help with this excercise:
"Create an application in LabVIEW to manage the information of different cars from the movie Fast and Furious. The goal is to show in a Graphic User Interface the information of the cars included in the following table:
ID
Name
Model
Brand
Price
1
Eclipse
2000
Mitsubishi
$ 25,550.89
2 RX-7 2010 Mazda $ 32,700.50
3
Supra
2000
Toyota
$ 39,450.30
4 Charger 2012 Dodge $ 45,290.99
5
Civic
2013
Honda
$ 27,600.40
6 S2000 2006 Honda $ 29,500.99
7
Jetta
2013
Volkswagen
$ 21,740.90
The type of data that should be shown in each field is presented in the following list:
ID Integer
Name String
Model Integer
Brand String
Price Float
Write a program that shows the information of every car included in the table. file Fast_Furious.vi as a starting point to write your code.
Specifications
The following image shows an example of the User Interface of the program:
You can download the
The user should see the information of 7 different cars using the buttons Next and Previous. Each time the user press these buttons the information of the previous or next car should be presented on the interface. There are two special cases in the selection of information:
If the information of the first car (Eclipse) is shown and the user makes clic over the button Previous. The information of the last car (Jetta) must be shown.
If the information of the last car (Jetta) is shown and the user makes clic over the button Next. The information of the first car (Eclipse) must be shown.
You must use the array of clusters to obtain and manage the information of the cars, and the ring to show the photos of the cars.
Finally, include a close button to stop the execution of the program.
Extra: Add sound effects to your program. Each time the user makes click over the Previous or Next
button a beep sound should be produced."
I especially need help with the next and previous buttons and the sounds. I alredy have all the information, and the app is supposed to look like the picture attached.
Thanks,
Attachments:
Test.png 769 KBActually, Munna I think I smell a homework project (2nd year of college, maybe?)
So Miguel, what have you got done so far? What does your code look look like?
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps -
Next and Previous Buttons, n00b edition
OK, I am trying to construct a "timeline" flash file, where
basically you click either a next or previous button to move
through different frames, and I think I know how to do everything
other than the next and previous buttons. Two questions:
Would this be easier as AS2.0 or AS3.0?
If I use AS3, would this code work, and is "my_mc" simply the
name of the layer with the navigable frames?
next_btn.addEventListener(MouseEvent.MOUSE_UP,buttonPressed);
prev_btn.addEventListener(MouseEvent.MOUSE_UP,buttonPressedprev);
function buttonPressed(event:MouseEvent){
my_mc.nextFrame()
function buttonPressedprev(event:MouseEvent){
my_mc.prevFrame()
Sorry if this is confusing, I am such a n00b I don't even
know how to ask questions properly.sholditch,
> This is a huge help and one of the better explanations
of AS
> coding I've ever seen. Thanks a ton.
Thanks!
> However, I think I may be jumping ahead too much.
Sure, no worries. It's definitely dizzying at the beginning.
> Follow up questions, n00b style:
>
> 1. What would be the equivalent of the nextFrame()
method
> for previous? Tried searching help and googling, but
getting
> too much other stuff to wade through.
Google absolutely rocks, but I hear ya ... you have to be
willing to
wade through numerous search results. Fortunately, the Help
docs usually
get you directly to your answer -- and quickly, at that -- if
you just know
how to navigate them. If you're using Flash CS3, the Help
docs are local,
though optionally available online. If you're using Flash
CS4, the docs are
online and open in a browser, in either case, what you're
looking for
specifically is the ActionScript 2.0 Language Reference (if
you're using
AS2) or the ActionScript 3.0 Language and Components
reference (if you're
using AS3).
AS2:
http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=Part2_AS2_LangRef_1.html
AS3:
http://help.adobe.com/en_US/AS3LCR/Flash_10.0/index.html
In the case of AS2, you'll click on the lefthand side. Open
up
"ActionScript 2.0 Language Reference," then "ActionScript
classes," and
you're in. In the case of AS3, you'll see the classes already
listed on the
lefthand side.
Now ... you've coded up your button, which means you
consulted the
Button (AS2) or SimpleButton (AS3) class to see what was
available to you.
(I'm speaking hypothetically, of course. When you've become
more
comfortable with the docs, this will often describe your
initial steps.)
You want to code up a button symbol, so that means you've
looked up the
Events heading for the appropriate class to see what this
object can react
to, such as a button click. You've found your event --
onRelease or
MouseEvent.CLICK -- and have associated that event with a
custom function.
Now, you're on to the next step. In this case, the object
you're
looking for is no longer a button. It's a movie clip, because
you want this
function to send the main timeline forward or backward.
Again, your first
question is always: a) what object am I dealing with? Here,
it's the
MovieClip class, so that's where you flip to. Your second
question is: b)
what category am I looking for? If characteristics, look up
Properties; if
something the object can do, look up Methods; if something
the object can
react to, look up Events. In this case, you want to send the
timeline
somewhere. That's something the timeline (that is, this
particular movie
clip) can do. The things-an-object-can-do category is
Methods, so that's
where you flip to.
You'll see a decent selection in either language, including
the common
gotoAndPlay(), gotoAndStop(), and so on. You'll also see
nextFrame() and
prevFrame(). Bingo! (Note, both versions of the language rely
on something
called inheritance, which behaves just like it sounds. Just
as we humans
inherit traits from our predecessors, most classes inherit
traits from other
classes up the family tree. In the AS3 docs, you'll see a
"Show Inherited
Public Methdods [or Properties, or Events]" hyperlink. If you
need more
detail, be sure to click that link. In the AS2 docs, the
inherited items
are listed in a box beneath each heading. Any given class may
or may not
have inherited items.)
So you really don't have to wade too far. Think of what
object you're
dealing with, then jump to the relevant category.
> 2. How do I make the next and previous buttons the only
> controls that will move to the next or previous frames?
I
> plugged in the code into a separate as_layer and when I
> test the scene it just goes through the frames
automatically.
Movie clips (including the main timeline) just animate
naturally -- they
*want* to move -- so if you want a timeline to stop, you have
to instruct it
to. Here again, you'll look up the MovieClip class and,
because you want to
find out how to *do* something (how to stop this movie clip),
you'll jump to
the Methods section. Sure enough, there's a MovieClip.stop()
method.
In frame 1 of your main timeline, simply type stop(), and
that'll do it.
The reason it works is because you're invoking a MovieClip
method on a
MovieClip instance -- the main timeline. If you wanted to
stop a movie clip
symbol, you'd have to give it an instance name, then invoke
the method on
that particular instance, like this:
myMovieClip.stop();
... in which case, myMovieClip is the instance name, and this
clip happens
to site in the same timeline as this code appears.
Alternatively, you could enter the timeline of that movie
clip and
simply put stop() in its own first frame. That would do it
too. In either
case, you've invoked a MovieClip method on a particular movie
clip. All you
ever need is an object reference (implicit, because you're in
that object's
scope) or an instance name (or a variable that, by some other
mechanism,
refers to a particular object) and then you're set. With that
reference in
hand, you simply name the reference, put a dot, then invoke
the desired
property, method, or event.
In the case where you simply invoke stop() on the main
timeline, you
*could* reference the main timeline directly, like this:
this.stop();
The "this" keyword is a special reference that refers to
whatever scope
its in. Because your code appears inside a keyframe, its
scope is the movie
clip in which that keyframe appears, therefore "this" -- in
that context --
refers to that movie clip. But as I showed earlier, you can
also simply
leave off the prefix object reference because Flash will know
what you mean
(that is, which movie clip you mean).
Eventually, when you're more comfortable, you'll reference
instances of
other kinds of objects, such as sounds, text formatting
objects, and more.
In those cases, your object reference -- an instance name, or
a variable --
will act the same way, but you'll only be able to invoke
functionality from
the relevant class.
If you have Sound instance, for example, you couldn't do
this:
mySound.gotoAndPlay(15);
... because sounds don't have timelines, and the Sound
class's Methods
section doesn't feature a gotoAndPlay() method. And that
totally makes
sense, right?
> If you have a beginner's guide to actionscripting,
focused
> on AS3, I will buy it today.
I'm happy to keep answering your questions here, but yes, I
do have a
few books you might be interested in. If you're using Flash
CS3, you might
consider Tom Green's and my Foundation Flash CS3 for
Designers (friends of
ED) (
http://tinyurl.com/2k29mj),
and if you're using Flash CS4, you'll want
the current version of that book (
http://tinyurl.com/5j55cv).
Bear in mind,
these are "foundation" books, so they cover all of Flash, not
just
ActionScript. Still, there's tons of ActionScript in either
one
(exclusively AS3, by happenstance), and we've received
positive feedback on
the ActionScript Basics chapter, in particular.
I also recently finished an AS2-to-AS3 migration book for
O'Reilly
http://tinyurl.com/2s28a5),
but that one may not be especially useful for
you, because it focuses more on developers who have a basic
understanding of
AS2 but feel bewildered when it comes to AS3.
There's also my blog, (quip.net/blog), which has tons of AS2
stuff, and
is slowly growing new AS3 content. One of my co-authors for
the O'Reilly
book, Rich Shupe, co-authored an ActionScript 3.0 book
specifically for
beginners, so take a look, read the reviews, and see if the
publisher offers
sample chapters. They often do, and that's usually a good
indicator -- to
me, anyway -- of how a particular author's style gels (or
doesn't gel) with
your particular learning style.
David Stiller
Contributor, How to Cheat in Adobe Flash CS3
http://tinyurl.com/2cp6na
"Luck is the residue of good design." -
Does message viewer offer "next" and "previous" buttons?
I would really like to use Mail and get away from Entourage, but I am addicted to the next and previous buttons when viewing my mail. Have they been added to the latest version of mail? I see them on the iPad, so I am hopeful.
Thanks, all.Thanks for the response Stan. I guess, I linked the end of each chapter to the beginning of the next one to leave no stone unturned. I will remove and see if that makes a difference.
My menu is a ragular menu with buttons created in Photoshop. I linked the buttons to beginning of each chapter in Encore. The actual project have over 2 hours of video but I rendered a small portion to test it out first.
I hope I don't have to upgrade to CS6.
Anil.
Maybe you are looking for
-
To get the content of a pdf file in a particular position in text format
I am troubling with geting the content of a pdf file in a particular position.I got the code to get the content of a pdf document as whole in text format.But i only need the content at a particular area. i am using PDFTextStripper class in pdfBox jar
-
How can i add entry in table BSP_DL_XMLSTRX2 for creating a copy of a view
hi i want to copy in a CRM_UI component view the configuration of the view and want to save the copy with a different object type. But F4 value help only provides ( in crm_ui component workbench) me the value <DEFAULT> as for that view there is only
-
Is it possible to run more than one case at a time?
Using a case structure, is it possible to have more than 1 case running at a time? I'm currently using a for loop's iteration terminal to select which case to run but each case contains a for loop with a timer delay. I want them all to run simultaneo
-
Error message when connecting to bt mail using any...
It does not matter if I connect through bt.com or direct to bt mail I get the same error message no matter what computer \ browser or internet connection I use at home work or wirelessly Continue to Yahoo! log in We can't log you into your BT Yahoo!
-
Possible fix for car unit Bluetooth connectivity problems (it fixed mine)
Ok, I understand this only fixed my particular problem, so it may not work with every Bluetooth head unit. I have a Pioneer deh-p7000bt and it worked beautifully with my iPhone 3GS. Once I got my iPhone 4 I restored it from a backup of my 3GS. I had