A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: function call broken? weird

Hybrid View

  1. #1
    Senior Member
    Join Date
    Mar 2003
    Posts
    316

    function call broken? weird

    Hi

    I have a script that I run at the end of each section in timeline of a presentation.
    All I tried to do is put it into a function on the main timeline of the movie
    and then on the end of each section call the function ...
    BUT it wont work anymore?

    All code is on the same timeline but function doesn't get called why ?

    //main timeline throughout movie
    function gotoNext(){
    if (_global.count<29) { ...//blabla ... }}

    //end of the section - last frame
    gotoNext();

    Is this wrong ???

  2. #2
    ___________________
    Join Date
    May 2004
    Posts
    3,174
    i dont use multiple frames so this is just a guess, but try adding a new layer with nothing on it and no keyframes - put the function definition there to ensure its not erased/overwritten, but keep the call whereever it is

  3. #3
    I am not an expert
    Join Date
    Aug 2005
    Posts
    175
    don't use _gloabl as it is used to decalare a global variable and also if u need to access this variablein another fla. other vise just decalare a variable without var. try this in case if problem is not solved send me the file and i will correct it for you.

  4. #4
    Senior Member
    Join Date
    Mar 2003
    Posts
    316
    yeah but _global has nothing to do with the function not being called because if I put the same code on the end frame of each section it works ...

    it just doesn't work if I put code in a function on the empty timeline and then call it on the end frame of each section ...

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