Re: [Flashcoders] scrolling webpage with flash
Hi Cor, Have you seen BrowserCanvas? http://www.dncompute.com/blog/2008/06/23/browsercanvas-the-worlds-easiest-way-to-dynamically-resize-flash.html It sounds like exactly what you need and it works like a dream. Cheers, Amanda. On Fri, Jul 1, 2011 at 6:36 AM, Cor c...@chello.nl wrote: Eric, Thank you! That's exactly the problem. I don't know how to do this in javascript, etc. Best regards, Cor van Dooren www.codobyte.com -- There are only 10 types of people in the world: Those who understand binary and those who don’t. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto: flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Eric E. Dolecki Sent: donderdag 30 juni 2011 22:32 To: Flash Coders List Subject: Re: [Flashcoders] scrolling webpage with flash I think I know what you want. Have your app calculate how high it needs to be, then call out using javascript to a method which changes the dimensions of a div, where your SWF embed is made at 100%. It can keep calling that method. Just make sure your SWF has noScale, etc. set within it. I've done this to generate charts that are a dynamic height based on data to represent... the page will expand to accommodate the div so your SWF never gets clipped. Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki http://blog.ericd.net On Thu, Jun 30, 2011 at 3:32 PM, Cor c...@chello.nl wrote: Thanks Matt, Swffit works fine... when resizing the browser, but my issue is that the browser is never resized, but the content in the swf grows dynamically. So I would like to get my swf-dimensions variable. Best regards, Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Matt S. Sent: donderdag 30 juni 2011 17:50 To: Flash Coders List Subject: Re: [Flashcoders] scrolling webpage with flash then you should definitely check out SWFFIT, that can do what you're looking for. .m On Thu, Jun 30, 2011 at 11:38 AM, Cor c...@chello.nl wrote: I need loaded content to be able to grow within my SWF to any height. If this overshoots the html-height then the scrollbar of the browser will show. Best regards, Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Matt S. Sent: donderdag 30 juni 2011 17:33 To: Flash Coders List Subject: Re: [Flashcoders] scrolling webpage with flash Not sure what you need exactly, but SWFFit is a nice little utility for various flash resizing needs: http://swffit.millermedeiros.com/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] loadMovie from subdirectory - change base path
@Deepanjan Das, @JC Thanks for your replies! It seems that, despite my fondest hopes, there is no easy way to retro-fit hundreds of SWFs originally built without this loadMovie() requirement in mind. Cheers and thanks :-) On Jan 30, 2008 8:05 PM, Hans Wichman [EMAIL PROTECTED] wrote: Hi, check this out: http://objectpainters.com/blog/2007/01/03/where-am-i-relative-paths/ The getPath things works in most cases. If you want a more complex version that takes more things into account, you can use this: You will need to replace the RuntimeExceptions with your own error mechanism (eg traces, regular errors). /** * Resolves pAssetPath against pBasePath. * * - if pAssetPath is not a relative path, pAssetPath is returned (eg the full url) * - if pBasePath is an empty path, pAssetPath is returned * - if pBasePath is a relative path, an error is thrown * - in all other situation a path is returned which may still be or not valid. * * @param pAssetPath, a full or relative url * @param pBasePath, a full or empty url, this url MAY contain a file as well, it is stripped automatically * */ public static function resolve (pAssetPath:String, pBasePath:String):String { //no base path if (pBasePath == null || pBasePath.length == 0) return pAssetPath; if (pAssetPath == null) { throw new RuntimeException ( Assetpath cannot be null., Path, arguments.callee, null, null); } //file asset path if (pAssetPath.indexOf (http) == 0 || pAssetPath.indexOf (ftp) == 0 || pAssetPath.indexOf (rmtp) == 0 || pAssetPath.indexOf (file) == 0) return pAssetPath; //asset is relative, test basepath for correctness if (pBasePath.indexOf (http) != 0 pBasePath.indexOf (ftp) != 0 pBasePath.indexOf (rmtp) != 0 pBasePath.indexOf (file) != 0) { throw new RuntimeException ( Basepath is not null and not a full url, but needs to be either empty or a full url., Path, arguments.callee, null, null); } //so now we know that pAssetPath is a relative url and pBasePath is a full url. //first normalize both urls so that we are dealing with only one type of separator var lAssetPath:String = pAssetPath.split (\\).join(/file://%22).join(%22/ ); var lBasePath:String = pBasePath.split (\\).join(/file://%22).join(%22/ ); //strip everything after ? to strip parameters from basepath if (lBasePath.indexOf(?) -1) { lBasePath = lBasePath.substr (lBasePath.lastIndexOf(?)); } //check if basepath ends with /, if not check if everything after / contains a . //if it ends with / it is a directory, if it doesnt end with / and everything after contains a . we assume //we are dealing with a file, otherwise a directory if (lBasePath.charAt (lBasePath.length-1) != /) { //and the last part contains a . cut it off var lLastDir:String = lBasePath.substr (lBasePath.lastIndexOf(/)); if (lLastDir.indexOf (.) != -1) { //dealing with file lBasePath = lBasePath.substr (0, lBasePath.lastIndexOf(/)+1); } else { //assume the last part was a dir and the trailing slash was forgotten, so add it lBasePath += /; } } //at this point we have a relative url and full directory path with a trailing / //now create two stacks var lAssetStack:Array = lAssetPath.split (/); var lBaseStack:Array = lBasePath.split (/); //remove trailing / from baseStack to provide a correct starting point, //our invariant is that each directory 'starts' with a slash and not ends lBaseStack.pop(); //remove any superflous items (pointers to current directory //. points to current dir and isnt relative // points to double slashes or a starting slash, we remove that too while (lAssetStack[0] == . || lAssetStack[0] == ) { lAssetStack.shift(); } //remove .. from assetStack AND end of basestack while (lAssetStack[0] == ..) { lAssetStack.shift(); lBaseStack.pop(); } return lBaseStack.join(/)+/+lAssetStack.join(/); } Usage eg: xml.load (Path.resolve (assets/config.xml), _clip._url)); greetz JC On Wed, Jan 30, 2008 at 6:24 AM, Deepanjan Das [EMAIL PROTECTED] wrote: Hi, You need to keep duplicate files if you want it to work as single and also when loaded from main movie. Easiest way is to create an xml directory at the place where the main movie resides and set the path as xml/1.xml also copy this directory in the screens directory so ths ame path will work for both :) Hope this helps Deepanjan Das On Jan 30, 2008 10:10 AM, confusticate and bebother these dwarves! [EMAIL PROTECTED] wrote: Hello Flashcoders, I'm trying to make a main movie (controller.swf) that loads other movies (screen1.swf, screen2.swf, etc), which are stored in a subdirectory called screens. In controller.swf I'm using loadMovie(screens/screenx.swf) to load the movies from the screens subdirectory, and this works fine. But the problem is that the movies in the screens
Re: [Flashcoders] seekBar and volumeBar Handle conflict
Hello Jamay, This doesn't directly answer your question, but I found that when I was in the same situation as you (ie, making customised controllers for an FLV player), the flvPlayback components weren't really the ideal answer for me. They seemed quite difficult to customise as well as adding enormously to file size. I found that Lee Brimelow's series of tutorials[1] were really helpful to make your own flv playback controls. It doesn't cover making a volume slider, but you can make it pretty easily yourself after following the whole series. Or if not, you can contact me off-list and I'll send you the code I ended up using. Hope that helps! [1] http://www.creativecow.net/show.php?page=/leaders/brimelow_lee/brimelow_lee.html. The first one, Flash Video Basics: Part One, is right at the bottom. On 3/1/06, Jamay Liu [EMAIL PROTECTED] wrote: Hi, I am trying to build a customized controller for my flv player with the flvPlayback components. For some reason, I can't get the SeekBar and the VolumeBar to behave properly together. They work fine when either is alone on the controller, but when they are both present, the seekBar handle doesn't drag when it is supposed to. Sometimes, a yellow rectangle flashes around the OTHER handle (on the volume bar) instead. Is this a bug? Anyone know how to fix it? I tried moving the handle around on the stage, but that didn't work. Thanks! -J ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] status bar humbug
Thanks for your reply Paul, What I found was happening was, something like window.status=msg only had effect if one was getting it off the webserver. It didn't work on the version on my local machine. Glad that's sorted out! On 10/01/06, Paul BH [EMAIL PROTECTED] wrote: The solution I am using is much the same as yours: //JavaScript: function displayStatus(theStatus){ var msg = theStatus; window.status = msg; } Bear in mind though that this will not work in Firefox (and possibly Safari - havent checked on a mac) - on these browsers, Javascript cannot be used to change the status bar unless the user has specifically allowed it... hth PBH ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] rotate mc through press+drag?
Thanks Robert for your help. Just for the record, I have the following code on the mc at the moment - hold down shift and drag the mouse for rotation to occur. It's not very good - I'm still trying to improve it, to remove that rotation jump you can see when you first hold down shift and drag the mouse. onClipEvent (load) { clicked = false; } onClipEvent (enterFrame) { X = this._x; Y = this._y; if (this.hitTest(_root._xmouse, _root._ymouse, true) Key.isDown(1)) { clicked = true; this.startDrag(); } if (Key.isDown(Key.SHIFT) clicked == true) { this.stopDrag(); Xm = _parent._xmouse; Ym = _parent._ymouse; Xdiff = Xm-X; Ydiff = Ym-Y; radAngle = Math.atan2(Ydiff, Xdiff); this._rotation = radAngle*360/(2*Math.PI); } } onClipEvent (mouseUp) { if (this.hitTest(_root._xmouse, _root._ymouse, true)) { clicked = false; this.stopDrag(); } } On 15/11/05, Robert Wąs [EMAIL PROTECTED] wrote: I explayned only an idea. I can't help you ;) especially if i not see your code. Robert Wąs Amanda Kuek wrote: I gave this a go, (and fixed up a few things) but for some reason, the function rootateLoop is never actually called. Would you have any idea why? On 14/11/05, Robert Wąs [EMAIL PROTECTED] wrote: Simple recipe: carMC.rotateButton.onRelease=function(){ this._parent.intvId=setiInterval(this._parent.rootateLoop) } carMC.onPress=function(){ this.pressed=true } carMC.onRelease=function(){ clearInterval(this.intvId) } //you have registration point in centre of car carMC.rootateLoop=function(){ if(!this.pressed)return var rotation=Math.atan(Math.tan(this._ymouse/this._xmouse))*180/Math.PI /* there some stuff with cyclic's properties of tangent function, type: if(this._xmouse0 this._ymouse0) { rotation= -1 *rotation } //sory but not have free time for real results */ this._rotation==rotation } Robert Wąs ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] [thelist] rotate mc through press+drag?
Hello all, I didn't think I'd have to break my brain over this one, but here I am again, putting my thick skin on the line. In my SWF, there are a whole bunch of car movieclips. When the user clicks add new car or something similar, the original Car movieclip is duplicated and plopped somewhere appropriate on the stage. These mcs can be dragged around by the user. What I'd like is for the user to be able to rotate these mcs (each one individually), much like one would be able to in Flash. ie, by click-hold-ing and dragging the mouse. Currently, my only working version relies on the user clicking the mc, then clicking rotate CW and rotate CCW buttons until it's at the right angle. It just doesn't seem to cut the mustard. So please, if anyone could help in any mustard-cutting, I'd appreciate it very very much. Thanks, Amanda. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] rotate mc through press+drag?
Argh, I'm a twit. I sent a message previously to Flashcoders with the subject line starting with [thelist] (which is for the evolt mailing list). I'm not sure if it'll go through, so I'm sending it again. Many apologies. - Hello all, I didn't think I'd have to break my brain over this one, but here I am again, putting my thick skin on the line. In my SWF, there are a whole bunch of car movieclips. When the user clicks add new car or something similar, the original Car movieclip is duplicated and plopped somewhere appropriate on the stage. These mcs can be dragged around by the user. What I'd like is for the user to be able to rotate these mcs (each one individually), much like one would be able to in Flash. ie, by click-hold-ing and dragging the mouse. Currently, my only working version relies on the user clicking the mc, then clicking rotate CW and rotate CCW buttons until it's at the right angle. It just doesn't seem to cut the mustard. So please, if anyone could help in any mustard-cutting, I'd appreciate it very very much. Thanks, Amanda. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash and ASP/MSSQL
Thanks James. It's a good idea, but I think for this project I'll go with the Javascript sets hidden form fields idea. But thanks for adding this idea to my spongey brain! On 31/10/05, JOR [EMAIL PROTECTED] wrote: I wouldn't hit the server until the location was considered final by the user. Maybe have a lock hole or finalize hole button in the flash movie that triggers the POST. It wouldn't work to put the POST on something like a mouseMove event and I'd be hesitant about using mouseUp either for the exact reason you mention. You don't want the user to keep hitting the server over and over for nothing. The advantage to using the session object would be for two different ASP pages... A) The one your Flash movie POSTs to behind the scenes and B) the one your HTML form POSTs to when the form is complete. In order for the two ASP pages to share data you need to store the X and Y locations somewhere they both can access. Session seemed like a logical place but you have other options like a database or even cookies. It's up to you what makes the most sense for your needs. JOR ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash and ASP/MSSQL
Thanks a heap Dominic and Richard! You're right - that flash demo at http://www.cybergrain.com/tech/demos/flashhtml/ was of extremely great use. It's always nice to do something for the first time in Flash, that you didn't think was possible. Cheers again. On 01/11/05, Dominic Fee [EMAIL PROTECTED] wrote: Hi Amanda This link may be of great use: Cheers Dom http://www.cybergrain.com/tech/demos/flashhtml/ On 31/10/05, Richard [EMAIL PROTECTED] wrote: Hi Amanda There's a reasonably simple javascript solution for you. Javascript !-- //sends var to form from your swf function setFormText(XYpos) { textobject = document.myForm.XYlocation; //change myForm to the name of your form textobject.value = XYpos; } //-- Add a hidden textfield to your form named XYlocation In Flash swf // var xStyle_fmt = new TextFormat(); xStyle_fmt.font = _sans; xStyle_fmt.bold = true; xStyle_fmt.size = 16; //-- this.onMouseDown = function() { this.createEmptyMovieClip(x_mc, ); with (this.x_mc) { this.createTextField(x_txt, 1200, _parent._xmouse-10, _parent._ymouse-10, 20, 20); //_xmouse-10 and _ymouse-10 places the centre of the text X at the mouse arrow point this.x_txt.setNewTextFormat(_parent.xStyle_fmt); this.x_txt.text = X; this.x_txt.textColor = 0xFF; } }; this.onMouseUp = function() { var XYpos = X= + this._xmouse + Y+ + this._ymouse; trace(XY+ + XYpos); getURL(javascript:setFormText(XYpos)) }; //-- HTH Richard ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash and ASP/MSSQL
On 30/10/05, Michael Bedar [EMAIL PROTECTED] wrote: You would need to call a javascript function from AS when the user clicks the inside swf and set the value of a hidden form field.. then the user can click the HTML send button and send everything. Thank you very much. I haven't done this before, but from some quick googling, I assume that one would use something like fscommand or getURL? The person who gave me the brief said something along the lines of Sure Flash can talk straight to a database! All you need to do is set the connection string or something! I hitherto hadn't realised this was possible - I've always thought you used loadVariables to call an (in my experience) ASP or PHP page that talked to the database. Can anyone clear this one up for me please? Thanks very much, Amanda. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash and ASP/MSSQL
Thanks very much everyone. Not only has it been explained very well, but I am now also armed with that highest of argument-stopping qualifications: People on Flashcoders said so! Cheers all! On 31/10/05, Benjamin Herholz | [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: [snip] - you have a html form with a flash movie embedded. - the html form calls a server side script to submit the data of the form to a database. - the html form can only send variables which are in its scope. - as you have a flash movie embedded in your form you have to make the variables of the flash movie available to the html form. -to do so, you have to send the the variables in the flash movie to the html form, or as Michael Bedar said: You would need to call a javascript function from AS when the user clicks the inside swf and set the value of a hidden form field. - you call a javascipt function from a flash movie like: getURL(javascript:processFlashData( + xVal + , + yVal + )); - the js function needs to write the variables into hidden fiels in the html form. one more thing: I've always thought you used loadVariables to call an (in my experience) ASP or PHP page that talked to the database. thats true, but you dont want to send the variables from the flash movie to the db, you want the html form to do that... ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash and ASP/MSSQL
On 31/10/05, Mick Gow [EMAIL PROTECTED] wrote: Have you thought about not using flash? You could create an imagemap (even though they're old hat) with about 15 pre-defined regions over an image (I'm guess that's as accurate as you need it). Clicking a region could run a javascript function that tells the form what region it is an submits it. I have suggested imagemaps actually, seeing as I'll essentially be creating an imagemap in Flash. Unfortunately, in this project, 'tis not for me to question why...Thanks for the suggestion though! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash and ASP/MSSQL
Hello there, On 31/10/05, JOR [EMAIL PROTECTED] wrote: Well, since you're using ASP you can take advantage of the Session object by storing the input from the flash movie in a session until the user submits the form. [snip] This is certainly an idea that hadn't crossed my mind. Is there any advantage to using the Session object? My only concern is that the user would constantly be hitting the ASP server whenever they position/reposition the marker (the marker for which the X,Y coordinates are stored). Thanks, Amanda. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Flash and ASP/MSSQL
Hello everyone, This is a question about Flash in an ASP form which communicates with an MSSQL db. I'm not really sure how to phrase the question, so I'm afraid that I'll just have to explain the story. Imagine an ASP page about faulty garments. Let's just say that if you had a hole in your T-shirt, you could visit this page to report it. The page would have normal HTML fields for name and email, and it would also have a SWF with a picture of a T-shirt. The disgruntled hole-y user clicks on the T-shirt to leave an X representing where the hole is. The form information (including that of the hole location, in the SWF) is then submitted using a normal HTML submit button and stored in the MSSQL db. I spose my question is, is this scenario possible? Is it only possible to store user-submitted information (in this case, the X,Y coordinates of the hole) by clicking on a Send button WITHIN flash, or is there another way? I'd like to avoid making a user explicitly submit the SWF information AS WELL AS the form information. Any ideas and comments much appreciated, Thanks muchly, Amanda. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders