Results 1 to 4 of 4

Thread: Help - New to flash

  1. #1
    Join Date
    Aug 2008
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Help - New to flash

    Hi I came across this tutorial online that seemed fairly simple. It was to create a slide show type of gallery where I could create buttons that would scroll through the images in both next & previous directions. I am having troubles. I came across help here on the forum that looked like it was helping someone else with the same situation. Here is the code I have for the script on the buttons.

    Code:
    // next button
    next_btn.onPress = Next;
    function Next() {
    	if (mc_content._currentframe == mc_content.totalframes) {
    		mc_content.gotoAndStop(1);
    	}
    	else {
    		mc_content.nextFrame()
    	}
    }
    
    //last button
    last_btn.onPress = Last;
    function Last() {
    	if(mc_content._currentframe == 1){
    		mc_content.gotoAndStop(mc_content._totalframes)
    	}
    	else{
    		mc_content.prevFrame()
    	}
    }
    
    //setInterval
    setInterval( Next, 5000 )
    I keep getting an error when i publish that says
    "Access of possibly undefined property onPress through a reference with static type flash.display:SimpleButton."

    Being new, I have no idea what that means, & I can't figure out where I've made an error. I can send the .fla file as well to see if it will help. Any help that can be provided would be greatly appreciated. I'm just trying to get a decent gallery up for my sign business and its driving me crazy.

    Thanks in advance

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    That error is an AS3 error. Your code looks like AS2.

    Go to File > Publish Settings and change the output to ActionScript 2.0.

  3. The Following User Says Thank You to Medyman For This Useful Post:

    LakeGraphics (08-14-2008)

  4. #3
    Join Date
    Aug 2008
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Medyman...you da man. Many thanks

  5. #4
    Join Date
    Jul 2008
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Medyman View Post
    That error is an AS3 error. Your code looks like AS2.

    Go to File > Publish Settings and change the output to ActionScript 2.0.
    Really an expert!!

    admire you......

Bookmarks

Posting Permissions

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