Question about Macromedia Flash MX

9 Answers

Action script while trying to create an animated digital clock from tutorial,I put the following script: time=new Date(); // time object var seconds = time.getSeconds() var minutes = time.getMinutes() var hours = time.getHours() if (hours<12) { ampm = "AM"; } else{ ampm = "PM"; } while(hours >12){ hours = hours - 12; } if(hours<10) { hours = "0" + hours; } if(minutes<10) { minutes = "0" + minutes; } if(seconds<10) { seconds = "0" + seconds; } Clock_text.text = hours + ":" + minutes + ":" + seconds +" "+ ampm; Step 10 Click on the second frame of layer action and press F6 key. Then, enter this code inside the actions panel: gotoAndPlay(1); Test your Movie (Ctrl+Enter). but it is not showing result. I could not find the error.please help.

Posted by on

  • 2 more comments 
  • rpanda2007 Nov 30, 2007

    i have puted the script but i found one error . this is the error
    i will tell u how i did it i had puted the script on frame 1 and click on the second frame and pressed f 6

    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 28: Syntax error.
    Step 10

    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 30: Syntax error.
    Click on the second frame of layer action and press F6 key. Then, enter this code inside the actions panel:

    Total ActionScript Errors: 2 Reported Errors: 2


  • Anonymous May 08, 2008

    how can use the flash script

  • dolphin devi Aug 23, 2008

    yes i too have the same problem.

  • Anonymous Aug 28, 2008

    i need to access another websites when u clic flash movie and i have used this command---- on (release) {
    getURL ("http://www.flashvault.net","_blank");
    } and it says there 's error saying **Error** Scene=Scene 1, layer=Layer 3, frame=60:Line 1: Mouse events are permitted only for button instances
    on (release) {

    Total ActionScript Errors: 1 Reported Errors: 1

×

Ad

9 Answers

  • Level 1:

    An expert who has achieved level 1.

  • Contributor
  • 1 Answer

Hi
i am srinivas

Posted on Sep 12, 2008

Ad

Poda patti

Posted on Jun 02, 2008

Ad

Hi

thanks u giving the code for timer example

Posted on May 07, 2008

U cn also use
display=mydatee.getHours()+":"+mydate.getMiniut()+":"+mydate.getSecond();
:)

Posted on Jan 22, 2008

Please give us good knolodge of action script

Posted on Jan 16, 2008

  • Level 1:

    An expert who has achieved level 1.

  • Contributor
  • 1 Answer

Iukul

Posted on Dec 19, 2007

Time=new Date(); // time object
var seconds = time.getSeconds()
var minutes = time.getMinutes()
var hours = time.getHours()
if (hours<12) {
ampm = "AM";
}
else{
ampm = "PM";
}
while(hours >12){
hours = hours - 12;
}
if(hours<10)
{
hours = "0" + hours;
}
if(minutes<10)
{
minutes = "0" + minutes;
}
if(seconds<10)
{
seconds = "0" + seconds;
}
Clock_text.text = hours + ":" + minutes + ":" + seconds +" "+ ampm;

Step 10

Posted on Dec 11, 2007

  • Level 1:

    An expert who has achieved level 1.

    Governor:

    An expert whose answer got voted for 20 times.

    Corporal:

    An expert that has over 10 points.

    Mayor:

    An expert whose answer got voted for 2 times.

  • Contributor
  • 12 Answers

Steps to solve this problem

1. open flash

2. select rectagle

3. draw shape in scene.

4. convert it to movieclip first

5. double click to edit movieclip

6. put dynimic textbox over rectangle and name it [Clock_text]

7. the paste the code in time line above the object layer given below.

 

// ActionScript Started

 

function brajesh(){

time=new Date(); // time object
var seconds = time.getSeconds()
var minutes = time.getMinutes()
var hours = time.getHours()
if (hours<12) {
ampm = "AM";
}
else{
ampm = "PM";
}
while(hours >12){
hours = hours - 12;
}
if(hours<10)
{
hours = "0" + hours;
}
if(minutes<10)
{
minutes = "0" + minutes;
}
if(seconds<10)
{
seconds = "0" + seconds;
}
Clock_text.text = hours + ":" + minutes + ":" + seconds +" "+ ampm;

}
brajesh();
setInterval(brajesh,1000);

//ActionScript Ended

 

8. come out to the scene by clicking the link given above the time line.

9. then select the keyframe where movieclip is placed.

10. press F5 to increase blank keyframe

11. Right click the mouse over the keyframe then select [create motion tween]

12. Press F6 at the end of the frame to add key frame then move the movie clip to your desired place

13. Press (Ctrl+Enter).to test your movie
 it will show result.

Posted on Oct 18, 2007

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    MVP:

    An expert that got 5 achievements.

    Governor:

    An expert whose answer got voted for 20 times.

    Hot-Shot:

    An expert who has answered 20 questions.

  • Expert
  • 69 Answers

I tried your script and it all checked out fine when I ran it. Make sure you click on the first frame of layer action and open the Action Script Panel (F9). Once this is accomplished. Click on the second frame of layer action and press F6 key. Like I said everything worked out when I tried using the script you posted so, if anything I would suggest starting from scratch.

