SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2004
    Location
    Grand Cayman
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Flash syntax update from Fla5 to Fla9

    Could someone please help me update this little flash menu from Flash 5 to Flash CS3 (9).

    On the stage I have a button with the following code:

    on (rollOver) {
    a:yvel= 1;
    }
    on (rollOut) {
    a:yvel = 0;
    }


    Also on the stage is a movieClip with the following code:

    onClipEvent (enterFrame) {
    if (yvel == 1) {
    _y = _y+(80-_y)/8;
    }
    if (yvel == 0) {
    _y = _y+(-27-_y)/11;
    }
    }


    Flash CS3 is giving me the following errors when I publish:

    Scene=Scene 1, layer=buttons, fr Syntax error. a:yvel= 1;
    Scene=Scene 1, layer=buttons, fr Unexpected '}' encountered }

    Thank you in advance.

  2. #2
    SitePoint Guru [Paul Ferrie]'s Avatar
    Join Date
    Oct 2007
    Location
    Glasgow, Scotland, UK
    Posts
    853
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code Actionscript:
    on (rollOver) {
    	yvel= 1;
    }
    on (rollOut) {
    	yvel = 0;
    }
    onClipEvent (enterFrame) {
    	if (yvel == 1) {
    		_y = _y+(80-_y)/8;
    	}
    	if (yvel == 0) {
    		_y = _y+(-27-_y)/11;
    	}
    }
    THat should be you know unless your using AS3?
    .:To me AS is like LEGO, Only for the big Kids :.
    - Site - Blog - Glasgow Flasher
    bringmadeleinehome.com

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2004
    Location
    Grand Cayman
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Paul, can that be targeted to effect a specific movieClip as in the old syntax? "a" is the name of one of the dropdown menus.

  4. #4
    SitePoint Guru [Paul Ferrie]'s Avatar
    Join Date
    Oct 2007
    Location
    Glasgow, Scotland, UK
    Posts
    853
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code Actionscript:
    on (rollOver) {
        a.yvel= 1;
    }
    on (rollOut) {
        a.yvel = 0;
    }
    //Assuming this is the (a) movieclip
    onClipEvent (enterFrame) {
        if (this.yvel == 1) {
            _y = _y+(80-_y)/8;
        }
        if (this.yvel == 0) {
            _y = _y+(-27-_y)/11;
        }
    }
    .:To me AS is like LEGO, Only for the big Kids :.
    - Site - Blog - Glasgow Flasher
    bringmadeleinehome.com

  5. #5
    SitePoint Enthusiast
    Join Date
    May 2004
    Location
    Grand Cayman
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks very much Paul! That worked.

  6. #6
    SitePoint Guru [Paul Ferrie]'s Avatar
    Join Date
    Oct 2007
    Location
    Glasgow, Scotland, UK
    Posts
    853
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by caynada View Post
    Thanks very much Paul! That worked.
    Nice one
    .:To me AS is like LEGO, Only for the big Kids :.
    - Site - Blog - Glasgow Flasher
    bringmadeleinehome.com


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
  •