0 Replies Latest reply on Aug 20, 2014 11:19 PM by luckystrike

    How to make a conditional viewport-breakpoint animation?

    luckystrike

      I noticed coming to "Stage"  in the code panel there's an event named "window.resize" but how can I use this to make a conditional viewport-breakpoint animation?

       

      For example Im trying to build a HTML5 page for iphone and I dont want people to rotate their phone from vertical to horizontal , so I need to pop same information like "we dont support horizontal reading please make your phone vertical" when people rotate their phone.

       

      When coming to this problem I thought using "window.resize" would be a good solution, that we can pop alarm when window's width is resized to more than 640px.

       

      But how....please guide me