1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    30
    Vote Rating
    0
    exs is on a distinguished road

      0  

    Default Open new URL in same window: going to a specific scene

    Open new URL in same window: going to a specific scene


    Hi, I want to do the following: Create a link to open new URL upon. Instead of jumping to scene1, want to specify a particular scene to start. (The linked URL page is also created in Animator with multiple scenes) Is there a way to do this? Thx.

  2. #2
    Sencha User arnebech's Avatar
    Join Date
    Jun 2010
    Posts
    498
    Vote Rating
    10
    arnebech will become famous soon enough

      0  

    Default


    Just to verify I am getting it. You want an Animator page that starts a different scene depending on the link?

    like
    example.com/animator.html?startSceneId=1
    example.com/animator.html?startSceneId=2

    Here is a quick way to get that done, but you'll have to manually edit the index.html (or js file if you export separately).

    Original (inside the setConfig function: ~ line 44 in index.html)
    Code:
    this.startSceneByID(this.scenesArray[0].id);
    
    replace with

    Code:
    var query = location.search;
    var result = query.match(/startSceneId=(\d+)/);
    
    
    if (result) {
        this.startSceneByID(result[1]); 
    } else {
        this.startSceneByID(this.scenesArray[0].id);
    }
    then you just have to add startSceneId to the back of the link, similar to this

    index.html?startSceneId=0
    index.html?startSceneId=1

    Where id is the scene id (you can get that by hovering over the scene panel).
    Attaching sample file.
    Attached Files

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    30
    Vote Rating
    0
    exs is on a distinguished road

      0  

    Default


    It works! Thank you so much Arne. Just made by Animator workflow so much easier.

  4. #4
    Sencha User
    Join Date
    Oct 2011
    Posts
    30
    Vote Rating
    0
    exs is on a distinguished road

      0  

    Default


    Is there a way to stop the screen from flickering? When the linked webpage loads, the screen flickers for a moment. It doesn't flicker when navigating within the same URL, it only flickers when jumping from lets say index.html to index2.html. Thx.

  5. #5
    Sencha User
    Join Date
    Oct 2011
    Posts
    30
    Vote Rating
    0
    exs is on a distinguished road

      0  

    Default


    The problem seems to be solved in Safari v. 5.1.7 on mac but still exists on same version of safari for Windows. The problem also is highly noticeable in iphone OS 5.1.

  6. #6
    Sencha User arnebech's Avatar
    Join Date
    Jun 2010
    Posts
    498
    Vote Rating
    10
    arnebech will become famous soon enough

      0  

    Default


    There will probably always be some flicker when you are going from one URL to another since you have to load a whole page.

  7. #7
    Sencha User
    Join Date
    Oct 2011
    Posts
    30
    Vote Rating
    0
    exs is on a distinguished road

      0  

    Default


    Is there a way to achieve the same thing? I have about 60 scenes as of now and Animator is starting to really slow down and crash alot. I need a way to split the scenes up so I can keep my sanity and help with the performance. I thought by pointing to a different HTML link would solve this, but I have elements that are constant during transition making the "refresh flash" noticeable. Thanks.

  8. #8
    Sencha User arnebech's Avatar
    Join Date
    Jun 2010
    Posts
    498
    Vote Rating
    10
    arnebech will become famous soon enough

      0  

    Default


    Yeah, I am not sure if there is a good way to split it up into several files while not having it flash when loading. If you wouldn't mind, I'd be great if you could give me a copy of the project ( send me a PM ) so I could take a look at some of the performance issues.

Thread Participants: 1