A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 25

Thread: Help, extremely new

  1. #1
    bwalsh
    Join Date
    Mar 2009
    Posts
    19

    Help, extremely new

    I've taken a class way back when, but I'm struggling to relearn action script.
    Using: Flash 6
    Current Problem:
    When I publish my swf, it cycles between my 2 scenes non-stop. stop command doesn't affect the cycling. What should I try?

  2. #2
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    weird, can u post a fla?
    Evolve Designs Interactive Media
    the natural selection

  3. #3
    bwalsh
    Join Date
    Mar 2009
    Posts
    19
    honestly, not sure how to do that

  4. #4
    bwalsh
    Join Date
    Mar 2009
    Posts
    19
    stop();
    TradArtIndex.onRelease = function(gotoAndStop("TradArt",1)) {
    };
    this is the action in question

  5. #5
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    hmm the code you posted shouldn't be causing that.

    If you want to post a fla click the 'go advanced' link below this thread, then click 'manage attachments' which opens a new window where you can upload your fla. Once it's done just submit the post.
    Evolve Designs Interactive Media
    the natural selection

  6. #6
    bwalsh
    Join Date
    Mar 2009
    Posts
    19
    now I can't get the file down to 300kb, removing the images from the library had no effect :S

  7. #7
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    yeah that did happen sometimes using old versions of flash.. try removing the images, then saving with a different name. (unless save and compress is an option under file, but i don't think that was included in flash6)
    Evolve Designs Interactive Media
    the natural selection

  8. #8
    Senior Member
    Join Date
    Nov 2004
    Posts
    100
    I have this reaction when I have a bug in the actionscript.

    I use CS3 and do this is when I do ctrl+enter tho.
    HELP!

  9. #9
    bwalsh
    Join Date
    Mar 2009
    Posts
    19
    maybe if I describe better how its set up, a problem will appear to someone more practiced.
    I have the actions on their own separate layer, and that code on the first frame. There are no other frames on my first scene, but other layers of art and buttons...The project is really just that simple so far...any ideas? am I missing some essential code?

  10. #10
    Space Midget Wrangler
    Join Date
    Sep 2002
    Posts
    129
    Hi bclaywalsh,

    I did a little digging and the good folks at Adobe/Macromedia actually warn against using scenes. I don't know how much redo this will take, but you might want to take the content you have and separate it by keyframes on your timeline or even into separate movieclips and then place those on your timeline.

    In every shop I know scenes are avoided like the plague. They tend to be somewhat confusing and unreliable. Anyhow, here is a link to some scene information from the adobe site you may want to read though. My best advice for you would be to stick to keyframes on the timeline. Its going to save you a lot of headache.


    http://livedocs.adobe.com/flash/mx20...=00000809.html
    __________________________________________________ ___________

    Using scenes is similar to using several SWF files together to create a larger presentation. Each scene has a Timeline. When the playhead reaches the final frame of a scene, the playhead progresses to the next scene. When you publish a SWF file, the Timeline of each scene combines into a single Timeline in the SWF file. After the SWF file compiles, it behaves as if you created the FLA file using one scene. Because of this behavior, avoid using scenes for the following reasons:

    * Scenes can make documents confusing to edit, particularly in multiauthor environments. Anyone using the FLA document might have to search several scenes within a FLA file to locate code and assets. Consider loading content or using movie clips instead.
    * Scenes often result in large SWF files. Using scenes encourages you to place more content in a single FLA file and hence, larger documents to work with and larger SWF files.
    * Scenes force users to progressively download the entire SWF file, even if they do not plan or want to watch all of it. Your user progressively downloads the entire file, instead of loading the assets they actually want to see or use. If you avoid scenes, the user can control what content they download as they progress through your SWF file. This means that the user has more control over how much content they download, which is better for bandwidth management. One drawback is the requirement for managing a greater number of FLA documents.
    * Scenes combined with ActionScript might produce unexpected results. Because each scene Timeline is compressed onto a single Timeline, you might encounter errors involving your ActionScript and scenes, which typically requires extra, complicated debugging.

    There are some situations where few of these disadvantages apply, such as when you create lengthy animations, which is a good time to use scenes. If disadvantages apply to your document, consider using screens to build an animation instead of using scenes. For more information on using screens, see "Creating a new screen-based document (Flash Professional only)" in Using Flash.
    __________________________________________________ ___________


    Best Regards,

    Plasnid
    A little pain never hurt anyone

  11. #11
    bwalsh
    Join Date
    Mar 2009
    Posts
    19
    thanks for that advice, it should be easy to separate them off into linking swf files.
    ***New Question (though the cycling error has yet to be tested)
    How do I get an animation to play within one frame? I've made a movie and animated it onto its separate timeline, but how do I activate it?

  12. #12
    Space Midget Wrangler
    Join Date
    Sep 2002
    Posts
    129
    Ahh I see No worries. Chances are that you have a stop() at the start of your animation. Your animation should be a timeline inside of a movieClip on your stage. Give that movieClip a name. For the purposes of this example, lets call it mongo.

    mongo.gotoAndPlay(2);

    or you could give the first frame a label like animstop, and the frames from 2 and on a label like animstart. From that point you could use the following command.

    mongo.gotoAndPlay("animstart");


    At the end of your animation you could have a simple stop command, or even a command to got back to the beginning. For example:

    mongo.gotoAndStop("animstop");

    or

    mongo.gotoAndStop(1);

    Nice and simple
    Quote Originally Posted by bclaywalsh View Post
    thanks for that advice, it should be easy to separate them off into linking swf files.
    ***New Question (though the cycling error has yet to be tested)
    How do I get an animation to play within one frame? I've made a movie and animated it onto its separate timeline, but how do I activate it?
    A little pain never hurt anyone

  13. #13
    bwalsh
    Join Date
    Mar 2009
    Posts
    19
    ok, so I removed the whole scenes aspect, and instead am using frames.
    New Semi-Related Problem.
    I'm making a website to display 3D art, so far my page has 2 frames. 1st frame is of one 3D model, 2nd frame is of another. Both models have a front and back image, and each image has 3 frames within it (1st frame full texture, 2nd frame occlusion, 3rd frame wire). My code is this:
    stop();
    Cavalry_FullText.onRelease = function(gotoAndStop("Cavalry_Front",1)
    Cavalry_FullText.onRelease = function(gotoAndStop("Cavalry_Back",1)
    Cavalry_Occ.onRelease = function(gotoAndStop("Cavalry_Front",2)
    Cavalry_Occ.onRelease = function(gotoAndStop("Cavalry_Back",2)
    Cavalry_Wire.onRelease = function(gotoAndStop("Cavalry_Front",3)
    Cavalry_Wire.onRelease = function(gotoAndStop("Cavalry_Back",3)
    Light_FullText.onRelease = function(gotoAndStop("Light_Front",1)
    Light_FullText.onRelease = function(gotoAndStop("Light_Back",1)
    Light_Occ.onRelease = function(gotoAndStop("Light_Front",2)
    Light_Occ.onRelease = function(gotoAndStop("Light_Back",2)
    Light_Wire.onRelease = function(gotoAndStop("Light_Front",3)
    Light_Wire.onRelease = function(gotoAndStop("Light_Back",3)

    ) {
    };

    the last line got split for some reason in this post, but it is whole in the script, if that makes any difference. Whenever I publish or test my page, it does not stop flashing between frames 1 and 2. When I manually stop it, the buttons do nothing. please help

  14. #14
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    Your functions look a little strange to me. This is what you have now, just to take a single line:
    Code:
    Cavalry_FullText.onRelease = function(gotoAndStop("Cavalry_Front",1)
    and it should be more like this:
    Code:
    Cavalry_FullText.onRelease = function(){gotoAndStop("Cavalry_Front",1);}
    Any this code is still trying to find a scene named "Cavalry_Front" and frame 1. If you have three frames each with a different movieclip on them (which you don't need; you can place them all on the same frame) you don't need to specify the name of the movieclip, just the specific frame. When the header hits the designated frame, the animation on that frame (or whatever) will automatically begin running.

    Your code should be: (Assuming that Cavalry_FullText is a button and its frame is 2)
    Code:
    Cavalry_FullText.onRelease = function(){gotoAndStop(2);}
    Does that make sense?
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  15. #15
    bwalsh
    Join Date
    Mar 2009
    Posts
    19
    I'm not sure what you mean by I don't need frames of the movie clips. Heres how its structured. 2 frames on the main page. on each frame is a movie clip with 3 frames. I made it that way because I didn't want to code each instance of my buttons to sort through each of the 3 frames per movie clip...if that makes sense...at all 0_0

  16. #16
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    I was specifically talking about the buttons. All three buttons can appear on the same frame and call the prespective MC. That is all. Either way works great.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  17. #17
    bwalsh
    Join Date
    Mar 2009
    Posts
    19
    ok. Now that my scenes have been changed to separate pages, whats the actionscript I need to link them? button.onRelease what? (I feel really idiotic asking this, because I know I've done this all before)

  18. #18
    bwalsh
    Join Date
    Mar 2009
    Posts
    19
    ...I just realized that my original question is still up in the air. My .swf does not stop cycling. And yet again, I can't upload the .fla because the file size refuses to change.

  19. #19
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    Code:
    button.onRelease= function(){gotoAndPlay(2);}
    You would indicated the frame number representing the new movieclip.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  20. #20
    bwalsh
    Join Date
    Mar 2009
    Posts
    19
    These are all my actions:

    stop();
    Cavalry_FullText.onRelease= function()(gotoAndStop(1)
    Cavalry_Occ.onRelease= function()(gotoAndStop(2)
    Cavalry_Wire.onRelease= function()(gotoAndStop(3)
    Light_FullText.onRelease= function()(gotoAndStop(4)
    Light_Occ.onRelease= function()(gotoAndStop(5)
    Light_Wire.onRelease= function()(gotoAndStop(6)

    ) {
    };

    There seem to be syntax errors or unexpected ')'s no matter how many times I change it.

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