Jump to content
Search Community

rojharris

Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by rojharris

  1. Sorry Jack, It turned out to be JQuery not Greensock. How could I have doubted..... Many thanks anyway R
  2. We think it's gsap because the function used to play the video is .play(), and so is the function to play the timeline in gsap. The error in the js console is saying cannot call play() on a non-object, which implies that it's trying to play a timeline, not a video.
  3. Hi There, We're trying to play video automatically upon clicking a button on a page (ie without pressing play on the video skin) but it seems GSAP, which is used extensively on the site, overwrites the html5 'play' function so it doesn't work. Does anyone know of a work-around that will allow triggering of video? I need to create a lightbox-like effect that will autoplay a video when a user clicks the relevant button on the page. Cheers Roger
  4. Genius! Thanks Jack. That's exactly what I needed and will save hours. I couldn't get my head around the staggering and didn't even think of easing a time property. cheers Roger
  5. Hi folks, I have a job where the client has a screen with 64 little icons on it, actually 6 different icons spaced to make a grid pattern of 64. So it looks like 8 x 8 rows x columns of icons. What they want to show is these icons appearing on the page over time, so one appears, then another then more and more getting faster and faster so that all 64 are there after a few seconds. Now I know I could manually write the tweens to go from off the screen in the z axis (so behind us) to the final position, for each and every icon, but that would take hours. Can anyone think of a cool quick(ish) way of doing this, perhaps with TimeLine or something? I'd like them to look like they are whizzing onto the screen from behind the camera, if you see what I mean. Bearing in mind that they must end up in the correct positions in the grid. Personally I'm stuck. I just can't think of a way other than laboriously tweening each one. I'm a club greensock member so have access to those plug-ins too should they help. Many thanks Roger
  6. I may be wrong but it sounds like you haven't imported your greensock libraries?
  7. That's a brilliant idea, using TweenMax to play the swf. Not only do I understand it, it gets me around all the timer problems. Cool! Thanks for your help
  8. Ah, I see the problem now. I hadn't thought it through! So, As I do have access to all the swfs (I made them), could I put some kind of stop() on frame 1 then, in my host swf, tell it to gotoandPlay(2) of the child swf once it's loaded? Then move onto the next one once current frame == end frame kind of thing? Thanks for the code, I'll try it out, then see if I can understand it. I am learning more about coding every day. Last time I wrote any programs was in the 70's or 80's on a Dragon32 computer! 32k of RAM wow! (and that was in assembly language!) cheers Roger
  9. I just saw Chris' post above about possibly using TimeLineMax as a way to play a sequence of swfs. That would be great, I could use delays within tweens to time them too. I'll bet it's too good to be true. Or.... another thought: I could use TimeLineMax to append a delayed tween of an invisible movieclip every 10seconds, and have a new SWFLoader between each append, that loads and plays my swf. Then somehow unload the lot and start again in an infinite loop....Hmmm.
  10. Hi Chris, Sorry, I'm not here to help I'm afraid. I just have a very similar problem with playing sequential swfs. I really like your idea of using the wonderful 'TimeLineMax' which is my current favourite thing on the planet! I had no idea it could possibly work with SWFLoader. If you do get this to work, please, please post your solution here as it will be really useful to know, and not just for me I'm sure. Good Luck! Roger
  11. Hi. This is driving me nuts. I can't find any working solutions anywhere on the net for what would seem to be an easy thing. Essentially I just want to play a bunch of existing swfs in sequence. Turns out that's almost impossible to do without errors all over the place. I figured I'd just give up and try loading and playing each swf for so many seconds then go on to the next, knowing that each one lasts about 8 seconds. I figured that LoaderMax would be the way to go and after ploughing through other forum posts and doing some cut and paste here's my code. Now obviously it doesn't work but then I'm an illustrator not a programmer and I don't really understand any of this stuff beyond a very basic level. I cannot imagine how I'd get anything to work without this nice simple greensock stuff!! Anyway, my plan was to load up an array of swfs, get the first playing in a timer function and then just cycle through them indefinitely. Trouble is I can't work out how to play the swfs once they are loaded. Where am I going wrong and is there a better way? (as obviously my stage.addChild is not working) ------------------------ LoaderMax.activate([sWFLoader]); var queue:LoaderMax = LoaderMax.parse(["swfs/Kahuna.swf","swfs/Sirius.swf","swfs/kahuna360.swf","swfs/Morpheus.swf","swfs/IQModular.swf","swfs/ICE.swf","swfs/Alchemist.swf","swfs/Archangel.swf"],{maxConnections:1}); queue.load(); var fl_TimerInstance:Timer = new Timer(10000,0); fl_TimerInstance.addEventListener(TimerEvent.TIMER, fl_TimerHandler); fl_TimerInstance.start(); var count:Number = 1; function fl_TimerHandler(event:TimerEvent):void { //play the swfs every 10 seconds stage.addChild(queue[count]); count++; if (count >= 6) { count = 0; } } ------------------------------
  12. Hi, I am using VideoLoader to play a video on the stage. I need to then play movie clips that are description boxes of parts in the movie, over the top of the movie. However when I test the swf the movie is loading over the top of my boxes. I am using tweenlite to fade in the boxes when the movie hits cuepoints. How can I get the movie to play behind my movieclips? Here is a lump of my code so far: Thanks, Roger ------------------------ var genieVid:VideoLoader = new VideoLoader("assets/GenieMovie.f4v",{container:this,width:850,height:480,scaleMode:"proportionalInside",bgColor:0x000000,autoPlay:true}); genieVid.load(); genieVid.addEventListener(VideoLoader.VIDEO_CUE_POINT, cueHere); function cueHere(event:LoaderEvent):void { if (event.data.name == "Sec1Pause1") { genieVid.pauseVideo(); TweenLite.to(p1all_mc.p1b1_mc, 1, {alpha:1, delay:1}); TweenLite.to(p1all_mc.p1b2_mc, 1, {alpha:1, delay:2}); TweenLite.to(p1all_mc.p1b3_mc, 1, {alpha:1, delay:3}); TweenLite.to(p1all_mc, 1,{alpha:0, delay:10}); genieVid.playVideo(); } /*else if(event.data.name == "Sec1Pause2") genieVid.pauseVideo(); TweenLite.to(p1all_mc.p2b1_mc, 1, {delay:1,alpha:1}); TweenLite.to(p1all_mc.p2b2_mc, 1, {delay:2,alpha:1}); TweenLite.to(p1all_mc.p2b3_mc, 1, {delay:3,alpha:1}); genieVid.playVideo();*/ } -------------------------
  13. ok, but then how come the removeChild(loader) on the frame with the swf loader made it work perfectly? I didn't change any other code, including the Removed_from_stage? I'll take another look. Thanks R
  14. Thanks. I've emailed the fla for you to check.
  15. Yes, I stopped using LoaderMax. How do I send you the fla & swf without it being public? It's NDA at the moment? I'd also want your assurance you won't laugh your socks off at my code, I'm very new to this Flash malarkey! Thanks R
  16. Never mind, I've fixed it. I just went back to plain AS3 and used removeChild(loader); and it now works fine. cheers R
  17. Hi, So I've managed to get an external swf to load perfectly at frame 15 on my timeline like this: edit: I've just found out it's an AS2 swf. Is there any way I can make it play, bearing in mind I don't need to access anything in it, then unload properly? cheers ---------------------------------------------------------------------------------- stop(); var loader:SWFLoader = new SWFLoader("myswf.swf",{width:940,height:532,scaleMode:"proportionalInside",container:this,x:50,y:186,hAlign:"left",vAlign:"top"}); loader.load(); unloaderlogo_btn.addEventListener(MouseEvent.CLICK, fl_UnloadandgoBack); function fl_UnloadandgoBack(event:MouseEvent):void { loader.unload(); gotoAndStop(1); } ---------------------------------------------------------------------------------- but when I go back to frame 1, I get a 1009 null object error? Frame 1 is where all my buttons to get to frame 15 are like this: ---------------------------------------------------------------------------------- import com.greensock.*; import com.greensock.loading.*; import com.greensock.events.LoaderEvent; import com.greensock.loading.display.*; stop(); Logo_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_6); function fl_ClickToGoToAndStopAtFrame_6(event:MouseEvent):void { gotoAndStop(1); } button_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_2); function fl_ClickToGoToAndStopAtFrame_2(event:MouseEvent):void { gotoAndStop(5); } button_2.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_3); function fl_ClickToGoToAndStopAtFrame_3(event:MouseEvent):void { gotoAndStop(10); } button_3.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_4); function fl_ClickToGoToAndStopAtFrame_4(event:MouseEvent):void { gotoAndStop(15); } ---------------------------------------------------------------------------------- If I don't put that unload() in there then the swf stays on the stage. Any ideas why I'm getting the error? I'm not trying to communicate with the added swf, just play it, then get it off the stage when navigating back to the main menu page. Thanks Roger
  18. Thanks for the reply. I hadn't thought of using cuepoints and flash text over a movie, that's a good idea. It may be a little beyond my experience but I'll have a look at some tuts on triggering events via cuepoints. As for your loading point, I'm hoping that each section swf will be no larger than 1MB. 1.5 at absolute most, so hopefully they would load fairly quickly. At least faster than it would take to watch one. I'll see if I can work out LoaderMax and give it a try. Many thanks Roger
  19. Hi All, Bear with me please, I'm a newbie! Before I try to work out how to use LoaderMax to do something, I wonder if you could tell me if it's even possible? I'm new to AS and loving TweenLite but now I need to do something more complex: I have a series of short swfs (11) each with a presentation about part of a product. Each one has about 100 frames of embedded movie animation and some text boxes that pop up describing the movie. Each swf is about 1MB in size and lasts from 20-30seconds. I figured that rather than make a huge swf file with all 11 parts in and try and play that (with the long load times that would entail) I would make the 11 small swfs and load and play them in sequence from within a 'host' swf. That way I can add some music to the host swf to play, while the viewer watched each section play. I'd like the experience to be seamless to the viewer, so for eg. part1.swf would load and start playing then, as soon as its finished, part2.swf would begin playing. etc. etc. until part11.swf has finshed. You get the picture... So, will Loadermax allow me to do this so each one comes in without having to wait for the whole lot to load? Perhaps can they all load in the background while the viewer is watching? So while part 1 is being viewed, part 2 is already loading up ready? I have no idea how to do this in AS3 but if LoaderMax can do it I know it will be much easier to use, just like TweenLite is? I have to decide which way to go with this very soon as I'm making all the animations this week. My alternative would be to make the whole sequence, music included, as a long flv movie and just play it from one swf. That's easier but I'm worried it will load slower and also, the text will look awful due to the movie compression. Any help from you master coders out there would be very much appreciated. Many thanks, Roger
×
×
  • Create New...