macromedia flash sitedesign:
:confused; Hello All! I was wondering if anyone knows the proper code for loading (and playing) a SWF video file at a precise location (say x=100 y=150) when a button is clicked? The button is named 411_btn and the SWF file (which is not in the library) is named 411Page.SWF. (If necessary I can convert the 411Page.SWF file into a flv file and put it in the library-I would call it 411Page_mc and give it a linkage identifier of 411Page) Also; How do I get that video to play on a certain layer? The video needs to be behind the main layer (and without a skin). Any help would be greatly appreciated!!! I can also email the files to you if needed! Thanks!!!!! I cannot find the answer to this in ANY of the documentation....
For the loading video part you would use something like loadMovieNum("file.swf", 1); but you have to put the .fla file in the same location as the video. to do it when pressing a button you have to add onRelease and then load the MC. Not sure how to do that. For positioning th loaded MC go in the original .SWF file (being the video) and move it to the same co-ordinates using the same backround size. Hope it was helpful, Ian
ok. I did make the 2nd swf file at the correct coordinates-I acually used my main layer (the mask) when I created it and just deleted that layer when I was done so it should align up pretty well. I guess I just need it to load when i hit the button. Do I need to make the buttons movieclips instead of buttons?(I can do that). So I need the swf file to be in the same folder as the fla file-gotcha. The contentpath to get to the swf would be just the file name right (411Page.SWF)?-since theyre in the same folder correct? Thanks Ian!!!
Hi, I'm not such a good programmmer in flash so try to play around with the AS until you can get it right. I will later check the code for you because the PC i'm using does not have Flash Installed. You do not need to make the buttons movie clips. What I reccomend is that you creat a seperate layer for just the loaded video, click on the button(do not go into editing mode) pull up the actions pannel and add the following action: myButton.onRelease = function () { gotoAndPlay(5); }; after that goto frame 5 and load the movie from there. Ian
Cool, I'll try that! One question: will this method cause the entire screen to reload? I really want the main layer to remain static without dissappearing and have just the video portion change. Kinda like if i had frames. The main layer (the video mask) would be the constant frame that never disappears.
hi, Sorry for my late answer; no it should not re load everything. by the way the code is good I tried it out.
Don't see what you're looking for? Try a search.
|