A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: SWF Problem

  1. #1
    Senior Member
    Join Date
    Mar 2006
    Posts
    191

    SWF Problem

    Hi,

    I have some problems with an imported swf file!
    There are 3 key-Frames!
    Key Frame "2" (imported swf) should start immediately the "complete swf file"!

    If I use editFrame... (PlayMovie) it does not start!

    How can I start key Frame 2 immediately and play the complete video, and then: wait till I push the button to get Keyframe 3?


    Thanks Uwe
    Last edited by Uwe S.; 08-22-2006 at 01:40 PM.

  2. #2
    Thick as a Brick bobgodwin's Avatar
    Join Date
    Sep 2003
    Location
    Metro Detroit
    Posts
    217
    Where (In Frame 2) are you loading the imported .swf?

    Are you loading it into an empty movie clip?

    If you are, put this in Frame 2:

    moveClipName.loadMovie("filemame.swf") ;
    stop();
    Bob Godwin

  3. #3
    Senior Member
    Join Date
    Mar 2006
    Posts
    191
    Hi,

    thank you for your advice!

    moveClipName.loadMovie("swf1.swf") ;
    stop();

    I see frame 2 but I have to click to start the video!
    How can it starts without a click!

    ...I tried playMovie...start()...but it doesn't work!
    Is there a possiblility when the frame 2 is loaded The video starts automatically. If I want to go to frame 3 then I must click the button!

    ...uff

    thanks a lot
    Uwe

  4. #4
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890
    Obviously you don't own the source file of the "loaded movieclip" (because you can't remove that stop(); action from keyframe 2).
    But it's not my business ... ...
    Set this script in the main timeline:
    Code:
    mc1.loadMovie("swf1.swf") ;
    _root.onEnterFrame = function(){
    	if(mc1._currentframe == 2){
    		mc1.gotoAndPlay(3);
    	}
    }
    stop();
    cheers

  5. #5
    Senior Member
    Join Date
    Mar 2006
    Posts
    191
    Hi
    still problems...
    I will try to explain the steps:

    1. KeyFrame 1 some text....after 10 Sec
    2. KeyFrame 2 (I imported a file swf - name of the file is adress.swf) I see the frame
    3. keyFrame 3 some Text

    The Problem:

    after 10 sec. Keyframe 1 - key Frame 2 starts (I can see the video swf1) but it doesn't start automatically.
    I tried your code in the Score timeline (Frame2 actionscript) but nothing happens.

    Thank you very much for helping me...
    I tried so many things (simply frame 2 the video should start)

  6. #6
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890
    In your previous post you said something else:
    Is there a possiblility when the frame 2 is loaded The video starts automatically. If I want to go to frame 3 then I must click the button!

    Anyway, I need to see the structure of that video (the swf1 file).
    You may ZIP it and upload it somewhere on the net ...

  7. #7
    Senior Member
    Join Date
    Mar 2006
    Posts
    191
    Hi,

    I created a new swf file as zip
    start test.htm

    I hope we can solve the problem
    thanks so much
    Attached Files Attached Files

  8. #8
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890
    As I thought, that movie is not a simple movie ...
    It has this little piece of AS in the first keyframe:
    Code:
    this.loadMovie("ctrlbar.swf");
    stop();
    So ... use this script:
    Code:
    mc1.loadMovie("test.swf") ;
    _root.onEnterFrame = function(){
    	if(mc1._currentframe == 1){
    		mc1.gotoAndPlay(2);
    	}
    }
    stop();
    That's all.

  9. #9
    Senior Member
    Join Date
    Mar 2006
    Posts
    191
    ... no chance!

    I tried the swf file but it will not start!
    I used your code

    mc1.loadMovie("test.swf") ;
    _root.onEnterFrame = function(){
    if(mc1._currentframe == 1){
    mc1.gotoAndPlay(2);
    }
    }
    stop();

  10. #10
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890
    Come on ...
    Just put this launcher in the same folder with those 2 SWF files and ... launch it !
    Last edited by necromanthus; 08-07-2008 at 06:54 AM.

  11. #11
    Senior Member
    Join Date
    Mar 2006
    Posts
    191
    thanks ...
    but I have the version 5.5
    I can not open your fun file....

  12. #12
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890
    Quote Originally Posted by Uwe S.
    thanks ...
    but I have the version 5.5
    I can not open your fun file....
    1) The FUN file is V5.5
    2) No need to open it. All you have to do is to create an empty movieclip (called mc1) in the 2nd keyframe of your main movie and to use the above script.

  13. #13
    Senior Member
    Join Date
    Mar 2006
    Posts
    191
    Hi,

    ....uff, it is working now! God bless you!
    I did not use movie clips before.
    That means, the original swf file is not embedded?
    It must be in the original Folder?

    Thank you very much for helping me.
    Bye Uwe

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