Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User issanasr13's Avatar
    Join Date
    Aug 2008
    Posts
    12
    Hi,
    this code from tutorial example
    this code works fine,But in my app not working!
    Is there another way to let my app remember the last button selected.
    Selection.setFocus(btnWeather);
    if (System.capabilities.hasSharedObjects)
    {
    trace("Has SOs");
    SharedObject.addListener("soLastSelection",showLastSelection);
    var soLastSelection:SharedObject = SharedObject.getLocal("soLastSelection");
    }
    else
    {
    trace("No SO");
    Selection.setFocus(btnWeather);
    }

    function showLastSelection(argSo:SharedObject)
    {
    trace("argSo.data.selection: " + argSo.data.lastButton);
    if (argSo.data.lastButton)
    {
    trace("YES SO");
    Selection.setFocus(argSo.data.lastButton);
    }
    else
    {
    trace("NO SO");
    Selection.setFocus(btnWeather);
    }
    }

    btnWeather.onRelease = loadScreen;

    btnVideo.onRelease = loadScreen;

    btnGame.onRelease = loadScreen;

    function loadScreen():Void
    {
    var clipName:String = this._name;
    clipName = clipName.substring(3, clipName.length);
    trace(clipName);
    if (System.capabilities.hasSharedObjects)
    {
    soLastSelection.data.lastButton = this;
    soLastSelection.flush();
    }
    this._parent._parent.attachMovie(clipName,clipName,0);
    }
    My app has 4 buttons instead of 3 buttons in this code

  2. #2
    Registered User issanasr13's Avatar
    Join Date
    Aug 2008
    Posts
    12
    Ok guys the problem solved
    clipName = clipName.substring(3, clipName.length);
    The button instance name must be like that(btnVideo)
    The first 3 latter will remove so the (Video) screen will appear!

Similar Threads

  1. problem using button (post back)!
    By saikat_00 in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2007-01-27, 04:42
  2. Problem with DONE button in fep
    By faalkhah in forum Symbian C++
    Replies: 8
    Last Post: 2007-01-22, 07:49
  3. problems displaying video
    By gorsken in forum Mobile Java Media (Graphics & Sounds)
    Replies: 6
    Last Post: 2006-06-21, 17:18
  4. Bluetooth problem in Symbian C++ code
    By vardhman in forum Bluetooth Technology
    Replies: 0
    Last Post: 2005-01-02, 08:17
  5. problem with Nokia Toolkit 3.1 and binary code for MMS
    By alinesimon in forum General Messaging
    Replies: 1
    Last Post: 2002-08-09, 06:40

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved