Jump to content
Search Community

CV-Gate

Members
  • Posts

    8
  • Joined

  • Last visited

Recent Profile Visitors

2,204 profile views

CV-Gate's Achievements

0

Reputation

  1. Well, I think that I got it and it's working very smooth (I don't know why but in the Codepen tweens are not working...) $(function(){ var minx = ($('.wall').width() - $(window).width())* -1; var miny = ($('.wall').height() - $(window).height())* -1; var wall = Draggable.create(".wall", {type:"x,y", edgeResistance: 1, bounds: ({minX: minx, minY:miny, maxX:0, maxY:0}), throwProps:true }); $(window).resize(function () { var minx = ($('.wall').width() - $(window).width())* -1; var miny = ($('.wall').height() - $(window).height())* -1; wall[0].applyBounds({minX: minx, minY:miny, maxX:0, maxY:0}); }); }); http://codepen.io/anon/pen/vFemn Thanks!
  2. Thanks a lot for your answers. I understand now how it works. However, you are right, the code is not working as expected. What I'm trying to do is something like this: http://codepen.io/anon/pen/xjmoG But with the nice draggable tweens. I also updated the original Codepen to get an idea of the desired effect. It's basically like a map navigation effect. Do you know if it's possible to do it with draggable? Maybe with different bounds values? Thanks!
  3. Please, could you tell me what I'm doing wrong on the stopDrag function? var wall = Draggable.create(".wall", {type:"x,y", edgeResistance: 1, bounds: "body", throwProps:true, onThrowUpdate: stopDrag, onDrag: stopDrag}); function stopDrag(){ if (($('.wall').height() - (($('.wall').position().top)*-1) - $( window ).height()) <= 0 ){ wall.endDrag(); } } As you could see in the attached Codepen, I'm trying to make a large draggable object having the document body as bounds. It's working fine except when dragging all the way up. It's going out of the bottom limit (I think this is normal, as the document.body shouldn't have a height limit) and that's why I'm calculating the point where it should stop in the stopDrag function. I don't know exactly how I should call endDrag(), in the docs I can read that I have to return the event that initiated the drag event but I think it's not clear enough. By now, I'm getting: endDrag() Uncaught TypeError: undefined is not a function If you could tell me how I can properly call endDrag() it would be great. Also if you know a better approach to prevent dragging out of the bottom (when dragging up and before white background appears, it should stop). Thanks.
  4. Yes you were right! I was duplicating the proportional outside parameter. Now it fits perfect. However the performance is very poor, is there any way to optimize? Perhaps I shouldn't attach the whole video loader because it has 12 videos on que. Is it possible to attach only the current video? I tried with content display and rawcontent but I only get black. Thanks!
  5. Thanks a lot for your answer. The swf is 100% size and noescale. I'm using swiffit to take control of the scrollbar but nothing else. I'm getting also the same behaviour in the swf movie without html. Perhaps I didn't explain fine, sorry for my bad english. What I'm trying to do is this: The video adapts to the stage, expanding the browser expands the video, resizing the browser resizes the video but if it's not proportional resized instead of showing gaps it crops the video, mainly on the horizontal side. Is this possible using liquid stage? Thanks a lot for your time.
  6. Hello, I'm trying to adapt the size of some videos to the stage size using a Liquid Area. The videos fit on the stage properly, well, almost fine. The only problem is that resizing the browser in a non proportional way, some black gaps appear at bottom and right sides. Constraining the browser, I can see the gaps on the opposite sides. This makes me think that the Liquid Stage is handling the position of the Liquid Area over a non desired pin. I tried with strict: false, autoPinMode:false, etc... Maybe it's a problem with the registration points of the videos or attaching them to the Liquid before loading, but I don't think so because the Area preview acts exactly the same. Any idea? Thanks in advance! liquid = new LiquidStage(this.stage,stage.stageWidth,stage.stageHeight); area = new LiquidArea(this,0,0,stage.stageWidth,stage.stageHeight,0,0); area.attach(preloader_mc, {scaleMode:ScaleMode.PROPORTIONAL_OUTSIDE, vAlign:"top", crop:true});
  7. Yes, I see and you are right. I though that dispose was also removing the instance. Thanks a lot for your answer!
  8. Hello, and thanks for reading. I'm making a video player that continuos play clips from a playlist and I would like to dispose the video after playing it. I can't configure autoDispose:true because I still need it for some seconds when the next video is playing, this is the code I'm trying: //add cuepoint var oldVideo:Number = _videos.indexOf(_currentVideo) - 1; _currentVideo.addASCuePoint(1, "removeVideoCP", {n:oldVideo}); //..... // get message from cue point if (event.data.name == "removeVideoCP") { var _videoID:Number = event.data.parameters.n; //_videos:Array of VideoLoaders _videos[_videoID].dispose(); trace(_videos[_videoID].name); // this still traces "clip1" } Any idea? Thanks a lot for your help.
×
×
  • Create New...