|
First off, I'm terrible novice when in comes to actionscript. I'm more of an html/css/litte javascript/php person. I'm trying to make a custom video player (yes make, not using jwplayer). The kind where you can pass in the source of the mp4 video file in html through flashvars. However i have no idea how to accomplish this and days of searching have either not answered my question or done so while answering 700 other questions in the same tutorial so I can't make sense of the code.
|
| # ? Sep 21, 2010 14:54 |
|
|
| # ? May 19, 2013 11:42 |
|
Where are you getting stuck? And are you using AS2 or AS3? In AS3, flashvars are available from loaderInfo.parameters. This page seems to have thorough instructions for showing video. I haven't looked that closely though. http://www.adobe.com/devnet/flashpl...ash_player.html
|
| # ? Sep 21, 2010 17:18 |
|
5TonsOfFlax posted:Where are you getting stuck? And are you using AS2 or AS3? In AS3, flashvars are available from loaderInfo.parameters. Like I said not too familiar with flash. I know in HTML I can have it say code:
|
| # ? Sep 21, 2010 19:12 |
|
The Merkinman posted:AS3 In the document class or main timeline, this will get you the value of file: code:
|
| # ? Sep 21, 2010 21:37 |
|
I'm currently in a group for class. We have a project to do that involves updating an old website. It involves flash as well. How hard will it be to learn flash?
|
| # ? Sep 21, 2010 22:45 |
|
Boo This Man posted:I'm currently in a group for class. We have a project to do that involves updating an old website. It involves flash as well. How hard will it be to learn flash? How quick of a learner are you?
|
| # ? Sep 21, 2010 23:23 |
|
Boo This Man posted:I'm currently in a group for class. We have a project to do that involves updating an old website. It involves flash as well. How hard will it be to learn flash? Yes
|
| # ? Sep 21, 2010 23:24 |
|
Boo This Man posted:I'm currently in a group for class. We have a project to do that involves updating an old website. It involves flash as well. How hard will it be to learn flash? If your familiar with timeline based products then it shouldn't take long. If you are completely new then I'm not sure, it might take you a while. When I first started using flash I didn't "get" how to use it correctly. I would put mostly everything on one layer and then be pissed why everything was moving instead of just the thing I tried to tween moved. I didn't spend alot of time in flash until somewhere in college and all of a sudden it clicked. Things don't happen until the timeline gets to its frame, and everything should get their own layer. Now I can make complicated websites that have hundreds of frames and animations or make a 2D game that has only one frame and I use my AS3 awesomeness to make poo poo happen. Now I am combating my awful habit of putting ActionScript in library elements instead of putting it all in one layer (which I should call the "Actions" layer) and assigning instance names to everything and attaching the code to the object via the main timeline. However, embedding AS in library elements has its pluses, but when you go to debug you have to check everything, especially if you haven't looked at the document in a long while and forget what the gently caress you were trying to accomplish. Now I try to write stuff down.
|
| # ? Sep 22, 2010 14:35 |
|
5TonsOfFlax posted:In the document class or main timeline, this will get you the value of file:
|
| # ? Sep 22, 2010 18:01 |
|
The Merkinman posted:But then how do I get that variable into the source of the FLV Playback in the component inspector? 1. Give the FLVPlayback component an instance name 2. In your actionscript, you say something like yourFLVPlayback.source = someStringHere; 3. Tada?
|
| # ? Sep 22, 2010 18:41 |
|
nolen posted:1. Give the FLVPlayback component an instance name Now on to making a custom skin, which I believe has much better documentation. EDIT: Okay maybe it didn't I get code:code:It did work before, maybe it still is and i can't see changes because of our stupid server caching? Even still, I shouldn't have all those errors The Merkinman fucked around with this message at Sep 22, 2010 around 20:12 |
| # ? Sep 22, 2010 19:25 |
|
I'm working with a designer who has cs3 on a mac and I have cs4 on a PC. We've been swapping the same fla for the past couple weeks and funky things are starting to happen. The problems happen seemingly at random and can usually be solved by him saving the fla, giving it to me, I render the swf, save the fla and give it back and magically it works... Has anyone encountered problems when working with someone on the same file between 2 versions of Flash before?
|
| # ? Sep 24, 2010 03:24 |
|
Cross-posting this here. My company has an opening for a UI developer / engineering role. If you come from a strong technical background (i.e. CS degree or similar experience) and are skilled with Adobe Flex, I'd encourage you to check it out. We are located in San Francisco. http://forums.somethingawful.com/sh...=#post382439977
|
| # ? Sep 24, 2010 06:24 |
|
I'm sick and tired of Actionscript's utterly useless error messages. I know a lot of AS programmers say the Flash IDE is the worst for writing AS. So what's the best, and do the alternatives provide error messages that actually help me debug my projects?
Lamb-Blaster 4000 fucked around with this message at Sep 27, 2010 around 02:57 |
| # ? Sep 27, 2010 01:30 |
|
Lamb-Blaster 4000 posted:I'm sick and tired of Actionscript's utterly useless error messages. I know a lot of AS programmers say the Flash IDE is the worst for writing AS. So what's the best, and do the alternatives provide error messages that actually help me debug my projects? You have "Permit debugging" checked in the Publish Settings section right?
|
| # ? Sep 27, 2010 03:46 |
|
Lamb-Blaster 4000 posted:I'm sick and tired of Actionscript's utterly useless error messages. I know a lot of AS programmers say the Flash IDE is the worst for writing AS. So what's the best, and do the alternatives provide error messages that actually help me debug my projects? I'm not sure about Flash IDE, but if you use FlashDevelop (free) or FlashBuilder (not free) you will get an improved dev environment, but I'm not really sure if the compiler error messages will get any clearer. I've found them to usually be quite clear, which ones are you having difficulty with?
|
| # ? Sep 27, 2010 04:08 |
|
This is a great document about getting good performance in Flash. I think it should be in the OP: http://help.adobe.com/en_US/as3/mob...ing_content.pdf
|
| # ? Sep 27, 2010 13:18 |
|
iopred posted:I'm not sure about Flash IDE, but if you use FlashDevelop (free) or FlashBuilder (not free) you will get an improved dev environment, but I'm not really sure if the compiler error messages will get any clearer. it's always the null pointer error, sure it gives me a stack trace, but when the function containing the null value is pretty big I'm stuck tracing out everything that could ever be null for one reason or another. lostatsea posted:You have "Permit debugging" checked in the Publish Settings section right? Ya ChirreD posted:This is a great document about getting good performance in Flash. I think it should be in the OP: Just looking at the table of contents of that document, it looks really helpful!
|
| # ? Sep 27, 2010 22:15 |
|
Lamb-Blaster 4000 posted:it's always the null pointer error, sure it gives me a stack trace, but when the function containing the null value is pretty big I'm stuck tracing out everything that could ever be null for one reason or another. If you have 'Permit Debugging' checked like previously mentioned, you should get line numbers for all your errors. eg, I put some bad code on the first frame in the timeline and got this sucker: TypeError: Error #1009: Cannot access a property or method of a null object reference. at Untitled_fla::MainTimeline/frame1()[Untitled_fla.MainTimeline::frame1:3] You can easily see that the error is on frame1, line 3.
|
| # ? Sep 28, 2010 04:28 |
|
In AS2 I'm trying to clear pixels that were drawn. drawLine is called on an interval. If an element in a array equals C it should clear it. I thought dispose() would be a good choice, but I can't get the program to continue drawing. ![]() code:var myBitmap:BitmapData = new BitmapData(Stage.width, Stage.height, true); after dispose() to redefine it, still nothing.
|
| # ? Sep 29, 2010 02:33 |
|
NOG posted:In AS2 I'm trying to clear pixels that were drawn. drawLine is called on an interval. If an element in a array equals C it should clear it. I thought dispose() would be a good choice, but I can't get the program to continue drawing. I don't know AS2, but I do have a question. Is myBitmap a Bitmap object that's on the stage? If it is, then redefining the myBitmap instance isn't doing what you think it does. The original myBitmap references the object that's currently on the stage. When you set the myBitmap variable to a new Bitmap, you're only changing the reference the variable is pointing to. The original instance is still on the stage.
|
| # ? Sep 29, 2010 03:20 |
|
You don't want to dispose, dispose kills the bitmapData in memory and it becomes unusable - and recreating a new bitmapData every frame is inefficient. Instead you should do something like: myBitmap.fillRect(myBitmap.rectangle, 0xFFFFFF); Which will simply fill the bitmapData with white.
|
| # ? Sep 29, 2010 03:40 |
|
PhonyMcRingRing posted:I don't know AS2, but I do have a question. Is myBitmap a Bitmap object that's on the stage? I'm pretty sure it's an object, and you're right. Thanks. iopred posted:You don't want to dispose, dispose kills the bitmapData in memory and it becomes unusable - and recreating a new bitmapData every frame is inefficient. I've been trying to work on using this, but what happens is it just makes the lines darker and more pixelated. Doesn't make a fill. EDIT: Actually if I clear the interval when that happens, it does make the screen white. But how in the world does it redraw all the lines the next interval and do a funky darkened effect with it? EDIT 2: Here's a clue - any color I fill it with, it still becomes white afterward. Just thought I should add that. EDIT 3: Sorry, it looks like it IS filling and clearing the rest of the lines on next draw, but still only white. My guess is to why the lines look like that, is because they no longer have anything transparent to create different alpha states. LP0 ON FIRE fucked around with this message at Sep 29, 2010 around 04:08 |
| # ? Sep 29, 2010 03:50 |
|
Solved the problem by attaching myBitmap to a movie clip, ( bitmap_mc.attachBitmap(myBitmap, 2); ) filling, and then removing both movie clips and creating new clips. Maybe not the best solution but works like a charm. Complete code listing if anyone wants to play around with it. I'd like it to be faster if anyone has suggestions. http://codepaste.net/jbazwf edit: Setting the interval to 1 makes it go a ton faster. Not used to having <30 be better. edit2: improved version can be viewed here: http://www.vectorsector.net/vectorDraw/vectorDraw.html I'm going to go all out and make a simple language for it. LP0 ON FIRE fucked around with this message at Sep 30, 2010 around 18:08 |
| # ? Sep 29, 2010 14:18 |
|
Hey gang, I am working through the book "Foundation Game Design with Flash" and am having a problem with one of the projects. Since I am having no luck with the book forums, I thought I'd pester the SA forums with my question... I keep getting this error 1046: Type was not found or was not a compile-time constant: bomb. I checked to make sure that bomb has an instance name and that the .fla class is pointing to the .as file. but those two are set correctly. Any insight on this? http://www.filefactory.com/file/b3b...Playground2.rar
|
| # ? Sep 30, 2010 17:40 |
|
swf runs swimmingly on in Windows, fucks up on mac. I've been passing an fla back and forth with a designer. When I run the swf on my Windows 7 machine at home it works perfectly, but when we run it on his OSX machine it fucks up. The main issue revolves around a couple parts that rely on a event listener. It almost seems like when it runs in OSX the event doesnt always fire? Initially he had CS3, but upgraded to CS5 and the same problems stayed. Any known problems like this? Crossposting this in the Adobe forums as well. here's the code that sets the listener (sorry for the formatting, it was this or crazy wide from working on a wide screen monitor) code:code:
|
| # ? Oct 5, 2010 03:47 |
|
The number one reason for events not firing are the loaders being garbage collected. In this case it doesn't look like its doing that, it could be something about code on frames, make sure you put a stop() in there, could help, but unlikely. Also anonymous functions are fairly terrible, try splitting it out like: code:Finally keep your event types the same, in one place you use: SSPCustomNav.DRAW and in another you just use 'draw'
|
| # ? Oct 5, 2010 17:03 |
|
There's nothing wrong with anonymous functions, used properly. But in this case a proper named method is better. Also, I find the use of bracket syntax to access properties a bad sign, and reaching up the display list via "parent.parent" (multiple times!) is awful. But not technically wrong. Do make sure that the event constant SSPCustomNav.DRAW is exactly "draw" (case counts). Your dispatchEvent line does not create a bubbling event, so I hope that that function is in your theNav instance and not some child clip. I do not see the actual call to load in the code you posted. That means it might have already completed by the time you add the COMPLETE listener, and then the DRAW listener would never have been added. Here's some updated code that fixes my pet peeves. In wherever load is called: code:code:code:
|
| # ? Oct 5, 2010 19:13 |
|
5TonsOfFlax posted:There's nothing wrong with anonymous functions, used properly. Anonymous functions in general can be used for plenty of good, used in listeners is almost always a bad idea, forget to clear the listener in the function and you've made memory unclearable.
|
| # ? Oct 5, 2010 21:51 |
|
I've got my basic movie player coded! It passes the location of the mp4 as well as the color of the play/pause button through flashvars. If, in HTML, I set the size of the SWF, the mp4 scales proportionally, leaving letterbox if it's not the right ratio. This is perfectly fine and what I want. However, the play/pause movie clips also understandable scale. I don't want that. Is there a way either in flash or, preferably via flashvars, to set the play and pause movie clips to be a set pixel size regardless of how big the swf is?
|
| # ? Oct 6, 2010 13:09 |
|
The Merkinman posted:I've got my basic movie player coded! Two ways to do it, either you set stage.scaleMode to StageScaleMode.NO_SCALE. If you do this you have to position your buttons correctly based on stage.stageWidth and stage.stageHeight, and scale your video in the same way. The other way is to leave the scaling as normal, and calculate the current scale ratio yourself, with exportedWidth/Stage.stageWidth, and scale your buttons down by that amount.
|
| # ? Oct 6, 2010 14:46 |
|
iopred posted:Two ways to do it, either you set stage.scaleMode to StageScaleMode.NO_SCALE. If you do this you have to position your buttons correctly based on stage.stageWidth and stage.stageHeight, and scale your video in the same way. It's all ratios? There's no way to tell the play/pause to be exactly 50px in both width and height regardless of the scaled swf without doing math and manually putting in a scale percentage?
|
| # ? Oct 6, 2010 15:03 |
|
The Merkinman posted:The play and pause buttons are the exact center of the swf, even the registration for said buttons is the center. Sorry to be the bearer of bad news You can set the height/width of the buttons to be 50px, but that still gets scaled, so you need to do 50 * ratio
|
| # ? Oct 6, 2010 17:45 |
|
iopred posted:Sorry to be the bearer of bad news
|
| # ? Oct 7, 2010 12:48 |
|
The Merkinman posted:How do players like JWPLayer work? It seems the navigation is always the same height and the only interface that changes size is the scrub bar. They set the stage to NO_SCALE and may or may not re-position everything in a CHANGED event. The only thing that needs to be scaled at that point is the video.
|
| # ? Oct 7, 2010 16:20 |
|
iopred posted:They set the stage to NO_SCALE and may or may not re-position everything in a CHANGED event. The only thing that needs to be scaled at that point is the video.
|
| # ? Oct 7, 2010 20:09 |
|
The Merkinman posted:I see, well unfortunately I have no idea how to do any of that. I'm guessing the fact that I only have two movie clips (play and pause) and they're each in the exact center would make things easier? Heres an example, contains everything you need to know. http://superinterwebnethighway.com/files/reposition.fla
|
| # ? Oct 8, 2010 16:30 |
|
iopred posted:Heres an example, contains everything you need to know. EDIT: Made a few changes to the code, but it all works now, thanks! The play pause buttons can have their size and color changed via flashvars and the video source is the same way. Now we can use this swf for a variety of sites and never have to edit it directly! The Merkinman fucked around with this message at Oct 8, 2010 around 20:17 |
| # ? Oct 8, 2010 18:10 |
|
How does one embed xml files in flash? I have seen a few ways but it seems very painful if there are more than a handful of xml files.
|
| # ? Oct 9, 2010 23:18 |
|
|
| # ? May 19, 2013 11:42 |
|
I'm trying to style some text in a dynamic text box using html. It accepts the coding and shows all the proper line breaks, but it overrides the text styling with the settings that are applied in the properties box on the stage, so it's not showing bolded text or size changes at all. I tried deleting those settings but it just defaults back to the last settings I had. Ideas?
|
| # ? Oct 14, 2010 16:02 |



















