Control loop times in swf file

Hello:
I have a sprite swf its framecount is 45.
How can control for example a loop three times and after that
stop the
animation?t
What parameter do I have to test?
thank you very much

Thank you.
Can you tell me where do I put and call this behabiours?
In the frame .There isn't "go to the frame"
and in the sprite does not work.
Thanks
"Rob Dillon - Adobe Community Expert"
<[email protected]> escribi�
en el mensaje
news:[email protected]..
> You could probably test the _currentframe property of
the flash sprite
> and count how many times you see 45.
>
> Something like this might do the job:
>
> --------
> property mycounter
> property loopcount
> property totalFrames
> property thisSprite
>
> on getPropertyDescriptionList
> myPropList = [:]
> myProplist.addProp(#loopcount,[#comment:"number of times
to
>
loop:",#format:#integer,#default:3,#range:[#min:1,#max:10]])
> return myPropList
> end
>
> on beginSprite me
> thisSprite = me.spriteNum
> totalFrames = sprite(thisSprite)._totalframes
> mycounter = 0
> end
>
> on exitFrame me
> if sprite(thisSprite)._currentframe = totalFrames then
> mycounter = mycounter + 1
> end if
> if mycounter = loopcount then -- you're done
> sprite(thisSprite).stop() -- or
sprite(thisSprite).gotoAndStop(1)
> end if
> end
> ----------
>
> --
> Rob
> _______
> Rob Dillon
> Adobe Community Expert
>
http://www.ddg-designs.com
> 412-243-9119
>
>
http://www.macromedia.com/software/trial/

Similar Messages

  • Need to reference controls in an Empty swf file ?

    The current beta 2 of FABridge requires you to reference any
    Flash controls you might want to create dynamically via Javascript
    in the Empty .swf file first (the example just uses an array to
    create a reference to each control). Trouble is, if you want to
    have a generic .swf file that you use for different purposes with
    different controls, referencing all the possible controls will make
    the .swf file unnecessarily large (which affects download
    performance etc.) - can Adobe confirm whether the final release
    will still require you to reference controls in the .swf beforehand
    or can controls be referenced dynamically as they are needed ?
    Thanks

    Can you provide code on how I can create a loop?
    I'm not getting any error when calculating sum.
    Here is what I'm trying to do, lets say I have two checks:
    CHK1
    Amount:200.00
    Status: Issued
    CHK2
    Amount: 500.00
    Status: Void
    When calculatiing the tota for the checksl, I should see the total as 200 only because, the Check2 has been voided and it is considered zero.
    I tried the following ways and it did not work:
    Sum(OutboundPayment[OutboundPayment/PaymentStatus/Code=’ISSUED’]/PaymentAmount /Value)
    I tried another way and even this did not work:
    decode(PaymentStatus/Code, 'VOID', ‘0’, PaymentAmount/Value*100)
    Please help!!!!!!

  • Exporting non-looping (single frame) swf file

    I am using a third-party application to create a "page-flipping" version of a book. For quality reasons, I want to export the pages of the document as swf files. When I import the resulting swf files to the application, they flicker at the default frame rate of 24 fps. When I open the swf file in Flash Player, if I hit the "play" button, it flickers as well. If I use the "next frame" and "previous frame" commands, it's apparent that the file has two frames, one with the page content, the other with a blank (white) appearance.
    Is there a way to export the pages as *SINGLE* frame swf files?
    In desperation I've tried to export the pages as .fla files and generate the swf files from Flash, but the layouts are significantly corrupted when I open the fla files in Flash.
    FYI, I'm using InDesign CS6.

    Amy, you tease...go on, what's planned for the next release then?
    Nah, I know you won't tell.
    Michael/Sebastian,
    There are a number of workarounds that are more or less usable. You can place a print button on the page where the chart is located. A user can print to printer or to pdf if she has that functionality. The only issue there is that the whole dashboard screen prints. Depending how just how much you have on a screen that you don't want printed, you may have to reorganise the charts on to their own tabs, for example, which is what I do. I use the whole tab for the chart itself, probably leave a logo on top and bottom and then the whole page prints with my logos and the chart.
    Less elegant but always good value for money: flash image capture. I don't like that and it requires a utility clients side.
    Hope this helps.
    Chris
    Go on Amy...

  • How to create an xml to load swf files in sequence?

    hello everyone
    I'm new in web design... I know how to animate in flash, using timeline, frames, layers, twins and so on... But I want to move forward so I want to create a xml to load swf files in sequence and in loop. Each swf file has 8 seconds.You can see the example here in www.cm-seixal.pt.
    I'm not a programmer but I understand how actionscript works... I hope you can help me
    Cheers!
    Ana

    you can use the urlloader class to load your xml file.  use the loader's complete event and the loader's data property to retrieve the data in your xml file.

  • Actions not working to imported swf files in Flash Catalyst

    Hi,
    I have a problem with manipulating my imported swf files (created in Flash professional) in Flash Catalyst CS5. Whenever I add any of the swf control actions to a swf file in the timeline such as 'stop', the animation ignores it and keeps replaying. I tried to add action sequence when a certain button is pressed, and also tried to create 'On application Start' and added 'stop' so that the animation stops immediately when the application opens. No matter what I do, the animation refuses to perform the actions and simply replays. The animation is a simple shape tween between 2 states with no action script attached to it. I published the animation as an swf and exported it to Flash Catalyst. Is there any suggestions whatsoever on why this is happening? Is it something to do with setting up my flash file prior to import? The only way I figured out to stop the animation from playing is adding action script to the flash file in Flash Professional however this is not what I want because I would like the animation to be controlled by components in my flash Catalyst document.
    Thanks

    You can make you swf a custom component with 2 states.
    The first state will be empty and rename it "OFF" the second state will have your swf file and name it ON.
    Then go back to your artboard/project, add your 2 buttons ON & OFF.
    For the ON button add interaction "play transition to custom component ON"
    For the OFF button add interaction "play transition to custom component OFF"
    Here is an example swf_control

  • Creating single .swf file without border causes control bar jump

    If the goal is creating a single .swf file and the answer is
    to simply uncheck the border checkbox, there's a small problem. If
    there is a Captivate control bar -- in my case a full length
    stretched one -- it will ride up and over the Captivate movie,
    covering some of the movie. In my case the control bar is riding up
    and over several buttons referenced in the project, screwing things
    up considerably.
    How can we keep the control bar from riding up -- or more
    specifically perhaps being loaded over top of the project -- such
    that it obscures part of the project?
    Quick answers would be really fantastic!
    Thanks!

    Thanks Paul,
    That did work. I use a pretty stripped down control bar so
    adding in 27 pixles works. A cohort mentioned that Captivate 1
    required a similar work around -- though it only produced a single
    file. It'd have been nice to have known before her co-worker.
    It's too bad there's not some verbage somewhere -- maybe in
    the help -- that explains that adding a control bar to an exisiting
    project will result in the toolbar obscuring some of the project --
    how much depending on the size of the control bar.
    It'd be great to have a little checkbox that would allow the
    project to expand the exact number of needed pixels so that the
    project and control bar were nearly mated together.
    To come full circle, after I've done this and gotten the two
    together, I have to resize again -- this time down -- for my
    project.
    So after making it bigger to fit the control bar, I resize it
    again to make it smaller, make adjustments to the text -- which
    doesn't seem to scale -- and to the caption boxes that don't mate
    exactly anymore and publish. What I found is that the file size is
    now closer to the original "larger" project file.
    I find this curious, as I was finding when the control bar
    was on top of the project before learning this workaround that the
    file size for a smaller resolution project was actually turning out
    larger. That never made sense to me.
    After the workaround, it's actually close to the same size.
    Thanks for your help!

  • Embed same SWF file multiple times in Flash file

    I want to include the same SWF file multiple times in the same flash file. I have a plain box that is clear, that becomes visible when clicked. I want to create a grid of them (about 50+). If I copy the layers and actions, they interfere with each other so I want to embed multiple SWF files into one file and then save it to embed in an interactive PDF. If I save one square and embed it into the PDF multiple times, the file becomes too big to work. How can I embed interactive SWF files over and over into 1 SWF file? I don't have a ton of knowledge with Flash....

    you edit your html file to embed multiple copies of your swf.
    it's generally easier to control the layout if you use swfobject (but you can just copy the code published by flash pro) to embed the swf.

  • Problems with buttons on embedded swf files or workaround how to loop mp3s? ...

    Hello there,
    I'm new to the topic of flash and rich media in pdf files so please forgvie me if I ask a Newbie question.
    Here's the situation. I have an image slide show of ~18s and an audio file of ~3mins that I want to play as loops embedded in a pdf file.
    I tried the following:
    1) Created an swf file of the slide show with audio included, embedded in pdf -> works, but the swf file is off, since audio starts over with slide show, i.e-. after 18s. 
    2) Created an swf file of the slide show and an mp3, embedded two objects in pdf  -> Audio can be muted by button (multimedia_pause), but won't loop
    3) Created two swf files: one for the slide show, one audio only, embedded two objects in pdf -> Audio loops, but cannot be muted by button (multimedia_pause)
    So can please somebody give me a hint on how to loop the mp3 file (preferred, smaller total file size) or why the mute button action won't work on the swf-file?
    Any enlightening link is also most welcome! Thanks in advance!
    Regards
    bderfnam

    Dave -
    I know your reply was created nearly a year ago, but hoping you see it. I have the similar problem. My captivate contains audio whereby the audio is embedded on each slide, indepent of each slide within the captivate file. So, for a captivate course that has 10 slides, I'll have 10 audio files, one audio file (.mp3) on each slide.
    OK, now each slide has each audio file timed perfectly with captions that appear on each slide. So that when the audio (a narrator) says for example:
    "The user places the date and top of the page when the test failed ...and then the individual then signs at the bottom where indicated."
    There would be 2 captions - One caption for the first part of the .mp3, and one caption for the second part of the audio. (all on one .mp3 on the main timeline)
    When I press the Pause/Play button the .mp3 it just repeats itselve over and I hear the same voice running on top of each other in unison. Not sure how I can fix this where the Pause button on the control bar (the only control bar on the entire course), pauses everything on the slide.
    Do you see what I am saying?
    Any help you can provide would be greatly appreciated.
    Kevin

  • I only have the SWF file and HTML5 output, how can I control it?

    Picture this: A client gives me two zipped archives; one archive has a SWF file and another has HTML5, JS, and CSS. Both were published after checking "Scorm 1.2" in the reporting tab in Captivate. I'm just one developer and all I have at my disposal is html, javascript, and css.
    Is it possible for me for resume progress? Send quiz scores to my web service? Control playback?

    The 'built-in method' is called Self-paced Learning, and it usually has a message window that appears when you resume the lesson which asks the user whether or not they want to resume from the last visited slide.  However, as has been mentioned before on this forum, as soon as you activate LMS Reporting in Quiz Settings then Self-paced Learning is disabled. It's only designed for situations where an LMS is NOT involved.  LMSs typically have other mechanisms for resuming playback and having more than one mechanism active at the same time could result in conflicts.
    SCORM-compliant LMSs have the option of using Resume Data Bookmarking, but not all LMSs implement this in consistent ways.  The new SCORM drivers with Cp6 do a much better job of implementing bookmarking than previous versions, so I encourage anyone to upgrade to Cp6 if they haven't already done so.
    Since it sounds like you're trying to roll your own LMS I'm assuming that your Cp modules will have Quiz Reporting turned on, which means Self-paced Learning is NOT going to be an option.  You'll need to work with the SCORM Resume Data to achieve your goals.  But this is NOT an area for the faint-hearted or the non-programmer.  In SWF content, the scoring variables are passed from within the Captivate runtime to the Javascript SCORM API.  In HTML5 content this will all be JS code, however, it's going to be quite complex JS code and messing with it at all is likely to break something.  Personally, I wouldn't go that route.  If you're going to build your own LMS, make it the LMS that picks up the scoring and resume data from the Captivate output, rather than hacking the Cp code itself.

  • Can Captivate 7's playback controls control Flash swf files?

    Hi folks,
    I have created a swf file using Adobe Flash and I have imported it as an animation slide in Captivate 7. I have turned on the playback controls to just have the play button and the progress bar. When I export the presentation, the playback controls do not work. The scrubber moves as the presentation is playing, but I can't pause the presentation. When I stop the scrubber or even move it left or right, it does not affect the presentation and it just keeps playing. Am I doing something wrong? I don't want to have to create a custom nav bar in Flash as it would just be easier to use Captivate's playback bar.

    I don't think it can be expained quickly as it can be very complicated. But...
    Select New Project/Widget in Flash and choose static widget. You need to be very adept in AS3 to actually get them to work.

  • Dreamweaver CS5 wont loop .swf file???

    Hi there,
    I am having a problem where i am trying to get a swf file to loop. I read on another thread that there is a bug in dreamweaver and although it automatically selects the loop button in the property inspector it does not add the code. But when i correct the code it still doesn't work! here is the code i am using:
      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="550" height="400" id="FlashID" title="openingsequence">
        <param name="movie" value="1.swf" />
        <param name="quality" value="high" />
        <param name="wmode" value="opaque" />
        <param name="swfversion" value="6.0.65.0" />
        <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
        <param name="expressinstall" value="Scripts/expressInstall.swf" />
        <param name="LOOP" value="true" />
        <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
        <!--[if !IE]>-->
        <object type="application/x-shockwave-flash" data="1.swf" width="550" height="400">
          <!--<![endif]-->
          <param name="quality" value="high" />
          <param name="wmode" value="opaque" />
          <param name="swfversion" value="6.0.65.0" />
          <param name="expressinstall" value="Scripts/expressInstall.swf" />
          <param name="LOOP" value="true" />
          <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
          <div>
            <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
            <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
          </div>
          <!--[if !IE]>-->
        </object>
        <!--<![endif]-->
      </object>
    I have also read that it could be because the code for the .fla file has a <stop/> value at the end instead of the code to make it loop. I made the swf file from an mp4 in flash so ive never had the original .fla file. I have tried using a swf decompiler to get the fla file but it doesnt seem to have worked but this is a side issue...
    I really just want to figure out how to get dreamweaver to loop my swf file.
    Can someone please help me, ive spent all day trying to solve this!
    thanks,
    Matt

    Hi
    You wrote -
    I made the swf file from an mp4 in flash so ive never had the original
    .fla file. I have tried using a swf decompiler to get the fla file but
    it doesnt seem to have worked but this is a side issue...
    First welcome to the forum.
    Unfortunately without being able to edit the stop() function out of the fla file, your swf will not loop.
    You could use the html5 video element for your mp4 and if you have the original video file convert it to other formats for use in the html5 video, and then use the swf file as the fall back, this would allow your video to loop in those browsers that support this.
    There are also 3rd party players available that will allow the swf to loop without editing but these will only work on windows.
    PZ

  • How can I control a button from one swf file to another swf file?

    Hi,
    I have a main.swf file. From that file I am accessing the external.swf file which is an external file.
    Now, how can I write code on my main.swf file for the button which is on my external.swf file?
    Activities.MainPanel.close_btn.addEventListener(MouseEvent.CLICK, btnClickClose);
    Activities.MainPanel.close_btn (This buttons is actually on external.swf file, but I want to write code on main.swf file to execute it on external.swf) how can I control one swf button on other swf file?
    Thanks.

    Here's some example code that you should be able to adapt to your needs.
    // create a new loader object instance...
    var loader:Loader = new Loader();
    // make the download request...
    var request:URLRequest = new URLRequest("external.swf");
    // add a complete event listener to the loader
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
    // start the actual loading process...
    loader.load(request);
    // create a new empty movieClip instance, you will put the loaded movie into this movieClip once its loaded
    var externalMovie:MovieClip;
    // this function is called when the download has finished and the file is ready to use...
    function completeHandler(event:Event):void {
       // set the contents of the loaded movie to the new empty movieClip...
               externalMovie = MovieClip(event.target.content);
       // add this new movie to the display list...
       addChild(externalMovie);
    Now you can refer to the loaded movie with the instance name "externalMovie". So if, for instance, you want to address a button in the loaded movie, you could write something like this on the main timeline:
    externalMovie.addEventListener(MouseEvent.CLICK, btnClickClose);
    function btnClickClose(event:MouseEvent):void {

  • How do I add playback control to a .swf file in Director 11.5 (PLEASE HELP!)

    Hi,
    I am currently trying to add controls (play/stop/etc) to a .swf file within Director 11.5. The movie imports fine and plays perfectly, however there does seems to be built in options to add the control in the same way you would for a .mov.
    The .swf file has been created with controls and plays outside of director fine. When it is placed into director the controls disappear and leave a white space.
    Is there a step by step guide somewhere or can someone give me a step by step guide? I'm fairly new to director and won't know some of the terms etc....
    The movie is 30 mins long and requires the user to move to various points and pause the playback. I cannot change the format of the file either.
    Please let me know if you need any more info...
    PLEASE HELP, I have to complete this in 2 days.
    W

    Probably too late for your project but...
    You can do this by using 3 sprites in addition to the SWF. In this example, I've named them "videoPlay", "videoRewind, and "videoStop". The SWF in this case was named "video."
    Apply this script to each of the 3 sprites.
    property mySprite
    on beginSprite me
      mySprite = sprite(me.spriteNum)
    end
    on mouseUp me
      case mySprite.name of 
        "videoPlay":
          sprite("video").play()
        "videoStop":
          sprite("video").stop()
        "videoRewind":
          sprite("video").stop()
          sprite("video").rewind()
      end case
    end

  • How to get the content in embed swf file in Swf Loader on run time

    How to get the content in embed swf file in Swf Loader on run time
    [Bindable]
    [Embed(source="assets/index.swf")]
       private var SWFSRC:Class;
    <mx:SWFLoader id="_swfloader" source="{SWFSRC}" />

    Hi Flex harUI,
    Throw the error.
    Access of undefined property content

  • How to Put Controls on SWF File... then Export  to FLV

    Have a swf file that self plays.
    What I Need:
    I need to imbed this self playing 2 minute video clip with
    sound...but I want it to have controls on it and be paused. I want
    to use dreamweaver to place it in the web page but stupid
    dreamweaver only puts controls on a flv file NOT SWF's.
    How can I get a swf file, then add controls, then output to
    FLV so Dreamwemaver can put it on my page.
    I have Adobe Dreamweaver CS4, Flash CS$ but DO NOT KNOW HOW
    TO USE IT - Tried but failed miserably (it didnt even want to put
    controls easily on this...I tried for 30 min but couldnt break
    through. I have the CS3 Master Collection.
    Thanks
    All I want is for this video to play universally and nicely
    in a web page of mine...when will this stuff ever be compatable and
    transparent to use!
    Suzzie

    For me, not. But yes I have to do this. Maybe I manual have a table which includes the y axis coordinates. X axis is dicrete then when I get the value 2 I will look at its y axis and take the coordinates of the y-axis corresponds to the table
    Is it difficult? 
    Yasemin Barutçu
    Electrical And Electronics Engineer

Maybe you are looking for

  • Lost ability to download PDF documents with upgrade to 4.0

    Before upgrading to 4.0 could go to a website and click on a document, then pick a specific page to download to Adobe Reader 8 and get a clean PDF document. After upgrading could go to the same site, download a document and the site would show that i

  • 1st April 2012 problem

    When I try to create an all day event on 1 Apr 12 on my iPad, the length of the event is automatically converted to two days long. When I edit the event, it remains at two days long. I changed my regional settings in order to change the first day of

  • Blackberry pearl and music files

    I know there's not a way to transfer music files to a Blackberry Pearl from a Mac using Bluetooth, but I was wondering if anyone knows if there is another way to do it? Using the USB cable perhaps? I downloaded PocketMac and I'm using that to sync my

  • Abap class to write strings

    Hello all, Does anybody knows if exists an abap-class to write strings in SAP console ? I'm looking something similar of  System.out.println() in JAVA. Regards, Arthur

  • How to Install Oracle 11i apps 11.5.9 on RH9 and how to make staging cd

    Dear All, I installed RH9 server and I want to know step by step how to install oracle 11i apps 11.5.9 on linux. and I want to know how to make staging directory from the CD's. Anybody can help me out. Best regards, Ather Hussain [email protected]