A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: actionscript error

  1. #1
    flash freak and newbie
    Join Date
    Aug 2005
    Posts
    15

    actionscript error

    i know absolutely nothing of actionscipt, im using flash MX professional. whenever i try applying a simple code from the ones already available, like play, it doesnt work, and when i check it, it gives me an error with the code, though ive used the ones from the program itself...yesterday it seemed to work for a little while, but then the program suddenly closed and i hadnt saved recently..what can i do?

  2. #2
    Senior Member
    Join Date
    Apr 2006
    Posts
    1,059
    smoke more man...or maybe look into pretty much any basic programming class

  3. #3
    flash freak and newbie
    Join Date
    Aug 2005
    Posts
    15
    i need a proper reply

  4. #4
    Senior Member
    Join Date
    Apr 2006
    Posts
    1,059
    you prolly need an on enter frame if you are putting it on an object...

  5. #5
    flash freak and newbie
    Join Date
    Aug 2005
    Posts
    15
    it keeps saying error or sumthing, i dont get it, i tried putting the code on the frame, on the button, on anything thats there, it just doesnt seem to work, whe whole code is just "play();" rite?

  6. #6
    flash freak and newbie
    Join Date
    Aug 2005
    Posts
    15
    ok now i have another problem, i have a few mpg videos embedded in my flash movie, ok after the short intro, an mpg video is supposed 2 play, but instead it stops at the first frame...

  7. #7
    FK Slacker
    Join Date
    Jun 2000
    Location
    vancouver
    Posts
    3,208
    You should be more specific - post your code, as well as the exact errors that you are getting, and you'll get better answers...

    K.

  8. #8
    flash freak and newbie
    Join Date
    Aug 2005
    Posts
    15
    the error that comes out on the output panel or whatever u call it goes
    "**Error** Scene=Scene 1, layer=play button, frame=1:Line 1: Statement must appear within on handler
    play();

    **Error** Scene=Scene 1, layer=stop button, frame=1:Line 1: Statement must appear within on handler
    stop();

    Total ActionScript Errors: 2 Reported Errors: 2"
    and i have no idea what so ever of what that means

    and i havent got a code, i just tried using the play action from the functions in the program itself, i didnt add nothing to it...that is how the error came out.

    my flash movie is like 21 MB now cuz i have like 6 videos embedded to it, and i think because of the size or something it doesnt play the videos, it just pauses on the first frame of the video, could that be the reason?

    god, im such an idiot

  9. #9
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    could be the file is curropt
    best practice is to have 6 swfs each with 1 embedded video
    in the main movie, load 1 at a time when required using - loadMovieNum("video1.swf");

    i use this method in this player -
    http://www.jackleaman.co.uk/video/video_player.html
    fla available on request

  10. #10
    Senior Member
    Join Date
    Apr 2006
    Posts
    1,059
    thats telling you it needs an event handler...

    try this
    onEvent(load){
    //code goes here
    }

    I told you that like 3 posts back...unless the code is on a frame you need a handeler

  11. #11
    flash freak and newbie
    Join Date
    Aug 2005
    Posts
    15
    hey thanx guys!

    god i really need 2 learn some kinda scripting..

  12. #12
    Senior Member
    Join Date
    Apr 2006
    Posts
    1,059
    heh yeah... thats what i told you in the first post

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center