Draw method stop at first frame

I need to make an animated flower movie using tile of one bitmap. I use the code below but write only the first frame then stop, how can I draw more frames?
createEmptyMovieClip("triangle",2);
triangle.beginFill(0x000000,100);
triangle.moveTo(width_map/2,height_map/2);
triangle.lineTo(width_map/2+(height_map*Math.tan(angle)/2),0);
triangle.lineTo(width_map/2,0);
triangle.endFill();
triangle._visible = false;
attachMovie(elm_link,"elm",1);
elm.setMask(triangle);
sl_bmp = new flash.display.BitmapData(height_map*Math.tan(angle), height_map/2, true, 0x00000000);
angl = 0;
for (i=1; i<=slices; i++) {
     createEmptyMovieClip('elm'+i,10+i);
     this['elm'+i].createEmptyMovieClip('elm',0);
     this['elm'+i].elm.attachBitmap(sl_bmp,0,"always",true);
     this['elm'+i].elm._x = -height_map*Math.tan(angle)/2;
     this['elm'+i].elm._y = 2-(height_map/2);
     this['elm'+i]._x = width_map/2;
     this['elm'+i]._y = height_map/2;
     if (angl>0) {
          this['elm'+i]._rotation = angl;
     angl += 360/slices;
function onEnterFrame() {
     elm._rotation += rotspeed;
     elm._x += transpeed;
     elm._y += transpeed;
     var tmp_bmp = new flash.display.BitmapData(height_map*Math.tan(angle)/2, height_map/2, true, 0x00000000);
     tmp_bmp.draw(elm,new flash.geom.Matrix(1, 0, 0, 1, -(width_map/2), 0),null,"normal",null,true);
     sl_bmp.draw(tmp_bmp,new flash.geom.Matrix(-1, 0, 0, 1, tmp_bmp.width, 0),null,"normal",null,true);
     sl_bmp.draw(tmp_bmp,new flash.geom.Matrix(1, 0, 0, 1, tmp_bmp.width, 0),null,"normal",null,true);

Your line code working, was not visible in the area Working with transparency too.
function onEnterFrame() {
     elm._rotation += rotspeed;
     elm._x += transx;
     elm._y += transy;
     var tmp_bmp = new flash.display.BitmapData(height_map*Math.tan(angle), height_map, true, 0x00000000);
     tmp_bmp.draw(elm,elm.transform.matrix,null,"normal",null,true);
     sl_bmp = new flash.display.BitmapData(height_map*Math.tan(angle)*2, height_map, true, 0x00000000);
     sl_bmp.draw(tmp_bmp,new flash.geom.Matrix(-1, 0, 0, 1, tmp_bmp.width, 0),null,"normal",null,true);
     sl_bmp.draw(tmp_bmp,new flash.geom.Matrix(1, 0, 0, 1, tmp_bmp.width, 0),null,"normal",null,true);
     angl = 0;
     for (i=1; i<=slices; i++) {
          createEmptyMovieClip('elm'+i,10+i);
          this['elm'+i].createEmptyMovieClip('elm',0);
          this['elm'+i].elm.attachBitmap(sl_bmp,0,"always",true);
          this['elm'+i].elm._x = height_map*Math.tan(angle);
          this['elm'+i].elm._y = height_map;
          this['elm'+i]._x = width_map/2;
          this['elm'+i]._y = height_map/2;
          if (angl>0) {
               this['elm'+i]._rotation = angl;
          angl += 360/slices;
Now I have another little problem, the tiles don't meet exactly in the center.

Similar Messages

  • Error 1180 : undefined method stop and gotoAndStop

    Error 1180 : undefined method stop and gotoAndStop
    i don't know why
    Here ,, it's my code is file [.as] and i use as3
    package {
              import flash.display.*;
              import flash.events.*;
              import flash.text.*;
              import flash.utils.Timer;
              import flash.media.Sound;
        import flash.media.SoundChannel;
              import flash.net.URLRequest;
              public class MemoryGame extends Sprite {
                        static const numLights:uint = 5;
                        private var lights:Array; // list of light objects
                        private var playOrder:Array; // growing sequence
                        private var repeatOrder:Array;
                        // timers
                        private var lightTimer:Timer;
                        private var offTimer:Timer;
                        var gameMode:String; // play or replay
                        var currentSelection:MovieClip = null;
                        var soundList:Array = new Array(); // hold sounds
                        public function MemoryGame() {
                                  //soundBG.load(new URLRequest("soundBG.mp3"));
                                  //soundBG.addEventListener(Event.COMPLETE,loadSoungBgComplete);
                                  stop();
                                  StartBtn.addEventListener(MouseEvent.CLICK, clickStart);
                                  function clickStart(e:MouseEvent){
                                            gotoAndStop("startPage");
                                  // load the sounds
                                  soundList = new Array();
                                  for(var i:uint=1;i<=5;i++) {
                                            var thisSound:Sound = new Sound();
                                            var req:URLRequest = new URLRequest("note"+i+".mp3");
                                            thisSound.load(req);
                                            soundList.push(thisSound);
                                  // make lights
                                  lights = new Array();
                                  for(i=0;i<numLights;i++) {
                                            var thisLight:Light = new Light();
                                            thisLight.lightColors.gotoAndStop(i+1); // show proper frame
                                            thisLight.x = i*90+100; // position
                                            thisLight.y = 175;
                                            thisLight.lightNum = i; // remember light number
                                            lights.push(thisLight); // add to array of lights
                                            addChild(thisLight); // add to screen
                                            thisLight.addEventListener(MouseEvent.CLICK,clickLight); // listen for clicks
                                            thisLight.buttonMode = true;
                                  // reset sequence, do first turn
                                  playOrder = new Array();
                                  gameMode = "play";
                                  nextTurn();
                        // add one to the sequence and start
                        public function nextTurn() {
                                  // add new light to sequence
                                  var r:uint = Math.floor(Math.random()*numLights);
                                  playOrder.push(r);
                                  // show text
                                  textMessage.text = "Watch and Listen.";
                                  textScore.text = "Sequence Length: "+playOrder.length;
                                  // set up timers to show sequence
                                  lightTimer = new Timer(1000,playOrder.length+1);
                                  lightTimer.addEventListener(TimerEvent.TIMER,lightSequence);
                                  // start timer
                                  lightTimer.start();
                        // play next in sequence
                        public function lightSequence(event:TimerEvent) {
                                  // where are we in the sequence
                                  var playStep:uint = event.currentTarget.currentCount-1;
                                  if (playStep < playOrder.length) { // not last time
                                            lightOn(playOrder[playStep]);
                                  } else { // sequence over
                                            startPlayerRepeat();
                        // start player repetion
                        public function startPlayerRepeat() {
                                  currentSelection = null;
                                  textMessage.text = "Repeat.";
                                  gameMode = "replay";
                                  repeatOrder = playOrder.concat();
                        // turn on light and set timer to turn it off
                        public function lightOn(newLight) {
                                  soundList[newLight].play(); // play sound
                                  currentSelection = lights[newLight];
                                  currentSelection.gotoAndStop(2); // turn on light
                                  offTimer = new Timer(500,1); // remember to turn it off
                                  offTimer.addEventListener(TimerEvent.TIMER_COMPLETE,lightOff);
                                  offTimer.start();
                        // turn off light if it is still on
                        public function lightOff(event:TimerEvent) {
                                  if (currentSelection != null) {
                                            currentSelection.gotoAndStop(1);
                                            currentSelection = null;
                                            offTimer.stop();
                        // receive mouse clicks on lights
                        public function clickLight(event:MouseEvent) {
                                  // prevent mouse clicks while showing sequence
                                  if (gameMode != "replay") return;
                                  // turn off light if it hasn't gone off by itself
                                  lightOff(null);
                                  // correct match
                                  if (event.currentTarget.lightNum == repeatOrder.shift()) {
                                            lightOn(event.currentTarget.lightNum);
                                            // check to see if sequence is over
                                            if (repeatOrder.length == 0) {
                                                      nextTurn();
                                  // got it wrong
                                  } else {
                                            textMessage.text = "Game Over!";
                                            gameMode = "gameover";
    and i don't push any code
    at fla file
    why i got that help me plss
    that is my homework and i must send it today TT

    can you write how to use ?
    i write
    "import the flash.display.MovieClip; "
    still error ahhh
    i try to change extends MovieClip instead Spirt
    and not error stop(); and gotoAndStop Already
    but
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at MemoryGame/nextTurn()
              at MemoryGame/clickStart()
    i got thissssssss TT
    import flash.display.Sprite;
    import flash.events.*;
    import flash.text.*;
    import flash.utils.Timer;
    import flash.media.Sound;
    import flash.media.SoundChannel;
    import flash.net.URLRequest;
    import flash.display.MovieClip;
    that i import

  • Video set to stop on last frame appears lighter than last frame

    I've got a video set to "stop on the last frame" using the technique described here:
    http://digitalpublishing.tumblr.com/post/6141054971/how-to-make-a-video-stop-at-the-last-f rame-here
    Works great. But whenever I do this, there is a slight darkening when the multi-state object appears at the end. To create the image for the multi-state objects, I opened the video in Photoshop, grabbed the last frame, and saved it as a JPEG.
    Anyone have any ideas? I've tried saving the end image as a PNG, lots of other workarounds, but the problem persists. I've noticed this in other publications I've downloaded also, so I think the problem is widespread.

    great to see this trick evolve in a first-frame-lasf-frame-method, wich I
    thought about,too lately.
    Will post an update in my article next time ii get the chance.
    —Johannes
    (mobil gesendet)
    Am 27.09.2011 15:33 schrieb "KeithGilbert" <[email protected]>:
    KeithGilbert http://forums.adobe.com/people/KeithGilbert created the
    discussion
    "Re: Video set to stop on last frame appears lighter than last frame"
    To view the discussion, visit:
    http://forums.adobe.com/message/3940255#3940255

  • How do I loop back from the first frame to the last frame?

    Hi there,
    I'm currently working on the framework for a product viewer.
    I have:
    a movie clip called 'viewer_mc' which contains the images take from different angles of the product. The actionscript generates a script on the last frame of this that returns it to frame 1.
    a button instance called 'autoplay_btn' which plays through the movie clip from whatever the current frame is, and stops on frame 1.
    a left and right button which serve to move the movie clip frame, to give the appearance that the product is rotating.
    I have succeeded in getting it to:
    have the movie clip play through once, return to frame 1 and stop.
    have the buttons return functions when held down, that move the frame in the movie clip using nextFrame and prevFrame commands. The right button successfully loops round to frame 1 and continues functioning to give the appearance of continual rotation.
    The last problem I am experiencing is getting the left button to act in the corresponding manner, going from the first frame to the last and continuing to function.
    Here is my actionscript so far:
    import flash.events.MouseEvent;
    var lastFrame:Number = viewer_mc.totalFrames;
    var thisFrame:Number = viewer_mc.currentFrame;
    var backFrame:Number = viewer_mc.currentFrame-1;
    1. This is the part that gets it to play through once before returning to the first frame. I think perhaps the problem I am experiencing is because of the 'viewer_mc.addFrameScript(lastFrame-1, toStart)' part i.e. although I'm holding the left button, its returning to this script and therefor getting bounced back immediately to the first frame. However, there is no flicker on the screen which you might expect if this were the case
    Note - as this is a generic product viewer which I can use as a template I am using lastFrame etc. as opposed to typing the value in
    function toStart (){
              viewer_mc.gotoAndStop(1);
    viewer_mc.addFrameScript(lastFrame-1, toStart);
    2. This is the functionality for the autoplay_btn that will play through a rotation / return the viewer to the initial (frontal) view of the product (frame 1).
    autoplay_btn.addEventListener(MouseEvent.MOUSE_DOWN, autoplay);
    function autoplay (ev:MouseEvent):void{
              var startFrame:Number = viewer_mc.currentFrame;
              viewer_mc.gotoAndPlay(startFrame);
    3. This is the functionality of the right button, which when held, moves the movie clip to the next frame via the 'rotateRight' function based on the 'nextFrame' command. It loops back round to the first frame due to the 'viewer_mc.addFrameScript(lastFrame-1, toStart)' script generated on the last frame of the movie clip, as is desired.
    right_btn.addEventListener(MouseEvent.MOUSE_DOWN, rightDown);
    function rightDown(e:Event){
        stage.addEventListener(MouseEvent.MOUSE_UP,stoprightDown); //listen for mouse up on the stage, in case the finger/mouse moved off of the button accidentally when they release.
        addEventListener(Event.ENTER_FRAME,rotateRight); //while the mouse is down, run the tick function once every frame as per the project frame rate
    function stoprightDown(e:Event):void {
        removeEventListener(Event.ENTER_FRAME,rotateRight);  //stop running the tick function every frame now that the mouse is up
        stage.removeEventListener(MouseEvent.MOUSE_UP,stoprightDown); //remove the listener for mouse up
    function rotateRight(e:Event):void {
        viewer_mc.nextFrame();
    4. This is the functionality of the left button, which when held, moves the movie clip to the prev frame via the 'rotateRight' function based on the 'prevFrame' command. And this is where the problem lies, as although it works for getting the movieclip back to frame 1, it does not loop round to the last frame and continue functioning, as is wanted.
    left_btn.addEventListener(MouseEvent.MOUSE_DOWN, leftDown);
    function leftDown(e:Event){
        stage.addEventListener(MouseEvent.MOUSE_UP,stopleftDown); //listen for mouse up on the stage, in case the finger/mouse moved off of the button accidentally when they release.
        addEventListener(Event.ENTER_FRAME,rotateLeft); //while the mouse is down, run the tick function once every frame as per the project frame rate
    function stopleftDown(e:Event):void {
        removeEventListener(Event.ENTER_FRAME,rotateLeft);  //stop running the tick function every frame now that the mouse is up
        stage.removeEventListener(MouseEvent.MOUSE_UP,stopleftDown); //remove the listener for mouse up
    I'd imagine it is probably my logic for this part that is really letting me down - I can do a similar function in actionscript 2, but am trying to learn actionscript 3 just to move with the times as it were, and struggling a bit. Still this is only a few days in!
    function rotateLeft(e:Event):void{
              if(thisFrame==1){
                        gotoAndStop(viewer_mc.totalFrames-1);
              } else{
              viewer_mc.prevFrame();
    Any help you can give me would be gratefully received. For an example of the effect I am trying to achieve with the autoplay button etc. I recommend:
    http://www.fender.com/basses/precision-bass/american-standard-precision-bass

    Thanks for getting back to me.
    Here's the code without my comments / explanations:
    import flash.events.MouseEvent;
    import flash.events.Event;
    var lastFrame:Number = viewer_mc.totalFrames;
    var thisFrame:Number = viewer_mc.currentFrame;
    var backFrame:Number = viewer_mc.currentFrame-1;
    function toStart (){
              viewer_mc.gotoAndStop(1);
    viewer_mc.addFrameScript(lastFrame-1, toStart);
    //last image of viewer_mc = first image of viewer_mc
    autoplay_btn.addEventListener(MouseEvent.MOUSE_DOWN, autoplay);
    function autoplay (ev:MouseEvent):void{
              var startFrame:Number = viewer_mc.currentFrame;
              viewer_mc.gotoAndPlay(startFrame);
    right_btn.addEventListener(MouseEvent.MOUSE_DOWN, rightDown);
    function rightDown(e:Event){
        stage.addEventListener(MouseEvent.MOUSE_UP,stoprightDown); //listen for mouse up on the stage, in case the finger/mouse moved off of the button accidentally when they release.
        addEventListener(Event.ENTER_FRAME,rotateRight); //while the mouse is down, run the tick function once every frame as per the project frame rate
    function stoprightDown(e:Event):void {
        removeEventListener(Event.ENTER_FRAME,rotateRight);  //stop running the tick function every frame now that the mouse is up
        stage.removeEventListener(MouseEvent.MOUSE_UP,stoprightDown); //remove the listener for mouse up
    function rotateRight(e:Event):void {
        viewer_mc.nextFrame();
    left_btn.addEventListener(MouseEvent.MOUSE_DOWN, leftDown);
    function leftDown(e:Event){
        stage.addEventListener(MouseEvent.MOUSE_UP,stopleftDown); //listen for mouse up on the stage, in case the finger/mouse moved off of the button accidentally when they release.
        addEventListener(Event.ENTER_FRAME,rotateLeft);//while the mouse is down, run the tick function once every frame as per the project frame rate
    function stopleftDown(e:Event):void {
        removeEventListener(Event.ENTER_FRAME,rotateLeft);  //stop running the tick function every frame now that the mouse is up
        stage.removeEventListener(MouseEvent.MOUSE_UP,stopleftDown); //remove the listener for mouse up
    function rotateLeft(e:Event):void{
              viewer_mc.prevFrame();
    The definition of the rotateLeft function is where the problem lies I think - I've taken out my poor attempts at doing the logic from the previous post. If I were to write it out long-hand the statement I want to write is: 'If you get to frame 1 and function rotateLeft is called go to the end of the movie clip'.
    The reason I have to use the viewer_mc.totalFrames-1 definition in the addFrameScript call is the addFrameScript function is 0 based i.e. if you want to call frame 1 of the movieclip you have to return a value of 0 in the addFrameScript (or such is my understanding of it anyway). As such, the last image in the movie clip will need to be the view obtained at 360 degree rotation, which is of course the same view as at 0 degree rotation. As a consequence, the last frame in the movie clip is superfluous for the user, but necessary for the overall effect to be achieved. And, in addition, to keep up the effect of a 360 degree view when the rotateLeft function is called it needs to skip that last frame to go to the lastFrame-1 (or totalframes-1), or in other words, the view of the image prior to completing the full 360 rotation.
    the variables thisFrame and lastFrame are defined at the very top of the script. Like you said they might need to be defined or called on again elsewhere.

  • BitmapData draw method doesn't work when the project is published as the .swf file of the web applic

    Hi,
            I am totally confused by this strange error. When I tried using the draw method of BitmapData to draw a movieclip symbol of my project, it seems to work fine locally. However, as I uploaded the published .swf file to my web server and launched it as the plugin of my web application, it failed. The source codes as follows,
    function printscreenClicked():void
         //ExternalInterface.call calls a javascript function to print message1
        var bd:BitmapData = new BitmapData(stage.width,stage.height);
        //ExternalInterface.call calls a javascript function to print message2
      bd.draw(stage);
        //ExternalInterface.call calls a javascript function to print message3
    message3 didn't show at all. Instead, the browser console shows "Uncaught Error: Error calling method on NPObject.". My understanding of this error message is that the .swf is calling something crashing, and I believe that bd.draw(stage)is the crashng method call.
    Also, here is my html embed tag:
        <embed src="/tests/videoplayer.swf" id="flash" quality="high" height="510" width="990" scale="exactfit" name="squambido" align="middle" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" style="margin: 0px auto;clear:both;position:relative;"/>
    Can someone help me?

    Thank you for your reply.
    I tried stageWidth and stageHeight, but it still doesn't work.
    The draw() methid is triggered when I clicked a screenshot button in my application as follows,
    ExternalInterface.addCallback("printscreenClicked", printscreenClicked);
    function printscreenClicked():void
         //ExternalInterface.call calls a javascript function to print message1
        var bd:BitmapData = new BitmapData(stage.width,stage.height);
        //ExternalInterface.call calls a javascript function to print message2
      bd.draw(stage);
        //ExternalInterface.call calls a javascript function to print message3
    Would you please give me an example of "waiting for Event.RESIZE is good, or just at least Event.ENTER_FRAME"?
    My real purpose in this application is to capture a snapshot of a streaming video. The video is contained in a movieclip object. I tried stage first since BirmapData.draw() doesn't work when drawing the movieclip on the web site. Do you have any suggestion for this situation? Also, is there any good method to find out what happened if the browser have "Uncaught Error: Error calling method on NPObject."?

  • How to stop  after first loop operation  over?

    Hi friends.
    How to stop  after first loop operation  over?
    I have a loop operation in module pool program.
    After first loop over I want to stop.
    I used the STOP keyword, but it is going to dump.
    Thanking you.
    Regards,
    Subash

    Hey,
    The statement STOP is forbidden in methods and, since release 6.10, leads to an uncatchable expection during the processing of screens called with CALL SCREEN...
    As they said above, use a EXIT statement to fix this DUMP...
    Regards,
    Diogo Carvalho

  • Get first frame of an flv video into a jpg image

    I am creating an app with flex for recording a video and i want to capture the first image of the video recorded, by now i use the following function in order to capture the
    first image but its rather slow
    private function capture():void
                                            var bitmapData:BitmapData = new BitmapData(videoDisplay.width, videoDisplay.height);
                                            bitmapData.draw(videoDisplay);
                                            var jpg:JPEGEncoder = new JPEGEncoder();
                                            var ba:ByteArray           = jpg.encode(bitmapData);
                                            var base64_enc: Base64Encoder = new Base64Encoder();
                                            base64_enc.encodeBytes(ba,0,ba.length);
                                            imgEncoded = base64_enc.toString();
    and i would like to get the first frame of the recorded video as a thumb after it is recorded
    is there any idea on how to achieve that?
    Thanks in advance!

    Define slow. What you're doing is pretty basic. Converting a display object into a bitmapdata so you can jpeg encode it. The copy to the bitmap will be lightning quick. The encode to JPEG is probably the slowest part of the process and on any modern cpu that will be a fraction of a second. Then the base64encode might take about the same amount of time. How is that slow?

  • Rotoscoping - it only roto's the first frame

    What I have done:
    Created a video clip with my Canon GL2 featuring a person against a bright background.
    I then used Adobe Premier CS5 to create an AVI of the sequence. (called it ROTO4.avi)
    I then opened CS5 After Effects, imported the clip into the composition timeline.
    I then changed the framerate of the composition to 59.94 (cause a previous attempt told me to do so).
    I then went under LAYER and Open New Layer.
    I then clicked the TOP rotobrush icon (can't find another one anywhere) and began outlining my subject and de-outlining the background. I have a perfect pink line around my subject (on frame1).
    I then drag the timeline bar and it creates the (mask?) on the first frame only and no subsequent frames.
    I switch to composition view and sure enough the first frame is beautiful (subject complete, background now a black screen), but no other frames are generated rotoscooped.
    Arghhh, I've been at this for about an hour and only first frame is ROTO'd.
    Help?
    Montie

    Montie - this is the line that I have the most suspicion about:
    I then drag the timeline bar.
    What exactly are you dragging?
    The recommended way to engage Rotobrush at this point is to press Page Down to move forward a frame, or press the spacebar to begin preview, not to jump to the end of your footage. Rotobrush only analyzes frames under the playhead, and only frames that are inside a span of time near the base frame you drew the strokes on. So if you move the playhead beyond the span it won't have any frames to analyze.
    This is what a Rotobrush span looks like. The span is the gray area with < and > arrows, the base frame is the yellow mark, and the analyzed frames are the green marks extending from the base frame mark.
    Read here about base frames and spans.
    To me it sounds like you are expecting Rotobrush to do all the work magically when you go to the end of your footage, and that's not the case. It needs to analyze each frame, and you need to keep an eye on the analysis because Rotobrush isn't actually magic, it's just some very cool math.
    Note the part in that document about the default span length: 20 frames forward and 20 frames backward. The reason for the short length is because the farther you get from a base frame the larger the probability for inaccuracies. As you move forward through each frame, check for inaccuracies and draw new strokes as necessary. Each time you draw a stroke, a new base frame is created and the span is extended. If you happen to have a sequence of 20 frames that don't need corrections, you can extend the length of the span and continue. (You could extend the span to the entire length of your clip, but you still need to pay attention to the analysis and make corrections.)
    I hope that helps.
    -=TimK

  • How to succsefully insert a "stop on this frame" code in ActionScript 3

    I am attempting to modify an FLV video file to have it stop looping. I  launched FlashPro in Action Script 3, imported the file to be modified,  applied the "stop on this frame" code on the last frame, but it still  loops or goes back to the first frame. Perhaps I am using the wrong  approach. Any help/suggestion would be greatly appreciated.
    Thanks,
    Stephen

    Ok,.. it keeps crashing while debugging. I could not move the curser to the last frame (5,255 or so) so I selected a frame in the range I could see under the movie (frame 625) and made it a key frame, them edited it with the stop(); command. then I ran the debug to see if it stops at the designated frame.
    It keeps crashing while trying to debug. Incidentally, if I do -nothing- after importing the movie and just "test movie", it stops on the last frame and shows that last frame. The reason I am doing this is because web browsers apparently default to "loop" unless the user viewing the website intentionally deselects "loop" to cause it to stop looping. I was told that flash would be a solution. I believe it likely is/will be, but it may be unreasonable to assume that could do it that easily having little knowledge of the flash program. I plan to learn how to really use it (read the docs, go through tutorials, etc., but I needed a "quick fix" for something that is already uploaded to a website and only needs to have the "loop" feature disabled or forced to stop via flash code etc. This was thoroughly explained before optioning the $1,500.00 package (I needed to upgrade all my cs3 anyway) - I'll try again tomorrow after reinstalling in case that is the problem.
    Thanks again for your much appreciated help.
    Stephen

  • Large First Frame???

    This is my first post so first of all, hi all...
    I am currently having a bit of a nightmare trying to optimize
    a flash file for use on the web. My first frame is currently about
    600kb in size even though the only thing on the timeline is the
    preloader, which is no where near this size.
    I have been using the attachmovie method A LOT, but have
    unchecked the export in first frame option for all movieclips that
    are attached in this way, and placed them on the stage in a later
    frame.(the correct way to get around this problem I believe?)
    I know importing classes is taking up about 100Kb of the
    first frame(because when i change the options in the publish
    settings to import them in frame 2 the size dips) but have no idea
    where the rest of this data is coming from, because it is not on
    the timeline. I can only assume that flash is importing something
    here, but I have no idea what it is.
    If anyone has any idea of why this is happening or has come
    across this problem before I would be so greatful because I feel
    like I have hit a brick wall.
    Thanks in advance,
    Ian

    I have used a combo box and button components but have
    definitely unchecked the export in first frame option.
    There is also a video play back in there but the linkage
    property is grayed out. Any way as far as I am aware this is not
    stirctly a component and even so would not be a couple of hundred
    kb right?
    Its very strange, I did think it may have something to do
    with the audio I am using but this is imported from an external
    source using the loadSound method on frame 3. Its getting to the
    point where I have totally run out of ideas, so thanks for any
    suggestions even if they just get me thinking along a different
    line.

  • First frame 51kb if FLVPlayback on frame 2

    How to reproduce:
    Create a new AS3 fla and place an FLVPlayback Component on
    frame 2.
    In the library uncheck export in first frame.
    In the publish settings set the classes to export in frame 2.
    Ctrl+Enter and view the bandwidth profiler to see that 51kb
    are in the first frame.
    Is this avoidable? If so how? If not why?
    Thank you

    Ok...not working for me - prob. b/c I'm missing something again.
    What I did was...
    1)  Renamed the instace of replay button = "replay_btn".
    [not sure if that's correct...guessed b/c you reference it in the code]
    2)  I placed this in the action code on action layer on last keyframe =
    var loopNum:Number;
    loopNum++;
    if(loopNum%3==0){
    stop();
    your_replay_btn._visible=true;
    } else {
    your_replay_btn._visible=false;
    3) I placed this in action code on the replay layer on last keyframe =
    your_replay_btn.onRelease=function(){
    this.gotoAndPlay(1);
    What happens is the replay button still flashes at the end of each loop and the loops just continue...it doesn't stop at 3.
    I also get this error =
    Can you break down what I'm doing wrong and how to fix...need to get this out asap.
    I truly appreciate your help and time so far on this...big thanks kglad!

  • Export for actionscript - Not in first frame

    Just a simple question.
    Don't need to know if it works or not I have tested it. What
    I want is to understand. Here it is:
    If I use the Export for actionscript and I unselect the
    Export in first frame, the item that will be linked by the ID in
    the library must appear on the timeline. Normally it must be on a
    frame that has played. IE frame 3 the item is there so I can use it
    from the frame 3 to the last frame. This is how it works for the
    _root. If I'm in a clip, the code can be on the first frame with a
    stop. That means that the Item is on the second frame and has not
    displayed, but it is accessible by the code.
    Why?
    Why on the root the item must appear on the frame where the
    code is or before the code, but if in a clip, the code can works
    even the item reside on a later frame that will never display
    because there is a stop on the first one?
    Tanx for your help to understand!

    I think that this is probably because of how flash streams
    content. In order for flash to play frame 2 on the timeline, it
    COMPLETELY loads all the code and assets for that frame (but not
    frame 3) and then 'plays' that frame. Therefore on the main
    timeline, code on frame 2 can't access exported clips from frame 3.
    However, if your movie clip is (for example) on frame 4,
    flash will stream/load everything (including your complete move
    clip) when the play head reaches that frame, so all assets within
    that frame are available because in order to even 'play' frame 4,
    flash has had to load the entire movie clip contents.

  • AddChild + "export in first frame" unchecked

    Hi all,
    i've got this problem that i can't figured out. i've tried
    google and adobe website, but no luck. i guess the people here
    could help me
    this is about addchild and export in first frame. i wanna
    call an object from my library. in its linkage option i:
    1. name it "rectangle"
    2. give a class name "Rect"
    3. have a base class "flash.display.MovieClip"
    4. check "export for Actionscript"
    5. unchecked "import in first frame"
    no problem this far.
    but when i tried to call it in main timeline with this
    script:
    var a:Rect = new Rect();
    addChild(a);
    i got this error:
    1046: Type was not found or was not a compile-time constant:
    Rect.
    1180: Call to a possibly undefined method Rect.
    why is that?
    isn't flash automatically generate the class for me?
    (a definition of this class could not be found in the
    classpath, so one will be automatically generated in the SWF file
    upon export.)
    can anyone help with my problem...

    because you haven't done anything to export your class.
    if you're not going to let flash take care of exporting your
    class in the first frame, you have to do something to export it
    later. and you're not and flash won't do that automatically
    becauese it doesn't know what you want to do.

  • *Flash animation looping but going back to first frame {want to hold on last frame}

    I came across this article on looping animations = http://www.quip.net/blog/2006/flash/how-to-loop-three-times
    I'm a novice with flash and just trying to plug thru to get some ads up and running for the first time.
    Everything worked for me in the article...the one thing I wanted to do but haven't found an answer to is how to stop the animation on the last frame after looping is complete, instead of automatically going back to the first frame??
    What's the easiest/most effective way to do this?
    The stop script does not work...still goes back to first frame.
    For all my flash ads, I've imported an FLV video...so don't know if it's some function for flv's/video's that auto-rewinds to first frame...
    Thanks so much, really appreciate any insight on this.
    The sooner you can catch a minute to get back the better

    Ok...not working for me - prob. b/c I'm missing something again.
    What I did was...
    1)  Renamed the instace of replay button = "replay_btn".
    [not sure if that's correct...guessed b/c you reference it in the code]
    2)  I placed this in the action code on action layer on last keyframe =
    var loopNum:Number;
    loopNum++;
    if(loopNum%3==0){
    stop();
    your_replay_btn._visible=true;
    } else {
    your_replay_btn._visible=false;
    3) I placed this in action code on the replay layer on last keyframe =
    your_replay_btn.onRelease=function(){
    this.gotoAndPlay(1);
    What happens is the replay button still flashes at the end of each loop and the loops just continue...it doesn't stop at 3.
    I also get this error =
    Can you break down what I'm doing wrong and how to fix...need to get this out asap.
    I truly appreciate your help and time so far on this...big thanks kglad!

  • "DV Start/Stop" is 1 frame off!

    how come when I capture down conv dv anamorphic from my xha1 and do the "dv start/stop"....the first frame of all of the markers is from the previous clip?
    system info: FCP 5.1.4
    Canon XHA1
    OS 10.4.10
    Thanks!

    I don't do HDV but maybe since
    the MPEG TS consists of one whole frame every 15 GOP and since the whole frame (I frame) determines the frame lenght and content, when you capture the camera automatically resets its own in and out points!
    This is just a thought!
    gig

Maybe you are looking for