Need help loading flv movie onto stage from a button click
Hi folks, I need your help.
I'm new to flash so please bear this in mind.
My problem is this:
I have a picture of a phone on the stage which I have made
into a button.
What I want is that, when I click on this button (phone_btn),
my video (called 'TyreChange.flv') will appear on the stage. And I
will have the option of removing the video to get rid of it from
the screen.
The stage is like a menu, where I can click a number of
objects and the relevant video or element will appear.
The TyreChange video is in the same folder as my project but
I have not imported it into the library. If I do that, the video
goes onto the stage as well as the library, and it appears as the
name FLVPlayback for some reason.
I only want the video on the stage when the user clicks the
'phone_btn' button.
Please help
Many thanks, James
I did try that but it would not remove the child.
i appreciate your help though.
I am also trying to determine if a child is on the stage and if it is, remove it. I have created a button that will jump back on the timeline and the mc's that were loaded after this point in time.
This looks like it should work. It doesn't give me any errors but the mc remains on the stage.
var remMC;
if (getChildByName("mc2") != null) {
removeChild(mc2);
Similar Messages
-
Need help loading multiple movie clips.
Hello forum members,
I've run into a bit of an irritating problem and perhaps
someone can clue me in to the answer.
I'm creating a SWF which uses loadMovie (I've also tried
creating a MovieClipLoader instance and using instance.loadClip) to
bring in 2 other SWFs.
See below AS in first couple frames of main movie's
time-line:
First movie:
this.createEmptyMovieClip("mcToolbar", 10);
with (mcToolbar)
_x=8;
_y=68;
loadMovie("toolbar.swf",mcToolbar);
Second movie:
this.createEmptyMovieClip("mcWindow", 11);
with (mcToolbar)
_x=500;
_y=60;
loadMovie("textwindow.swf",mcWindow);
This works great when opening up my main SWF in Flash Player
and when viewing the movie in the published HTML web page.
However, I'm using FlashObject to load my main movie to get
around that annoying "Click to activate this control" thing.
When viewing this version of the web page with my main SWF
being loaded, I see the SWF load, then the first loadMovie
loads....THEN the first loadMovie disappears and the second
loadMovie loads and appears at the wrong X and Y coordinates.
Any ideas?Ok, I know replying to my own post is odd on some forums, but
anyhow:
I've done some further testing and find that FlashObject
isn't the problem.
Looking at the AS code above, it is clear that the SWFs to be
loaded must be in the same folder as the HTML web-page.
However, my intent is that these small SWFs that are being
loaded in by the main SWF will be shared by many other movies,
therefore I'd like to stick them (the physical SWF files) closer to
the root of the site (e.g. SiteFoler->flash).
I see that my problem rears its ugly head when I try to
reference these movies in my main flash movie as follows:
First movie:
this.createEmptyMovieClip("mcToolbar", 10);
with (mcToolbar)
_x=8;
_y=68;
loadMovie("../../../flash/toolbar.swf",mcToolbar);
Second movie:
this.createEmptyMovieClip("mcWindow", 11);
with (mcToolbar)
_x=500;
_y=60;
loadMovie("../../../flash/textwindow.swf",mcWindow);
In the example above, my HTML page is 3 folders deep whereas
the movies I'm loading in are 1 folder deep in the folder labeled
"flash".
By doing it in this manner, I get the problems I described
above (first movie loads then disappears and second movie loads in
wrong position).
Any ideas as to why the physical location of the SWFs being
pulled in is causing this problem? I'd like to try to avoid copying
the SWFs to each place their being refrenced from as that could be
a major maintenance headace.
Thanks,
Ben -
I can't find iDVD on my computer, and I need to burn a movie onto a disk. Help?
I can't find iDVD on my computer. I need to burn a movie onto a disk, and I need it quickly. Can someone help me? I've searched for iDVD in applications, but it's not there.
iDVD is no longer supported by Apple and does not come pre-loaded on new Macs.
If your computer did not come with iDVD and iWeb preinstalled, you can ask Apple for a free copy here:
http://www.apple.com/feedback/idvd.html
Alternatively, you can purchase a boxed version of iLife '11 from Apple, Amazone, etc. Boxed versions come with iDVD and iWeb still on the disk. -
I need help with controlling two .swf's from third.
Hi, thanks for reading!
I need help with controlling two .swf's from third.
I have a problem where I need to use a corporate designed
.swf in a digital signage solution, but have been told by the legal
department that it can not be modified in any way, I also can't
have the source file yada yada. I pulled the .swfs from their
website and I decompiled them to see what I was up against.
The main swf that I need to control is HCIC.swf and the
problem is it starts w/ a preloader, which after loading stops on a
frame that requires user input (button press) on a play button,
before the movie will proceed and play through.
What I have done so far is to create a container swf,
HCIC_container.swf that will act as Target for the HCIC.swf, and
allow me to send actionscript to the file I'm not allowed to
modify.
I managed to get that done with the help of someone on
another forum. It was my hope that the following script would just
start HCIC.swf at a frame past the preloader and play button, and
just play through.
var container:MovieClip = createEmptyMovieClip("container",
getNextHighestDepth());
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(this);
mcLoader.loadClip("MCIC.swf", container);
function onLoadInit(mc:MovieClip) {
mc.gotoAndPlay(14);
But unfortunately it didn't solve my problem. Because there
is a media-controller.swf, that is being loaded by HCIC.swf that
has the controls including the play button to start HCIC.swf.
Here's a link to a .zip file with all 3 .swf files, and all 3
.fla files.
http://www.axiscc.com/temp/HCIC.zip
What I need to do is automatically start the HCIC.swf file
bypassing the pre-loader and play button without editing it or the
media-controller.swf in anyway. So all the scripting needs to be
done in HCIC_container.swf.
I know this is confusing, and its difficult to explain, but
if you look at the files it should make sense.
ActionScripting is far from my strong point, so I'm
definitely over my head here.
Thanks for your help.Got my solution on another forum.
http://www.actionscript.org/forums/showthread.php3?t=146827 -
Need to load only few sales orders from ecc to bi 7?
Hi all,
there were couple of sales orders is missing for a particular day? we need to load it. there was deltas from the psa to the ods.
how to load from psa to the ods when there is deltas!. using the dtp?
what is the process to carry out loading a particular records from the psa to the ods without affectingthe deltas in bi 7?
can anyone pls help me on this!!
Thanks
poojaHi Pooja,
Have you loaded any data to DSO till now?
If not i hope you might be having two requests in PSA if you have done one Full & one Delta load in Infopackage??
(or) might be one if you have done only one Full Load.
Follow these steps if you have notyet loaded any data to DSO:-
Now create a DTP> right click on the DTP folder>create DTP--> here you can either select FULL or DELTA load since everything will be DELTA for the first time & all the data will be loaded.
Follow this if you already having any requests in DSO:-
You might have done FULL DTP for the first time
So now create a net DELTA DTP & Execute so that only new Delta records will be loaded.
Hope it helps!
Regards,
Pavan -
Help installing PSE10/Premier onto Mac from PC without software CD
Help installing PSE10/Premier onto Mac from PC without software CD. I can't find my software box anywhere..... Is there a way to locate my serial number within the programs? AND how can I download the programs from your site- all I see are downloads for the new PSE 11.
You really need the DVD box which also has the serial numbers on the back. If you registered the product you can get the serial numbers by logging-in to My Adobe but that's not much help as only the current version 11 is available for download.
-
I Need Help to Access The Source Code From A Form to Know the Calculation Formula
Hi,
I Need Help to Access The Source Code From A Form to Know the Calculation Formula. The application is a windows form application that is linked to SQL Server 2008. In one of the application forms it generates an invoice and does some calculations. I just
need to know where behind that form is the code that's doing the calculations to generate the invoice, I just need to get into the formula that's doing these calculations.
Thank you so much.Hi,
Thanks for the reply. This is a view and [AmountDue] is supposed to be [CurrentDueAmount] + [PastDueAmount] - [PaidAmount]. The view is not calculating [PaidAmount] right . Below is the complete code of the view. Do you see anything wrong in the code ?
Thanks.
SELECT [isi].[InvoiceID], [ii].[DueDate], [SubInvoiceID] = [isi].[ID], [INV_FacilityID] = [if].[ID], [if].[FacilityID],
[iff].[FacilityFeeID], [LoanID] = NULL, [isi].[PortfolioID], [isi].[Portfolio],
[PaymentType] = [isis_fee].[SectionType], [Name]
= [iff].[Name], [ReceivedAmount], [dates].[CurrentDueAmount],
[PastDueAmount] = CASE WHEN ISNULL([ReceivedAmount],
0) > 0 THEN [pastdue].[PastDueFeeAmount] + ISNULL([ReceivedAmount], 0)
WHEN ISNULL([ReceivedAmount], 0)
< 0 THEN /* We bring past due to zero and
apply reset to current. */ CASE WHEN [pastdue].[PastDueFeeAmount] + ISNULL([ReceivedAmount], 0)
< 0 THEN 0 ELSE [pastdue].[PastDueFeeAmount]
+ ISNULL([ReceivedAmount], 0) END WHEN ISNULL([ReceivedAmount], 0) = 0 AND
[pastdue].[PastDueFeeAmount] < 0 THEN 0 ELSE
[pastdue].[PastDueFeeAmount] END, [PaidAmount] = CASE WHEN ISNULL([ReceivedAmount], 0)
< 0 THEN /* We bring past due to zero and
apply rest to current. */ CASE WHEN [pastdue].[PastDueFeeAmount] + ISNULL([ReceivedAmount], 0)
< 0 THEN - ([pastdue].[PastDueFeeAmount]
+ ISNULL([ReceivedAmount], 0)) ELSE 0 END WHEN ISNULL([ReceivedAmount], 0) = 0 AND
[pastdue].[PastDueFeeAmount] < 0 THEN - [pastdue].[PastDueFeeAmount]
ELSE 0 END, [AmountDue] = [unpaid].[UnpaidFeeAmount], [ID] = [iff].[FacilityFeeID]
FROM [dbo].[INV_SubInvoice] isi JOIN
[dbo].[INV_Invoice] ii ON [isi].[InvoiceID]
= [ii].[ID] JOIN
[dbo].[INV_Facility] [if] ON [isi].[ID] = [if].[SubInvoiceID]
JOIN
[dbo].[INV_FacilityFee] iff ON [if].[ID] = [iff].[INV_FacilityID]
JOIN
(SELECT [sis_fee].[ID],
[sis_fee].[SectionTypeCode], [SectionType] = [st_fee].[Name], [sis_fee].[INV_FacilityFeeID]
FROM
[dbo].[INV_SubInvoiceSection] sis_fee JOIN
[dbo].[INV_SectionType] st_fee ON [sis_fee].[SectionTypeCode] = [st_fee].[Code]
WHERE [INV_FacilityFeeID]
IS NOT NULL AND [StatusCode] = 'BILL') isis_fee ON [iff].[ID] = [isis_fee].[INV_FacilityFeeID] JOIN
(SELECT [iffa].[SectionID],
[AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]),
[AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedFeeAmount]),
[ReceivedAmount] = SUM([iffa].[ReceivedFeeAmount])
FROM
[dbo].[INV_FacilityFeeAccrual] iffa
GROUP BY [iffa].[SectionID])
dates ON [isis_fee].[ID] = [dates].[SectionID] LEFT JOIN
(SELECT *
FROM
[dbo].[INV_FacilityFeeAccrual]) unpaid ON [dates].[SectionID] = [unpaid].[SectionID] AND
[dates].[AccrualDeterminationDateMax] = [unpaid].[AccrualDeterminationDate]
LEFT JOIN
(SELECT [SectionID],
[PastDueFeeAmount] = SUM([PastDueFeeAmount])
FROM
[dbo].[INV_FacilityFeeAccrual]
GROUP BY [SectionID]) pastdue
ON [dates].[SectionID] = [pastdue].[SectionID]
UNION
SELECT [isi].[InvoiceID], [ii].[DueDate], [SubInvoiceID] = [isi].[ID], [INV_FacilityID] = [if].[ID], [if].[FacilityID],
[FacilityFeeID] = NULL, [il].[LoanID], [isi].[PortfolioID], [isi].[Portfolio],
[PaymentType] = [isis_loan].[SectionType], [Name]
= [il].[Name], [ReceivedAmount], [CurrentDueAmount], [PastDueAmount] = CASE WHEN ISNULL([ReceivedAmount],
0) > 0 THEN [PastDueAmount] + ISNULL([ReceivedAmount],
0) WHEN ISNULL([ReceivedAmount], 0)
< 0 THEN /* We bring past due to zero and
apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0)
< 0 THEN 0 ELSE [PastDueAmount] + ISNULL([ReceivedAmount],
0) END WHEN ISNULL([ReceivedAmount], 0) = 0 AND
[PastDueAmount] < 0 THEN 0 ELSE [PastDueAmount]
END,
[PaidAmount] = CASE WHEN [isis_loan].[SectionTypeCode]
= 'LOAN_PRIN' THEN 0 ELSE CASE WHEN ISNULL([ReceivedAmount], 0)
< 0 THEN /* We bring past due to zero and
apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0)
< 0 THEN - ([PastDueAmount] + ISNULL([ReceivedAmount],
0)) ELSE 0 END WHEN ISNULL([ReceivedAmount], 0) = 0 AND
[PastDueAmount] < 0 THEN - [PastDueAmount]
ELSE 0 END END,
[AmountDue] = CASE WHEN [isis_loan].[SectionTypeCode]
= 'LOAN_PRIN' THEN [CurrentDueAmount] ELSE [unpaid].[AmountDue] END, [ID] = [il].[LoanID]
FROM [dbo].[INV_SubInvoice] isi JOIN
[dbo].[INV_Invoice] ii ON [isi].[InvoiceID]
= [ii].[ID] JOIN
[dbo].[INV_Facility] [if] ON [isi].[ID] = [if].[SubInvoiceID]
JOIN
[dbo].[INV_Loan] il ON [if].[ID] = [il].[INV_FacilityID]
JOIN
(SELECT [sis_loan].[ID],
[sis_loan].[SectionTypeCode], [SectionType] = [st_loan].[Name], [sis_loan].[INV_LoanID]
FROM
[dbo].[INV_SubInvoiceSection] sis_loan JOIN
[dbo].[INV_SectionType] st_loan ON [sis_loan].[SectionTypeCode] = [st_loan].[Code]
WHERE [INV_LoanID]
IS NOT NULL AND [StatusCode] = 'BILL') isis_loan ON [il].[ID] = [isis_loan].[INV_LoanID] JOIN
(SELECT [iffa].[SectionID],
[AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]),
[AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[ExpectedPrincipalAmount]),
[ReceivedAmount] = SUM([ReceivedPrincipalAmount])
FROM
[dbo].[INV_LoanPrincipalAmortization] iffa
GROUP BY [iffa].[SectionID]
UNION
SELECT [iffa].[SectionID],
[AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]),
[AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedInterestAmount]),
[ReceivedAmount] = SUM([ReceivedInterestAmount])
FROM
[dbo].[INV_LoanCashInterestAccrual] iffa
GROUP BY [iffa].[SectionID]
UNION
SELECT [iffa].[SectionID],
[AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]),
[AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedInterestAmount]),
[ReceivedAmount] = SUM([ReceivedInterestAmount])
FROM
[dbo].[INV_LoanPIKInterestAccrual] iffa
GROUP BY [iffa].[SectionID])
dates ON [isis_loan].[ID] = [dates].[SectionID] LEFT JOIN
(SELECT [AmountDue]
= [UnpaidPrincipalAmount], [SectionID], [AccrualDeterminationDate]
FROM
[dbo].[INV_LoanPrincipalAmortization]
UNION
SELECT [AmountDue]
= [UnpaidInterestAmount], [SectionID], [AccrualDeterminationDate]
FROM
[dbo].[INV_LoanCashInterestAccrual]
UNION
SELECT [AmountDue]
= [UnpaidInterestAmount], [SectionID], [AccrualDeterminationDate]
FROM
[dbo].[INV_LoanPIKInterestAccrual]) unpaid ON [dates].[SectionID] = [unpaid].[SectionID] AND
[dates].[AccrualDeterminationDateMax] = [unpaid].[AccrualDeterminationDate]
LEFT JOIN
(SELECT [PastDueAmount]
= SUM([PastDuePrincipalAmount]), [SectionID]
FROM
[dbo].[INV_LoanPrincipalAmortization]
GROUP BY [SectionID]
UNION
SELECT [PastDueAmount]
= SUM([PastDueInterestAmount]), [SectionID]
FROM
[dbo].[INV_LoanCashInterestAccrual]
GROUP BY [SectionID]
UNION
SELECT [PastDueAmount]
= SUM([PastDueInterestAmount]), [SectionID]
FROM
[dbo].[INV_LoanPIKInterestAccrual]
GROUP BY [SectionID]) pastdue
ON [dates].[SectionID] = [pastdue].[SectionID]
UNION
SELECT [isi].[InvoiceID], [ii].[DueDate], [SubInvoiceID] = [isi].[ID], [INV_FacilityID] = [if].[ID], [if].[FacilityID],
[FacilityFeeID] = NULL, [il].[LoanID], [isi].[PortfolioID], [isi].[Portfolio],
[PaymentType] = 'PIK Interest Applied', [Name]
= [il].[Name], [ReceivedAmount], [CurrentDueAmount] = - [dates].[CurrentDueAmount],
[PastDueAmount] = - CASE WHEN ISNULL([ReceivedAmount],
0) > 0 THEN [PastDueAmount] + ISNULL([ReceivedAmount], 0) WHEN ISNULL([ReceivedAmount], 0)
< 0 THEN /* We bring past due to zero and
apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0)
< 0 THEN 0 ELSE [PastDueAmount] + ISNULL([ReceivedAmount],
0) END WHEN ISNULL([ReceivedAmount], 0) = 0 AND
[PastDueAmount] < 0 THEN 0 ELSE [PastDueAmount]
END, [PaidAmount] = - CASE WHEN ISNULL([ReceivedAmount], 0)
< 0 THEN /* We bring past due to zero and
apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0)
< 0 THEN - ([PastDueAmount] + ISNULL([ReceivedAmount],
0)) ELSE 0 END WHEN ISNULL([ReceivedAmount], 0) = 0 AND
[PastDueAmount] < 0 THEN - [PastDueAmount]
ELSE 0 END, [AmountDue] = - [AmountDue], [ID] = [il].[LoanID]
FROM [dbo].[INV_SubInvoice] isi JOIN
[dbo].[INV_Invoice] ii ON [isi].[InvoiceID]
= [ii].[ID] JOIN
[dbo].[INV_Facility] [if] ON [isi].[ID] = [if].[SubInvoiceID]
JOIN
[dbo].[INV_Loan] il ON [if].[ID] = [il].[INV_FacilityID]
JOIN
(SELECT [sis_loan].[ID],
[sis_loan].[SectionTypeCode], [SectionType] = [st_loan].[Name], [sis_loan].[INV_LoanID]
FROM
[dbo].[INV_SubInvoiceSection] sis_loan JOIN
[dbo].[INV_SectionType] st_loan ON [sis_loan].[SectionTypeCode] = [st_loan].[Code]
WHERE [INV_LoanID]
IS NOT NULL AND [StatusCode] = 'BILL' AND [sis_loan].[SectionTypeCode] = 'LOAN_INT_PIK') isis_loan ON
[il].[ID] = [isis_loan].[INV_LoanID] JOIN
(SELECT [iffa].[SectionID],
[AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]),
[AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedInterestAmount]),
[ReceivedAmount] = SUM([ReceivedInterestAmount])
FROM
[dbo].[INV_LoanPIKInterestAccrual] iffa
GROUP BY [iffa].[SectionID])
dates ON [isis_loan].[ID] = [dates].[SectionID] LEFT JOIN
(SELECT [AmountDue]
= [UnpaidInterestAmount], [SectionID], [AccrualDeterminationDate]
FROM
[dbo].[INV_LoanPIKInterestAccrual]) unpaid ON [dates].[SectionID] = [unpaid].[SectionID] AND
[dates].[AccrualDeterminationDateMax] = [unpaid].[AccrualDeterminationDate]
LEFT JOIN
(SELECT [PastDueAmount]
= SUM([PastDueInterestAmount]), [SectionID]
FROM
[dbo].[INV_LoanPIKInterestAccrual]
GROUP BY [SectionID]) pastdue
ON [dates].[SectionID] = [pastdue].[SectionID] -
NEED HELP! - Installing Camera raw presets from USB Stick
NEED HELP! -installing Camera raw presets from USB Stick.
I am attempting to install the Camera Raw Presets.
It says to put them into User Name/Library/Application Support/Adobe/CameraRaw/Settings...
When I get to CameraRaw the ONLY folders in there are CameraProfiles & Lens Profiles.
I have searched everywhere looking for a CameraRaw-Settings folder and cannot find one.
I have latest version of CameraRaw installed and still no settings folder.
I even attempted to find it by looking in camera raw where it has saved the custom settings I made as presets and it shows that they are saved but will not show me where.
I am using CS5 specifically Photoshop v12.0.4 and Bridge. I have Lightroom 4. I have iMac OS 10.7.3
Do I need to reinstall Camera Raw and how do you do that?
Will I then lose my presets that I made in CameraRaw?
Thanks for your helpHere is a note from the ACR 7.1 beta release. http://labs.adobe.com/technologies/cameraraw7-1/?tabID=details
Perhaps this answers question.
Frequently Asked Questions
Why is it no longer required to place the plug-in file in the specified directory on my hard drive?
The Camera Raw update process has grown to include lens profile and camera profile files which are easiest to install via a single installer process instead of updating several different directories manually. -
HT5622 I need help finding a movie that I downloaded, can anyone help me with this?
Hello, I need help finding a movie that I downloaded, can anyone help me with this?
If you downloaded it to your iTunes library it will be in the Movies folder. If you downloaded it to an iOS device you will find it in the Videos app. This explains how to redownload previously purchased videos (available in some locations as long as the studio permits it): http://support.apple.com/kb/PH12283.
-
Need help trying to transfer my information from one iphone to another
need help trying to transfer my information from one iphone to another
If you are restoring from an icloud backup you are going to have to erase a content and setting and while in the setup prompts you will get the option to restore from an icloud back...that's the only time you will get the option to restore from an icloud back and that's during setup
-
I lost my ipod I really need help to find it. Im from other country and i cant buy another one. Is not connected to internet
There is nothing anyone can do.
Sorry.
You will have to keep looking for it -
I have just formatted by toshiba hardrive to Mac OS extended as recommended so I could upload movies onto it from my mac however I am now unable to watch these movies through my set top box like I could previously. How can I fix this?
Check the box's documentation to find out what drive formats it's capable of reading. Very few, if any, non-Apple devices natively support drives formatted as Mac OS Extended.
(111452) -
Another JFrame from a Button Click
Hi...
I was just wondering how I could write a code where I could bring up another JFrame (let say JFrame2) from a button click on a main JFrame (let say JFrame1)......
Could anyone show me an example......
Thanks
Ashley QThanks.........
Btw, I am trying to output 2 different JFrame, by clicking 2 JButtons. On JFrame frame, there's 2 button, the Synthesizer Button which bring up the Synthesizer JFrame and the Recognizer Button which bring up the Recognizer JFrame. However, there's a some problems probably with my coding......Could someone help me...
import java.io.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class VoicePronunciationSystem extends JFrame implements ActionListener
public Component createComponents()
JButton RecognizerButton = new JButton ("Recognizer");
RecognizerButton.setMnemonic('r');
RecognizerButton.addActionListener(this);
JButton SynthesizerButton = new JButton ("Synthesizer");
SynthesizerButton.setMnemonic('s');
SynthesizerButton.addActionListener(this);
JLabel label = new JLabel ("This is a Voice Pronunciation System");
JPanel panel = new JPanel();
panel.setBorder(BorderFactory.createEmptyBorder(120,120,120,120));
panel.setLayout(new GridLayout(1, 1));
panel.add(label);
panel.setLayout(new GridLayout(2, 2));
panel.add(RecognizerButton);
panel.setLayout(new GridLayout(2, 3));
panel.add(SynthesizerButton);
return panel;
public void actionPerformed(ActionEvent event)
Object source = event.getSource();
if( source == RecognizerButton) {
JFrame frame2 = new JFrame("Recognition");
frame2.getContentPane().add(new JTextField(20));
frame2.pack();
frame2.setVisible(true);
if( source == SynthesizerButton) {
JFrame frame3 = new JFrame("Synthesizer");
frame3.getContentPane().add(new JTextField(20));
frame3.pack();
frame3.setVisible(true);
public static void main(String[] args)
try
UIManager.setLookAndFeel(
UIManager.getCrossPlatformLookAndFeelClassName());
} catch (Exception e) { }
JFrame frame = new JFrame("VoicePronunciationSystem");
//JFrame frame2 = new JFrame ("Recognition");
//JLabel label = new JLabel ("This is a Voice Pronunciation System");
//frame.getContentPane().add(label);
VoicePronunciationSystem sys = new VoicePronunciationSystem();
Component contents = sys.createComponents();
frame.getContentPane().add(contents, BorderLayout.CENTER);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
} -
Help needed in Loading Mutiple movies in ScrollPane
Hi I am making video gallery using Action Script 3.0.I am
loading some FLVs into movies on my stage using XML. I have
on-click events on those movies.I have combined those all movies
into one movie to put in the scroll pane. The movie is fine fitted
in the scroll pane with the scrolls (which i needed )but the
problem I have is that all the on click events which were on the
individual movies are gone. The reason might be that because the
on-click events were on individual movies, and movies are now
combined in one. If anybody tells me how to load multiple
movies(collectively) in the scroll pane, that can solve my problem
because in that way movies can be inserted in the scroll pane
without combining all the movie into one and events will stay there
too.
Any other suggestion will be also be appreciated.
Please help me out in figuring out the solution of this
problem.
Thanks
AnujHi,
I am surprised with your steps. In APO, you want to load data from a particular infoobject from BW. Why did you create a specific extractor in SBIW???
You have just reinvented the wheel... It reminds me some people in the world ...
Here is what you should do:
- in BW, at the infosource level, you create a direct infosource based on the infoobject that you want to extract the data to APO (let's say 0MATERIAL)
- in BW, at the infosource level, you right click on the infosource itself and you choose 'GENERATE EXPORT DATASOURCE. That will create the datasources for you (attributes, texts, hierarchies) depending on the infoobject settings. The names of these datasources will begin with a 8 for the datamart
- in APO, you replicate the BW system. Now you find the datasources 80MATERIAL something
- in APO, you create the transfer rules to your infosource and you can load
Just give it a try
Regards -
Need help with FLV type SWF playback in flash movie
Hi,
I have three external SWF files from a client without FLA
sources. The SWFs were done 3 years ago by someone else so there is
no way to modify the existing SWF files. These contain no
interactivity but may involve nested clips on the main timeline.
They are AS1 or AS2 files so they need to be done with AS2
scripting to keep it simple.
I need to call these SWF files inside another flash movie and
play them in a player window as if they were video files with
play/pause, seekbar and volume controls. The needed functionality
is similar to FLV players. My controls will use custom graphic
buttons and sliders mimicking the look of CNN video player window.
Does anyone know a good tutorial on how to script these
controls for SWF?
Most likely I think I will load it in a clip and I am
thinking that I will need to get the duration of the loaded swf in
order to set up the seekbar.
Thanks in advance,
AttilaI think your professor, or somebody, gave you directions with ActionScript 2 programming. In AS2, what oyu have here would have worked just fine. But, in AS3, you need to use a fairly different approach. Your buttons, and their instance name, can remain the same. But now, in AS3, you have to add event listeners in the following manner:
yourButtonName.addEventListener(MouseEvent.CLICK, yourListenerFunction);
In your case, you can do one of two things - A) assign a unique listener function to each button, or B) assign the same listsner to both functions:
A)
start_btn.addEventListener(MouseEvent.CLICK, startPolygon);
stop_btn.addEventListener(MouseEvent.CLICK, stopPolygon);
function startPolygon(e:MouseEvent):void{
polygon.play();
function stopPolygon(e:MouseEvent):void{
polygon.stop();
B)
start_btn.addEventListener(MouseEvent.CLICK, controlPolygon);
stop_btn.addEventListener(MouseEvent.CLICK, controlPolygon);
function controlPolygon(e:MouseEvent):void{
if (e.target.name == "start_btn") {//Test for the name of the object that dispatched the CLICK event
polygon.play();
} else if (e.target.name == "stop_btn") {
polygon.stop();
When I'm using several buttons that do the same/nearly similar things, I favor approach B over A, as it keeps me to jsut one single function to deal with.
Maybe you are looking for
-
It's easy to do but why it doesn't works??
Please help me guys, i'm not able to solve my problem,i'm trying and trying. I've downloaded from http://java.sun.com/products/plugin/1.5.0/demos/plugin/applets.html an applet demo,the clock. i've tested it with this simple html file <html> <head> <t
-
Session host changes to custom Windows theme
One of our session host servers (2012 R2 with Desktop Experience installed) has recently been changing themes to a custom one instead of the Windows default. The issue is this custom theme contains some high contrast settings that paradoxically make
-
I just purchased more storage and still prompts that I don't have enough storage please help as I'm operating of of iOS 5 and I'm ready to smash my iPad
-
Macbook Pro Password not working after crash!
I have a 2012 Macbook Pro and I installed Mavericks late last year. Last night Mavericks crashed while I was working on Excel. I restarted the system but now the password would not let me log in. After some searching on google, I tried the resetart w
-
I just added a new SATA drive to my Power Mac G5. The specs of the machine are as follows: Machine Name: Power Mac G5 Machine Model: PowerMac7,3 CPU Type: PowerPC G5 (3.0) Number Of CPUs: 2 CPU Speed: 2.5 GHz L2 Cache (per CPU): 512 KB Memory: 1.5 GB