Search Results

Search found 6564 results on 263 pages for 'flash cs4'.

Page 129/263 | < Previous Page | 125 126 127 128 129 130 131 132 133 134 135 136  | Next Page >

  • Find most right and left point of a horizontal circle in 3d Vector environment

    - by Olivier de Jonge
    I'm drawing a 3D pie chart that is rendered with in 3D vectors, projected to 2D vectors and then drawn on a Graphics object. I want to calculate the most left and right point of the circle The method to create a vector, draw and project to a 2d vector are below. Anyone knows the answer? public class Vector3d { public var x:Number; public var y:Number; public var z:Number; //the angle that the 3D is viewed in tele or wide angle. public static var viewDist:Number = 700; function Vector3d(x:Number, y:Number, z:Number){ this.x = x; this.y = y; this.z = z; } public function project2DNew():Vector { var p:Number = getPerspective(); return new Vector(p * x, p * y); } public function getPerspective():Number{ return viewDist / (this.z + viewDist); } }

    Read the article

  • How would you update 100+ variables if something is changed in a different class?

    - by N. Lucas
    I have a class Grid which produces a graph paper like grid on in the drawing area. I then have 5 other classes for different shapes to draw with; Line, Polygon, Ellipse, Curve, Arc Now, these 5 classes use an instance of Grid because Grid has a resolution and a scale. Inside Grid I have: public function set resolution(x:Number):void { _gap = (modBy10(x) / 10); _scale = (modBy10(x) / (this.resolution * _scale)); draw(); } public function get resolution():Number { return (_gap * 10); } public function set scale(x:Number):void { _scale = (this.resolution / x); } public function get scale():Number { return _scale; } /**/ public function scaleLength(x:Number):Number { return (x * this.scale); } public function scaleLengthDown(x:Number):Number { return (x / this.scale); } public function scaleArea(x:Number):Number { return (x / Math.pow(this.scale, 2)); } I'm just lost for a solution on how to update every instance of my 5 drawing classes when Grid is changed. For instance, Polygon is made up of multiple instances of Line, Line(length, angle) where "length" is in either in, ft, cm, or m. If the user wishes to change the scale from say 10ft per 100px resolution.. Is there an easier way than re-drawing every Line inside Polygon?

    Read the article

  • as3 dynamic button name capturing problem

    - by user16458
    i am using this code below to dynamically capture the name of the button pressed and then playing the related balloon movie clip animation. stage.addEventListener(MouseEvent.CLICK, player); function player(evt:MouseEvent){ var nameofballoon = evt.target.name; nameofballoon =nameofballoon.substring(nameofballoon.length-1,nameofballoon.length); var movie = "balloon"+nameofballoon; trace(movie); movie.gotoAndPlay("burst"); } i'm getting this error even though the name of the clip capture by the event is correct TypeError: Error #1006: value is not a function. at Balloons2_fla::MainTimeline/player() any thoughts ? what wrong with this code?

    Read the article

  • AS3 Pass parameter by value

    - by alejandrobog
    Hi, im having problems with the following code: for (var i:Number=0; i<numFaces;i++){ var faceLoader:Loader = new Loader(); faceLoader.contentLoaderInfo.addEventListener( Event.INIT, function(fle:Event){ LoadCara(i,faceLoader); trace("LoadCara:" + i.toString()); } ); } function LoadCara(index:int,loader:Loader){ if(index == 0) { trace("cara1:" + index.toString()); cara1.removeChildAt(0); cara1.addChild(loader); } else if(index == 1) { cara2.removeChildAt(0); cara2.addChild(loader); }} The problem is that im sending the variable i to the function LoadCara on every iteration, and its always called with the last value of i. I would like this function to be called with the appropiate index. Hope I explain myself, thanks in advance.

    Read the article

  • Can I use a string variable to reference a class variable?

    - by rson
    Here's the scenario: I have an external swf file with x number of movieclips in its library that I load into a containing swf. Each MC in the external swf is linked with a class name and referenced on frame 1 as such var unique1:lineSequence1 = new lineSequence1(); the unique1 variable name will match a string variable I create in the containing swf: function initLines():void{ lineLoader = new Loader(); lineLoader.load(new URLRequest("theLines.swf")); //load external swf lineLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, linesLoaded); } function linesLoaded(e:Event):void{ var loadedswf:MovieClip = e.target.content as MovieClip; var initialLines = projects[0].pageid; //projects is an xmllist trace("initialLines: "+initialLines); //returns "initialLines: unique1" lines_holder_mc.addChild(loadedswf.[initialLines]); } I would like to use the initialLines variable as the reference to unique1 instead of hardcoding unique1 into loadedswf.unique1 to reference said variable in the loaded swf.

    Read the article

  • Flex: -frames.frame

    - by Michael Brewer-Davis
    Has anyone used this successfully or found further documentation than just the below (from the Adobe site): frames.frame label class_name [...] Specifies a SWF file frame label with a sequence of class names that are linked onto the frame. This option lets you add asset factories that stream in after the application that then publish their interfaces with the ModuleManager class. The advantage to doing this is that the application starts faster than it would have if the assets had been included in the code, but does not require moving the assets to an external SWF file. This is an advanced option.

    Read the article

  • Enable clipboard functions in swf generated by pdf2swf.

    - by user515
    I am using pdf2swf (http://www.swftools.org/) to convert PDF's to .swf. I have written a flex application that loads the swf generated by pdf2swf. I want to enable select , copy and paste functions on the loaded swf. Is there a way to do this. Please note I am able to extract the text from the loaded swf using textSnapshot, which means the pdf2swf does not convert the text to shapes.

    Read the article

  • Flex graph printing

    - by vanzylv
    Hi Guys I'm looking for a way to print / save flex graphs, preferably without changing the flex code.Is this possible to to from the client with some kind of JavaScript library.If I need to change the flex,is ALIVEPDF the way to go (converting content to pdf first) or are there simpler solutions to this. Thanks

    Read the article

  • Uploading or writing to files contained within s3

    - by Chase
    We have a widget that needs to be hosted on s3 due to a bunch of hoopla that isn't relevant to the issue. I'd explain if it was worth the time. Problem is it calls an external XML file for part of its content. The XML file is accessible if it is local on s3 but I cannot get my php file to write to it on s3. The widget could also be useful if I could access the xml file elsewhere but s3 does not seem to permit this. Suggestions? Here's the error I'm getting when trying to write to S3. [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections.

    Read the article

  • Does window.open not work inside an AIR html component?

    - by John Isaacks
    I have a component in AIR like so: <mx:HTML id="html" width="100%" height="100%" location="https://example.com" locationChange="dispatchLocationChange(event)" /> The page it loads contains this: <a onclick="alert('onclick')">Alert</a> <a href="javascript:alert('js')">Alert</a> <a onclick="window.open('http://www.google.com','_blank')">new window</a> The 2 alerts both work. however nothing happens when you click the new window link. all 3 links works when in a real browser so I know its ok. Is there just no support for window.open in the AIR HTML component? or is this a bug? Is there a work around?

    Read the article

  • How can you buffer two online videos alternately while playing one of them?

    - by Rajats1234
    On my website, I want my user to be able to launch video 2 at any point in the middle of video 1 without waiting or refreshing the window. How can I buffer the two videos such that I buffer video 1 enough to let it start playing, and then buffer just enough of video 2 that if the user launches it at any point, he does not have to wait to view its first few seconds, and then I can come back and buffer the rest of video 1? If this is not possible, I could also look at buffering video 1 and 2 in parallel while playing only video 1. Thanks!

    Read the article

  • MovieClip changes Stage alignment

    - by Nicholas Cowle
    I am loading a MovieClip using MovieClipLoader. When the MovieClip starts playing, it changes the alignment of my stage to LT, which incorrectly repositions all the other objects on my stage. Is there anyway for me to: Prevent the MovieClip from changing the alignment of my stage? Adding an event handler to an appropriate event, so that I can reset the stage alignment when it gets changed? I have already tried resetting the stage alignment on the onLoadInit event of MovieClipLoader and the onEnterFrame event of MovieClip, but both seem to reset the alignment too soon.

    Read the article

  • Calling As function from js problem

    - by Gene
    I have a swf file that is not controlled by me. The swf expects a javascript call to set some variables after initialization. The swf is embedded using the swfobject and I'm trying to call the as function right after the embed. This appears to be too soon because I get an error. Everything else should be fine since calling the as function manually via firebug does not produce the error. So the question is how do I call the function when the embed is complete?

    Read the article

  • parent pass text string to child swf, as3

    - by VideoDnd
    Parent loads Child, and wants to pass text string to Child. How can Parent pass a string to Child swf? PARENT.SWF //LOAD CHILD 'has a symbol on stage called LDR that CHILD loads into' var loadCHILD:Loader = new Loader(); LDR.addChild(loadCHILD); var bgURLTxt:URLRequest = new URLRequest("CHILD.swf"); loadCHILD.load(bgURLTxt); //ATTEMPT TO COMMUNICATE WITH CHILD TXT function handler(event:Event):void { LDR = (event.target.loader.content as MovieClip); var textBuddy:MovieClip = event.target.content.root.txtBuddy; //MY TEXT var txtTest:String; txtTest = "my bad"; trace(txtTest); } CHILD.SWF 'has DynamicTextfield called txt'

    Read the article

  • How do you detect an area that can be filled in in a bitmap in ActionScript 3?

    - by 1.21 gigawatts
    I am having a tough time figuring this out. I need to be able to detect a fill area for something similar to a coloring book picture. The user will click inside the area that needs to be filled. The image is user created bitmap content and so the fill area must be detected at runtime. Any help would be tremendously appreciated! Posting Flex 4 code for review: <fx:Script> <![CDATA[ protected function myImage_clickHandler(event:MouseEvent):void { myImage.imageDisplay.bitmapData.floodFill(event.localX,event.localY,0xFFFFFF); } ]]> </fx:Script> <s:Image id="myImage" click="myImage_clickHandler(event)" source="/images/square.gif"/>

    Read the article

  • Use selenium to click on a swf

    - by JLau
    I'm trying to use Selenium IDE to click on a swf in a html page. The DIV id and Embed id change depend on the timestamp e.g. id="FLASH_0_23458974594", I've tried using id=/^FLASH_([0-9]+_)0-9/ or id="FLASH_glob:*" but the IDE is not picking up the swf. Am I doing something wrong here? Thanks.

    Read the article

< Previous Page | 125 126 127 128 129 130 131 132 133 134 135 136  | Next Page >