How to hold last frame in mediaplayer in Windows phone 8.1..?

I am using mediaElement to play videos in an app in Windows phone 8.1. When I am moving to next channel by pressing the right
arrow (which I have placed), its showing the first frame of the video before moving on to next video.
I actually want to show the frame at the time when the video was switched to next channel. How can I do this..?

Hi Jose,
Well, if you have a media file you can get its thumbnail from its StorageFile using StorageFile.GetThumbnailAsync method:
https://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.storagefile.getthumbnailasync.aspx
If you really need to grab the first frame from a video in your MediaElement, you have to write an MFT in C++ to do this. Please refer to this thread and read Rob's suggestion for details:
https://social.msdn.microsoft.com/Forums/windowsapps/en-US/b3245a6c-23b5-4fff-a26b-1c0a8a87437c/grabbing-a-video-frame-to-make-a-thumbnail-in-a-c-xaml-windows-store-application?forum=winappswithcsharp
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • How share content on whatsApp And Instagram for windows phone 8.1 App Development

    I am developing an App using sharie Contract Ux (using DataTransferManager )
    sample code is given below it is showing facebook ,twitter but not showing whatsApp and Instagram .
    Am I missing something ?
    public sealed partial class MainPage : Page
    private DataTransferManager dataTransferManager;
    public MainPage()
    this.InitializeComponent();
    this.NavigationCacheMode = NavigationCacheMode.Required;
    /// <summary>
    /// Invoked when this page is about to be displayed in a Frame.
    /// </summary>
    /// <param name="e">Event data that describes how this page was reached.
    /// This parameter is typically used to configure the page.</param>
    protected override void OnNavigatedTo(NavigationEventArgs e)
    // TODO: Prepare page for display here.
    // TODO: If your application contains multiple pages, ensure that you are
    // handling the hardware Back button by registering for the
    // Windows.Phone.UI.Input.HardwareButtons.BackPressed event.
    // If you are using the NavigationHelper provided by some templates,
    // this event is handled for you.
    this.dataTransferManager = DataTransferManager.GetForCurrentView();
    this.dataTransferManager.DataRequested += new TypedEventHandler<DataTransferManager, DataRequestedEventArgs>(this.OnDataRequested);
    protected override void OnNavigatedFrom(NavigationEventArgs e)
    this.dataTransferManager.DataRequested -= new TypedEventHandler<DataTransferManager, DataRequestedEventArgs>(this.OnDataRequested);
    private void OnDataRequested(DataTransferManager sender, DataRequestedEventArgs args)
    var request = args.Request as DataRequest;
    DataPackage requestData = request.Data;
    requestData.Properties.Title = "MY PHOTO";
    requestData.Properties.Description = "Share App";// The description is optional.
    requestData.Properties.ContentSourceApplicationLink = new Uri("ms-appx-web:///" + "www.google.com");
    // It's recommended to use both SetBitmap and SetStorageItems for sharing a single image
    // since the target app may only support one or the other.
    List<IStorageItem> imageItems = new List<IStorageItem>();
    imageItems.Add(this.imageFile);
    requestData.SetStorageItems(imageItems);
    RandomAccessStreamReference imageStreamRef = RandomAccessStreamReference.CreateFromFile(this.imageFile);
    requestData.Properties.Thumbnail = imageStreamRef;
    requestData.SetBitmap(imageStreamRef);
    // succeeded = true;
    private async void SelectImageButton_Click(object sender, RoutedEventArgs e)
    // CoreApplicationView view = CoreApplication.GetCurrentView();
    //FileOpenPicker imagePicker = new FileOpenPicker
    // ViewMode = PickerViewMode.Thumbnail,
    // SuggestedStartLocation = PickerLocationId.PicturesLibrary,
    // FileTypeFilter = { ".jpg", ".png", ".bmp", ".gif", ".tif" }
    StorageFile logoFile =
    await Package.Current.InstalledLocation.GetFileAsync("Assets\\download.jpg");
    // List<IStorageItem> storageItems = new List<IStorageItem>();
    this.imageFile = logoFile;
    // ImageHolder.Source = "/Assets/download.jpg";
    Output.Visibility = Visibility.Visible;
    ShareStep.Visibility = Visibility.Visible;
    // if (pickedImage != null)
    // this.imageFile = pickedImage;
    // // Display the image in the UI.
    // IRandomAccessStream displayStream = await pickedImage.OpenAsync(FileAccessMode.Read);
    // BitmapImage bitmapImage = new BitmapImage();
    // bitmapImage.SetSource(displayStream);
    // ImageHolder.Source = bitmapImage;
    //// this.rootPage.NotifyUser("Selected " + pickedImage.Name + ".", NotifyType.StatusMessage);
    // ShareStep.Visibility = Visibility.Visible;
    private StorageFile imageFile;
    private void Button_Click(object sender, RoutedEventArgs e)
    DataTransferManager.ShowShareUI();

    Whatsapp and Instagram must not be Share Targets for the type of content you are sharing.
    Bret Bentzinger (MSFT) @awehellyeah

  • How can I transfer photos from an old Windows phone to an iPhone without a PC/Mac?

    My mother has used a Windows phone for the last three years and has just upgraded to an iPhone. She doesn't have a PC or Mac. I have tried using MS OneDrive, which automatically uploads pictures taken with the Windows phone, similar to the iCloud Photo Library. However, using the iOS app to access those pictures, they have been shrunk down to a tiny fraction of their original size. They are unusable, a blurry, pixilated mess. And you can only save one at a time to the iPhone camera roll. Is there any other way to do this? I obviously want the full size photos to be copied over to the iPhone, en masse.
    Thanks for any help.

    I was going to suggest Dropbox but apparently they announced a Windows Phone app in November and it isn't out yet. The following appears to be a 3rd party app that will work to get things from a Windows phone to Dropbox and may be worth investigating: http://betanews.com/2014/03/06/theres-finally-a-great-dropbox-client-for-windows -phone/
    Following is a link to the Dropbox app for the iPhone: https://itunes.apple.com/us/app/dropbox/id327630330?mt=8

  • How do i download adobe flash player on window phone

    How do I download Adobe flash player on window phone

    Moving this discussion to the Installing Flash Player forum.

  • How do i get flash player on my windows phone?

    i have tried to download flash player on to my Nokia windows phone and followed the steps but i still cant get it and am not sure how to do it.

    Hello,
    Flash Player is not supported on Windows Phone.  I'm not aware of any plans to support Windows Phone at this time.
    Maria

  • How to create an S/MIME message in Windows Phone 8?

    Hi!
    I am communicating with a backend that requires me to create on the Phone a message that follows the S/MIME standard. I have stored a public key in the IsolatedStorage on the phone, but I am not sure how to build the S/MIME message since there doesn't seem
    to exist any support for this in Phone 8 .NET framework.
    Does anyone have suggestions on how to accomplish this? There seems to be very little X509 support in Phone 8. I have talked to a fellow developer that did the Android app, and they used Bouncy Castle SMIME libraries (javamail) but these have not been ported
    to the C# version of Bouncy Castle.
    Any ideas? I have never built an S/MIME message before, but as far as I can tell it is a simple header-body design where the body can have a nested structure, and the body can also be encrypted.
    I ahve checked the
    http://social.msdn.microsoft.com/Forums/en-US/netfxnetcom/thread/74e4711e-1f66-43a7-9e3b-bc9cfbcd1b73/ post, and they use cms classes that doesn't exist in Phone 8... :(
    best regards
    /S
    Henrik

    If you want S/MIME support on Windows Phone, take a look at MimeKit (https://github.com/jstedfast/MimeKit) and MailKit (https://github.com/jstedfast/MailKit).
    MimeKit is a very fast and robust MIME parser implementation written in C# that uses BouncyCastle for the low-level cryptography and supports both S/MIME v3.2 and PGP.
    MailKit builds on top of MimeKit to add SMTP, POP3, and IMAP support.
    Both projects are completely open source and free for commercial use.

  • How to get the current session details in windows phone 8 when using Facebook ,Google and Microsoft login

    I want to get the session details like access token , provider etc on a page (ExamplePage.xaml.cs) , i used the following example from nokia developers community (link)
     and implemented the login part but how can i get session details  so that i can send it to my API
    The SessionService class manages the session on facebook,google,microsoft login:
    /// <summary>
    /// The service session.
    /// </summary>
    public class SessionService : ISessionService
    private readonly IApplicationSettingsService _applicationSettings;
    private readonly IFacebookService _facebookService;
    private readonly IMicrosoftService _microsoftService;
    private readonly IGoogleService _googleService;
    private readonly ILogManager _logManager;
    /// <summary>
    /// Initializes a new instance of the <see cref="SessionService" /> class.
    /// </summary>
    /// <param name="applicationSettings">The application settings.</param>
    /// <param name="facebookService">The facebook service.</param>
    /// <param name="microsoftService">The microsoft service.</param>
    /// <param name="googleService">The google service.</param>
    /// <param name="logManager">The log manager.</param>
    public SessionService(IApplicationSettingsService applicationSettings,
    IFacebookService facebookService,
    IMicrosoftService microsoftService,
    IGoogleService googleService, ILogManager logManager)
    _applicationSettings = applicationSettings;
    _facebookService = facebookService;
    _microsoftService = microsoftService;
    _googleService = googleService;
    _logManager = logManager;
    /// <summary>
    /// Gets the session.
    /// </summary>
    /// <returns>The session object.</returns>
    public Session GetSession()
    var expiryValue = DateTime.MinValue;
    string expiryTicks = LoadEncryptedSettingValue("session_expiredate");
    if (!string.IsNullOrWhiteSpace(expiryTicks))
    long expiryTicksValue;
    if (long.TryParse(expiryTicks, out expiryTicksValue))
    expiryValue = new DateTime(expiryTicksValue);
    var session = new Session
    AccessToken = LoadEncryptedSettingValue("session_token"),
    Id = LoadEncryptedSettingValue("session_id"),
    ExpireDate = expiryValue,
    Provider = LoadEncryptedSettingValue("session_provider")
    _applicationSettings.Set(Constants.LoginToken, true);
    _applicationSettings.Save();
    return session;
    /// <summary>
    /// The save session.
    /// </summary>
    /// <param name="session">
    /// The session.
    /// </param>
    private void Save(Session session)
    SaveEncryptedSettingValue("session_token", session.AccessToken);
    SaveEncryptedSettingValue("session_id", session.Id);
    SaveEncryptedSettingValue("session_expiredate", session.ExpireDate.Ticks.ToString(CultureInfo.InvariantCulture));
    SaveEncryptedSettingValue("session_provider", session.Provider);
    _applicationSettings.Set(Constants.LoginToken, true);
    _applicationSettings.Save();
    /// <summary>
    /// The clean session.
    /// </summary>
    private void CleanSession()
    _applicationSettings.Reset("session_token");
    _applicationSettings.Reset("session_id");
    _applicationSettings.Reset("session_expiredate");
    _applicationSettings.Reset("session_provider");
    _applicationSettings.Reset(Constants.LoginToken);
    _applicationSettings.Save();
    /// <summary>
    /// The login async.
    /// </summary>
    /// <param name="provider">
    /// The provider.
    /// </param>
    /// <returns>
    /// The <see cref="Task"/> object.
    /// </returns>
    public async Task<bool> LoginAsync(string provider)
    Exception exception = null;
    try
    Session session = null;
    switch (provider)
    case Constants.FacebookProvider:
    session = await _facebookService.LoginAsync();
    break;
    case Constants.MicrosoftProvider:
    session = await _microsoftService.LoginAsync();
    break;
    case Constants.GoogleProvider:
    session = await _googleService.LoginAsync();
    break;
    if (session != null)
    Save(session);
    return true;
    catch (InvalidOperationException e)
    throw;
    catch (Exception ex)
    exception = ex;
    await _logManager.LogAsync(exception);
    return false;
    /// <summary>
    /// The logout.
    /// </summary>
    public async void Logout()
    Exception exception = null;
    try
    var session = GetSession();
    switch (session.Provider)
    case Constants.FacebookProvider:
    _facebookService.Logout();
    break;
    case Constants.MicrosoftProvider:
    _microsoftService.Logout();
    break;
    case Constants.GoogleProvider:
    _googleService.Logout();
    break;
    CleanSession();
    catch (Exception ex)
    exception = ex;
    if (exception != null)
    await _logManager.LogAsync(exception);
    /// <summary>
    /// Loads an encrypted setting value for a given key.
    /// </summary>
    /// <param name="key">
    /// The key to load.
    /// </param>
    /// <returns>
    /// The value of the key.
    /// </returns>
    private string LoadEncryptedSettingValue(string key)
    string value = null;
    var protectedBytes = _applicationSettings.Get<byte[]>(key);
    if (protectedBytes != null)
    byte[] valueBytes = ProtectedData.Unprotect(protectedBytes, null);
    value = Encoding.UTF8.GetString(valueBytes, 0, valueBytes.Length);
    return value;
    /// <summary>
    /// Saves a setting value against a given key, encrypted.
    /// </summary>
    /// <param name="key">
    /// The key to save against.
    /// </param>
    /// <param name="value">
    /// The value to save against.
    /// </param>
    /// <exception cref="System.ArgumentOutOfRangeException">
    /// The key or value provided is unexpected.
    /// </exception>
    private void SaveEncryptedSettingValue(string key, string value)
    if (!string.IsNullOrWhiteSpace(key) && !string.IsNullOrWhiteSpace(value))
    byte[] valueBytes = Encoding.UTF8.GetBytes(value);
    // Encrypt the value by using the Protect() method.
    byte[] protectedBytes = ProtectedData.Protect(valueBytes, null);
    _applicationSettings.Set(key, protectedBytes);
    _applicationSettings.Save();

    I need to get the session details in the following page AllEvents.xaml.cs  :
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Net;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Navigation;
    using Microsoft.Phone.Controls;
    using Microsoft.Phone.Shell;
    using AuthenticationSample.WP80.ViewModel;
    using AuthenticationSample.WP80.Services.Model;
    using AuthenticationSample.WP80.Services;
    using AuthenticationSample.WP80.Resources;
    using System.Threading.Tasks;
    namespace AuthenticationSample.WP80.Views
    public partial class AllEvents : PhoneApplicationPage
    public AllEvents()
    InitializeComponent();
    MainViewModels FakeData = new MainViewModels();
    FakeData.LoadData();
    DataContext = FakeData;

  • How to open a web browser from an windows phone app

    Hi everyone,
    I am pretty new to Windows Phone 7, and now what I am trying to do is to create a simple app. When a user click to start this app, a browser will open and show the content of a webpage from a specific address.
    I tried to use a webbrowser object, but it seems like that doesn't sport cookies. So I need my app to open a real web browser (maybe IE mobile) to do the job.
    Thank you.

    copying from stackoverflow: "If you want to embed a browser window inside your application then use  the WebBrowser control.  Add an instance of the WebBrowser control to  your form then you can reference it in code using the name you
    give  it.  (Default name is "webBrowser1")"
    Microsoft MVP J# 2004-2010, Borland Spirit of Delphi 2001

  • How can I import a file into my Windows Phone 8.1RT App?

    Hi All,
    I'm running into a bit of an issue associating my app with a custom file type.  Users create a file using my app and upload it to their OneDrive for sharing.  So I then want to give the users the ability to download the file from a share link and
    have that file open automatically in my app.  I've got the appropriate declarations set and file type associations, but I'm getting a file access exception when I try to open the file.  Whats the best way to import a file into my app?  Here's
    the code I've got so far:
    protected override async void OnFileActivated(FileActivatedEventArgs args)
    var path = args.Files[0].Path;
    var name = args.Files[0].Name;
    StorageFile newFile = await StorageFile.GetFileFromPathAsync(path);
    await newFile.CopyAsync(ApplicationData.Current.LocalFolder, name.Substring(0, name.Length - 4));
    The path comes back as
    C:\Data\Users\DefApps\APPDATA\Local\Packages\microsoft.microsoftskydrive_8weke\LocalState\OpenWithTempFolder\e68c261-db3b-472d-a8b7-93427450\File Name.extension
    and the exception is
    Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    Clearly I'm trying to access the file in an inappropriate way, so what's the best way to get the file into my app's local storage?

    You have the StorageFile in arg.Files[0] already. Just use that rather than getting its path and then trying to create a new StorageFile from it.
    var path = args.Files[0].Path; // <= Path is unnecessary and unhelpful
    var name = args.Files[0].Name;
    await args.Files[0].CopyAsync(ApplicationData.Current.LocalFolder, name.Substring(0, name.Length - 4));
    See my blog entry Skip the path: stick to the StorageFile for more details.

  • How do I sync my data from a windows phone to an iPhone 4 iOS 7.1.2

    i need help syncing my data from a windows phone to a iPhone.

    Assuming you have your Windows Phone data synced to Microsoft's Outlook.com, or even Gmail,
    You can setup the Outlook.com or Gmail account in Settings->Email, Contacts, Calendars->Accounts->Add Account
    And it will download all data from there. Email, contacts, etc..
    Other than that, you will have to export all your data from the Windows phone, and then use iTunes to Sync whatever is relevant onto the iPhone.

  • How to get selected item from AutoSuggestBox in Windows Phone 8.1

    In CS File "SelectedItem" is not working what is the alternative to "SelectedItem" for AutoSuggestBox in WP8.1
    In XAML File:
    <AutoSuggestBox x:Name="tblkpersonname" Width="380" Margin="0,-7,0,0" ItemsSource="{Binding}" TextChanged="tblkpersonname_TextChanged">
    <AutoSuggestBox.ItemTemplate>
    <DataTemplate>
    <TextBlock Text="{Binding Name}"
    Tag="{Binding PersonID}"/>
    </DataTemplate>
    </AutoSuggestBox.ItemTemplate>
    </AutoSuggestBox>
    In Cs File:
    private void tblkpersonname_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args)
    try
    if (tblkpersonname.SelectedItem != null)
    tblkdes.Text = ((values)tblkpersonname.SelectedItem).Description;
    persononlineimg.Source = new BitmapImage(new Uri(((values)tblkpersonname.SelectedItem).FlickrPersonImageUrl, UriKind.RelativeOrAbsolute));
    catch (Exception ex)
    Exceptions.SaveOrSendExceptions("Exception in tblkpersonname_SelectionChanged_1 Method In AddCast.cs file.", ex);
    Devi Prasad.P

    Hi
    Not sure about the code you have mentioned here, there is no property named selecteditem in msdn. Please refer
    https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.autosuggestbox.aspx
    <AutoSuggestBox x:Name="suggestions"HorizontalAlignment="Left" Margin="52,62,0,0"
    ItemsSource="{Binding }"VerticalAlignment="Top"
    Width="296" TextChanged="suggestions_TextChanged"
    SuggestionChosen="suggestions_SuggestionChosen"/>private void suggestions_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args)
                if (args.Reason == AutoSuggestionBoxTextChangeReason.UserInput)
                    Suggestions.Clear();
                    Suggestions.Add(sender.Text + "Tea");
                    Suggestions.Add(sender.Text + "Tatt");
    private void suggestions_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args)
                suggestions.Text = "Choosen";
    Something like this can be used
    Regards
    Varun Ravindranath Please 'Mark as Answer' if my post answers your question and 'Vote as Helpful' if it helps you.

  • How to start a loop back proxy in Windows Phone 8 and have all app and internet traffic routed via it

    I want to develop a proxy in windows phone 8 that will handle all data traffic emanating from phone(i.e. browser and Apps). The following procedures were carried out
    a) Edited the Wifi settings http proxy and port to the loop back proxy running in the phone(i.e. 127.0.0.1) and the port in which we brought up the loop back proxy
    b) We browsed pages and no request landed on the loop back proxy in the phone
    Loop back proxy in phone is built using StreamSocketListener 
    Another observation is that:
    If we edit Wifi settings http proxy and port to a http/https proxy running on server then when we browse pages from windows phone we are getting the requests to server. Why is this difference?
    Is there a limitation to run http/https proxy on mobile phone as loop back proxy.
    But there are apps in the market for windows phone that behaves as HTTP proxy like 
    http://www.windowsphone.com/en-us/store/app/smartproxy/75da629b-c0f3-4999-86a3-9559181d1299
    Any help on the same would be appreciated

    Hi,
    Thanks for your reply and we have used StreamSocketListener waiting on a port and ip is given as loopback.The same settings are done for Wifi access point but when we browse any page in IE the requests are not landing on to the loop back proxy.Any idea on
    the same would be highly appreciated

  • How to stop custom Messagebox from closing in windows phone 8?

    i have two redio button(rb1 and rb) and a text box in custom messagebox and i want to stop custom messagebox
    from closing if any option is not selected
    box.Dismissed += (s, e1) =>
    if (e1.Result == CustomMessageBoxResult.LeftButton)
    if(rb.IsChecked.Value)
    else if(rb1.IsChecked.Value)
    else
    MessageBox.Show("Please Select the Option");
    // I WANT TO STOP CLOSING CUSTOMBOX HERE IF ANY OPTION IS NOT SELECTED

    Hi sk pandya,
    Nice to see your shared solution. :)
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How can I hold a frame of a clip?

    I want to hold the first frame of a clip, then play the clip, then hold the last frame. Seems like there's some time remapping tools somewhere but I can't figure this out.
    I can't just take a screen shot and set that as the still because this is one window in the video and there's other stuff going on.
    Basically there are going to be four windows each with a video track. One will play, then freeze and the next will begin.
    Any thoughts on how to do this? I don't want to have to go into After Effects if I can help it.
    Thanks!

    To get a still of a clip in the timeline, go to the frame you want to freeze, select 'f' to match frame back to that clip and frame in the Viewer, select Sift+N' to create a Freeze of that frame, insert that into the Sequence.
    ... same for freeze at end.
    You said there's four windows - you mean on one screen? ... then I'd create 4 sequences, possibly of the same duration each; one each for the 4 frames you want. They would each start with a freeze, roll on, then freeze at the end. Make these SEQs longer than you need.
    One at a time, put them into the Viewer (don't double-click them) and edit them onto 4 tracks of master SEQs.
    Apply sizing and motion to each of those. Control-click the clips in the timeline and select 'Open In Viewer' to see their motion tabs.
    This method helps separate the roll off/to a freeze from the editing & motion (resizing/zooming etc.)
    Hope that helps.
    Neil.

  • 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.

Maybe you are looking for

  • HP LaserJet 1020 drivers for MacOSX Lion 10.7

    Hi, I'm trying to add LaserJet 1020 to MacOSX 10.7 (Lion). According to this page this printer is supported by Apple and its driver comes with OS. But when I'm adding the printer in the "Print & Scan" it says that the driver for this printer is NOT a

  • Do I have enough space and memory on my 6 year old Macintosh to play The Sims 3?

    I've heard that The Sims 3 requires more GB and a stronger, more upgraded RAM. Knowing my computers system memory shown above, if I install The Sims 3, will it run smoothly? If not, what should I do to clean up my computer in order for the game to pl

  • Can't log in as admin

    I normally have 3 user options upon log in.. ( A, B, C) I log in as the (A) admin. I went for a coffee and closed the macbook while some applications were still open in admin.. When I came back I opened the screen to be confronted with user B's start

  • Application Update

    I have a problem, not so serious but yet quite annoying. Applications say that i have an uppdate to get, but when i klick the button to get it it say that there are no updates available. is there som kind of complication with my japanese computer, an

  • Message no. GA749 on PSW5 - Actual periodic repsting

    Hello, When I try to execute the actual periodic reposting for WBS (KSW5) the system does not include in calculation the costs that been previously allocated to de sender by actual distribution (KSV5) from the cost center. Is anybody meet the problem