Posted on Aug 26, 2007

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi there,
Save hours of searching online or wasting money on unnecessary repairs by talking to a 6YA Expert who can help you resolve this issue over the phone in a minute or two.

Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.

Here's a link to this great service

Good luck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB0.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0;...


At that line you have the following javascript code:

var jautw = document.getElementById("ja-usertoolswrap");

This means that your variable jautw searching for object with id=ja-usertoolswrap, which in your html page cannot be found.
For that reason javascript throws error "nul is null or not an object".
You can rewrite your function like this:

jaToolsHover = function() {

try {

var jautw = document.getElementById("ja-usertoolswrap");
jautw.onmouseover=function() {
this.className="ja-toolswraphover";
}
jautw.onmouseout=function() {
this.className="";
}

}

catch(errmsg){}

}

Oct 01, 2010 | Microsoft Internet Explorer 8

1 Answer

I'm trying to create a control buttons for a flash CS3 movie and will also include another set of buttons that will take you to next scene and previous scenes.


ok, i tell u one thing.

one.fla

frame 1:

create a movieClip at 550x400 and give a instance name as 'movie_mc'

frame 2: Create two buttons as btn1,btn2.give instance as same.

frame 3: press F9 and Give 'stop();'
var count = 0

file1.fla

create animation

file2.fla

create animation

one.fla

next button script is

on(press)
{
count = count+1;
movieclipinstancename.loadMovie("file"+count);
}

previous button

on(press)
{
count = count-1;
movieclipinstancename.loadMovie("file"+count);
}


May 31, 2009 | Adobe Flash® CS3 Professional Full Version...

1 Answer

How to define variables in flash action script for every movie that i want


Using variables in a project

When you build animations or applications with Flash, there are very few situations in which you don't need to use any kind of variable in your project. For example, if you build a login system, you might need variables to determine whether the user name and password are valid, or whether they are filled in at all.

You can find more information on loading variables (such as name/value pairs) in Working with External Data.

In the following example, you use variables to store the path of an image you are loading with the Loader class, a variable for the instance of the Loader class, and a couple of functions that are called depending on whether the file is successfully loaded or not.
To use variables in a project:

1. Create a new Flash document, and save it as imgloader.fla.
2. Select Frame 1 of the Timeline, and add the following ActionScript to the Actions panel:

/* Specify default image in case there wasn't a value passed using FlashVars. */
var imgUrl:String = "http://www.helpexamples.com/flash/images/image1.jpg";
if (_level0.imgURL != undefined) {
// If image was specified, overwrite default value.
imgUrl = _level0.imgURL;
}

Apr 15, 2009 | Macromedia Flash Professional 8.0 Full...

2 Answers

How to make flash button animation and basic action script,and than more detailes


Visit these links, your answer is here:
http://www.echoecho.com/flashbuttons.htm
http://www.premiumbeat.com/flash_resources/flash_tutorials/how_to_make_flash_button.php
http://www.webdevelopersnotes.com/tutorials/adflash/flash_button_tutorial_animated_button.php3

and don't forget flashkit.net

Feb 02, 2009 | Macromedia Flash MX

1 Answer

Flash


Hi there,

One of the good resource is flashkit.com
You can find good tutorials and examples online for free.

Regards

Jan 21, 2009 | Macromedia Computers & Internet

2 Answers

Transition effects without scripting


since you did not tell me what software you have, I suggested you to try SWISHMAX2.
To create transition you just put the object and choose the effect.
You can try the trial version in swishzone.com
In the forum Swish communities you can have more effects for free. Also tutorials are available.
If you dont know how to start it, just let me know.

Feb 07, 2008 | Adobe Photoshop 7.0 for PC

4 Answers

Button script


how to link 1 frame to 6 frame with button give me script

Dec 01, 2007 | Macromedia Flash MX

1 Answer

About flash scripiting


Dear Manhor,

Flash is basically used for animation and motions of objects you create in it. It features support for vector and raster graphics, a scripting Language called ActionScript and bi-directional streaming of audio and video. There are also versions of the Flash Player for mobile phones and other non-PC devices.

For detailed information you might like to read tutorials on Adobe flash like:

http://en.wikipedia.org/wiki/Adobe_Flash

Please press solve if this answer has helped you.

Nov 25, 2007 | Macromedia Flash MX

6 Answers

Veo Web Cam


Hello, I have misplace my cd for veo webcam 650vs26x. Can someone help?
Please advice,
Cynthia

Oct 28, 2007 | Veo Mobile Connect Webcam

1 Answer

Action script


first u create a movieclip then rightclick then "edit in place".then u select that object then convert it to button it is very easy one try it

Sep 03, 2007 | Macromedia Flash MX

Not finding what you are looking for?
Macromedia Flash MX Logo

612 people viewed this question

Ask a Question

Usually answered in minutes!

Top Macromedia Computers & Internet Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18425 Answers

Folusho Adeyanju
Folusho Adeyanju

Level 2 Expert

131 Answers

Brad Brown

Level 3 Expert

17441 Answers

Are you a Macromedia Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...