Search Results

Search found 309 results on 13 pages for 'cs4'.

Page 7/13 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • How can I get the width/height of a loaded swf's stage in AS2?

    - by loopj
    I'm using MovieClipLoader to load an external as2 swf file into my as2 flash project, and I'm having trouble getting the original stage size of the loaded swf. When I run the following code: var popup:MovieClip = _root.createEmptyMovieClip("popup", 1); var loader:MovieClipLoader = new MovieClipLoader(); var loadHandler:Object = new Object(); loader.addListener(loadHandler); loader.loadClip(url, popup); loadHandler.onLoadInit = function(mc:MovieClip) { trace(mc._width + ", " + mc._height); } I get strange width/height values (mc._width=601.95, mc._height=261.15) when what I actually want is the stage size of the loaded swf file, which in this case I know to be 300px x 250px. Any suggestions appreciated! Thanks

    Read the article

  • Drag/Drop movieclip event in JSFL? (Flash IDE)

    - by niels
    Lately im trying to do some experimental things with JSFL, and i was wondering if it is possible to listener for an event when a component (that i have made) or movieclip is dragged from library on the stage. i want to create something that i'll get a component and drop it on a mc. when the component is dropped on the mc the component will save the mc as a reference in some var. maybe with events isnt the way to go but i have no clue if this is possible or how to do it another way. i hope someone can help me get started thx in advance

    Read the article

  • guide on how to kick start template based flash website?

    - by rizxta
    I'm very new to flash and as3 design patterns. But I can read and write as3 quite ok, i've created small widgets with that. I've developed several web sites using php and also python. Now for a educational cd-rom project i'm working on, i've basically designed all templates (A home page, a generic page with navigation and a sidebar - kind of like a wordpress blog). I have all the data for the cdrom on word files, which i intend to place on xml files. My question is what is the best way to start a project like this? Can anyone guide me to a template or something that can be used for kickstarting this? kind of like a wordpress (without the admin)? Or am i on this all wrong? Can someone please help

    Read the article

  • Error 2025: The supplied DisplayObject must be a child of the caller

    - by Mocca
    Hi, sorry, new to actionscript 3. I have a display() function for an object rotator(image based like a QT object movie). It first saves the current image in a helper variable and then allocates a new image, from the library, beneath the old one. To get a nice crossfade effect, the old image's alpha is looped down via enter_frame and then removed. Which is where there seems to be an issue with the display list, maybe recognizing oldImg's value as being already added? (it's not a first pass error) Btw, do i have to remove the old image or can i leave it, for when it's being called up via the mouse position again? (the image number can get fairly large) Does anyone have further insight? Thanks! function display(num:Number):void //num: image number { ... oldImg = newImg; ClassReference = getDefinitionByName("Class"+num) as Class; imgBD = new ClassReference(0,0); newImg = new Bitmap(imgBD); images.addChild(newImg); newImg.x=0; newImg.y=0; } function onEnter(evt:Event):void { if (oldImg) { if (oldImg.alpha > 0) oldImg.alpha -= 0.15; **else images.removeChild(oldImg);** } ... }

    Read the article

  • Disabling repeating keyboard down event in as3

    - by psy-sci
    now I'm trying to make the keyboard events to stop repeating. My idea was to have a true and false condition for when the key is pressed so that it wont repeat if the key is down already. //Mouse Event Over keyCButton.addEventListener(MouseEvent.MOUSE_OVER, function(){gotoAndStop(2)}); //Variable var Qkey:uint = 81; //Key Down Event stage.addEventListener(KeyboardEvent.KEY_DOWN, keydown); var soundplayed = false; function keydown(event:KeyboardEvent){ if (event.keyCode==Qkey) { this.soundplayed=true;} } if (this.soundplayed==false){ gotoAndPlay(3); } else {} //Key Up Event stage.addEventListener(KeyboardEvent.KEY_UP, keyup); function keyup(event:KeyboardEvent){ if (event.keyCode==Qkey) { this.soundplayed=true; gotoAndStop(1); } } doing this just turns off the key event I think i need to add a "&& keyDown..." to "if (this.soundplayed==true)" but i dont know how to do it without getting errors here is the keyboard player i'm trying to fix http://soulseekrecords.org/psysci/animation/piano.html

    Read the article

  • Problem: Movie Clip contains just one frame

    - by Doug
    I'm a newbie at Flash, so started playing with a pretty standard code sample: one layer contains a movie clip with a flying rectangle, another layer has a button to control it. All script code is in Main.as file. The rectangle was named square1 through the Property window. Here is the problem: the constructor for Main has a line: square1.stop(); to prevent clip from playing, but it doesn't help - it plays. I know the constructor fires, because it has trace("stuff") in it. The code does check that the stage has been created. What strange is that square1.currentFrame always returns 1, and square1.totalFrames returns 1 as well. The layer has 24 frames on the timeline. I tried a tween with just 2 keyframes, then converted whole tween into frames - same result. I mean, the thing is flying before my eyes, how can it be 1 frame??? I even added a listener: square1.addEventListener(Event.ENTER_FRAME, onFrameChange); The event fires all the time, i.e. the frames change, but currentFrame is still 1. Also, tried to name individual frames and use square1.gotoAndStop("begin") and stuff like that. Nothing helps. I am really stuck with this stupid problem.

    Read the article

  • Flash and menu bar

    - by Marko
    Hi, I have a problem with my site in internet explorer. It works fine in firefox, opera etc. Sometimes internet explorer won't show my flash banner. For example when I'm on home page it works fine, but when i press services it doesn't show. Also, when opnend in older versions in IE the page get's completely mixed up. The banner doesn't show and the menu bar gets missplaced. Please help. My web site is www.md-telmark.hr ..... to view the page you should press the dot in the exclamation point in the "site under construction" picture. Thank you so much everyone!

    Read the article

  • ActionScript MovieClip moves to the left, but not the right

    - by Defcon
    I have a stage with a movie clip with the instance name of "mc". Currently I have a code that is suppose to move the player left and right, and when the left or right key is released, the "mc" slides a little bit. The problem I'm having is that making the "mc" move to the left works, but the exact some code used for the right doesn't. All of this code is present on the Main Stage - Frame One //Variables var mcSpeed:Number = 0;//MC's Current Speed var mcJumping:Boolean = false;//if mc is Jumping var mcFalling:Boolean = false;//if mc is Falling var mcMoving:Boolean = false;//if mc is Moving var mcSliding:Boolean = false;//if mc is sliding var mcSlide:Number = 0;//Stored for use when creating slide var mcMaxSlide:Number = 1.6;//Max Distance the object will slide. //Player Move Function p1Move = new Object(); p1Move = function (dir:String, maxSpeed:Number) { if (dir == "left" && _root.mcSpeed<maxSpeed) { _root.mcSpeed += .2; _root.mc._x -= _root.mcSpeed; } else if (dir == "right" && _root.mcSpeed<maxSpeed) { _root.mcSpeed += .2; _root.mc._x += _root.mcSpeed; } else if (dir == "left" && speed>=maxSpeed) { _root.mc._x -= _root.mcSpeed; } else if (dir == "right" && _root.mcSpeed>=maxSpeed) { _root.mc._x += _root.mcSpeed; } } //onEnterFrame for MC mc.onEnterFrame = function():Void { if (Key.isDown(Key.LEFT)) { if (_root.mcMoving == false && _root.mcSliding == false) { _root.mcMoving = true; } else if (_root.mcMoving == true && _root.mcSliding == false) { _root.p1Move("left",5); } } else if (!Key.isDown(Key.LEFT)) { if (_root.mcMoving == true && _root.mcSliding == false) { _root.mcSliding = true; } else if (_root.mcMoving == true && _root.mcSliding == true && _root.mcSlide<_root.mcMaxSlide) { _root.mcSlide += .2; this._x -= .2; } else if (_root.mcMoving == true && _root.mcSliding == true && _root.mcSlide>=_root.mcMaxSlide) { _root.mcMoving = false; _root.mcSliding = false; _root.mcSlide = 0; _root.mcSpeed = 0; } } else if (Key.isDown(Key.RIGHT)) { if (_root.mcMoving == false && _root.mcSliding == false) { _root.mcMoving = true; } else if (_root.mcMoving == true && _root.mcSliding == false) { _root.p1Move("right",5); } } else if (!Key.isDown(Key.RIGHT)) { if (_root.mcMoving == true && _root.mcSliding == false) { _root.mcSliding = true; } else if (_root.mcMoving == true && _root.mcSliding == true && _root.mcSlide<_root.mcMaxSpeed) { _root.mcSlide += .2; this._x += .2; } else if (_root.mcMoving == true && _root.mcSliding == true && _root.mcSlide>=_root.mcMax) { _root.mcMoving = false; _root.mcSliding = false; _root.mcSlide = 0; _root.mcSpeed = 0; } } }; I just don't get why when you press the left arrow its works completely fine, but when you press the right arrow it doesn't respond. It is literally the same code.

    Read the article

  • I'm trying to make lots of the same object appear randomly on the screen subject to conditions and k

    - by Katsideswide
    Hi! A good friend recommended this site to me, it looks really useful! I'm a bit of a shameless noob at actionscript and after 3 days of tutorials and advice I've hit a brick wall. I've managed to get a sensor attached to an arduino talking to flash using something called AS3glue. it works, when i set up a trace("leaf") for the contition that the sensor reads 0, i get a printout of the word "leaf". however i want the program to make a graphic appear on the screen when this condition is met, not just trace something. I'm trying to get the program to generate a library object called "Enemy" on the screen at a random position each time the conditions are met. It's called enemy because I was following a game tutorial...actually it's a drawing of a leaf. Here's the bit of the code which is causing me problems: var army:Array; var enemy:Enemy; function AvoiderGame() { army = new Array(); var newEnemy = new Enemy( 100, 100 ); army.push( newEnemy ); addChild( newEnemy ); } function timerEvent(event:Event):void { if (a.getAnalogData(0) ==0 && a.getAnalogData(0) != this.lastposition){ trace("leaf"); var randomX:Number = (Math.random() * 200) + 100; var randomY:Number = (Math.random() * 150) + 50; var newEnemy = new Enemy( randomX, randomY); army.push( newEnemy ); addChild( newEnemy ); } else if (a.getAnalogData(0) == 0) { //don't trace anything } else { //don't trace anything } this.lastposition = a.getAnalogData(0); //afterwards, set the position to be the new lastposition and repeat. } I've imported "import flash.display.MovieClip;" and the code for the Enemy class looks like this: package { import flash.display.MovieClip; public class Enemy extends MovieClip { public function Enemy( startX:Number, startY:Number ) { x = startX; y = startY; } } } Here's my error. I've tried googling, it seems like a pretty general error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at as3glue_program_fla::MainTimeline/timerEvent() at flash.utils::Timer/_timerDispatch() at flash.utils::Timer/tick() I've made sure that the "Enemy" object is exported for AS3. I'm going for something like this when it's programmed in AS2: leafCounter = 0; //set the counter to 0 counter.swapDepths(1000); //puts the counter on top of pretty much anything, unless you make more than 1000 leaves! counter.textbox.text = 0; //shows "0" in the text box in the "counter" movie clip this.onMouseDown = function() { //triggers when the mouse is clicked this.attachMovie("Leaf","Leaf"+leafCounter,leafCounter,{_x:Math.random()*Stage.width,_y:Math.random()*Stage.height,_rotation:Math.random()*360}); //adds a leaf to rthe stage with a random position and random rotation leafCounter++; //adds 1 to the leaf counter counter.textbox.text = leafCounter; //shows that number in the text box } I'm sure it must be a simple error, I can get the logic working when it just traces something on the screen but i can't get it to generate an "enemy" Any help or hints would be really useful! I know this is a bit of a ham-fisted job of altering existing code.

    Read the article

  • [as3] Movieclip.width returns higher value than Movieclip stage on Width.

    - by Sawrb
    I have a Movieclip on stage with nested movieclips inside. All referenced at 0,0. None of the child movieclips load any dynamic content, animate or have Masked Layers. It does have an input textfield in one of the child MCs. The parent MC shows 280 px width, while it returns 313 px with a .width trace. There is no code that alters the .width value of the parent MC at run-time. And the ParentMC on stage is not scaled (it is at 100% width/height). Any pointers, to what could be the reasons for the discrepancy in .width values on stage and on run-time? Its breaking the scaling code that follows.

    Read the article

  • Screenflow based application in Adobe Flex/Flash

    - by iceman
    I'm searching for some code samples for my Flash application. The app is based on screen-flows , i.e each screen is defined with some visual elements with some buttons which have async events associated with them(consuming web services basically). The buttons also have functionality to go back and forth between screens and jump to any screen. I want to define all of the visual elements and the functionality of the events in a XML file. Thus the model, view and controller are all in the XML. Does any framework allow this like Pure MVC? Where can I find some examples of this kind of functionality that I want?

    Read the article

  • Writing a program which uses voice recogniton... where should I start?

    - by Katsideswide
    Hello! I'm a design student currently dabbling with Arduino code (based on c/c++) and flash AS3. What I want to do is to be able to write a program with a voice control input. So, program prompts user to spell a word. The user spells out the word. The program recognizes if this is right, adds one to a score if it's correct, and corrects the user if it's wrong. So I'm seeing a big list of words, each with an audio file of the word being read out, with the voice recognition part checking to see if the reply matches the input. Ideally i'd like to be able to interface this with an Arduino microcontroller so that a physical output with a motor could be achieved in reaction also. Thing is i'm not sure if I can make this program in flash, in Processing (associated with arduino) or if I need another CS3 program-making-program. I guess I need to download a good voice recognizing program, but how can I interface this with anything else? Also, I'm on a mac. (not sure if this makes a difference) I apologize for my cluelessness, any hints would be great! -Susan

    Read the article

  • AS3: Element stays on stage after manipulating the index(depth)

    - by o15a3d4l11s2
    Here is the problem I have: after I change the index of one movieclip using this code oldIndex=getChildIndex(DisplayObject(e.target)); setChildIndex(DisplayObject(e.target), numChildren - 1); when I give the object its old index setChildIndex(DisplayObject(e.target), oldIndex); and go to another frame of the movie, this element I have changed the index of stays on top of all elements on the new frame. My question is am I doing something wrong and if not, what can I do so that this element stays only in the frame it is placed.

    Read the article

  • Playing multiple FLVs at the same time feasible?

    - by eb_Dev
    Hi, Is it feasible to play a number of FLV files at the same time on one SWF? Basically I have a brief to create a video banner with a number of FLVs of people playing at the same time but starting at different points in the videos. My concerns are with loading times, memory consumption and the starting of each FLV at a different point and looping it. The FLVs will be stored on a server and pseudo-streamed. Any tips would be greatly appreciated. Thanks, eb_dev

    Read the article

  • Creating a function within a loop (pointers?)

    - by user352151
    Im trying to create a simple loop that creates 50 buttons, adds them to screen and then when a button is pressed, it traces out that number. I can get it to work by doing stuff I consider hacky (such as using the buttons X/Y location to determine its value), but I'd rather just be able to hold a single value in the function. The code itself is: for (var a:int = 0; a < 5; a++) { for (var b:int = 0; b < 10; b++) { var n = (a * 10) + b + 1; var btt:SimpleButton = new BasicGameButton(); btt.x = 20 + b * 50; btt.y = 50 + a * 80; addChild(btt); btt.addEventListener(MouseEvent.CLICK, function f() { trace(n); } ); } } At the moment, whenever a button is pressed, it simply outputs "50". Is there a way of "freezing" the value of n when the function is created, for that function? (BasicGameButton is just a square button, created in the flash library) Many thanks.

    Read the article

  • How to connect lines in Flash CS4 to fill?

    - by Mike
    Hi, I drew a shape with the pen tool in Flash CS4. When I double click on the line it highlights the entire shape, but I can't fill for some reason. If I single click, only part of the line is highlighted (before it changes angle). How can I get this line to connect as a shape to invoke fill on it? Thanks, Mike

    Read the article

  • Cisco ASA not forwarding traffic from one interface to another

    - by Antoine Benkemoun
    Hello ServerFault, I am needing help in the configuration process of my Cisco ASA 5510. I have set up 4 Cisco ASA interconnected together via a big LAN. Each Cisco ASA has 3 or 4 LANs attached to them. The IP routing part is taken care of by OSPF. My problem is on another level. A computer connected to one of the LANs attached to an ASA has no problem communicating with the outside world. The outside world being anything "after" the ASA. My problem is that I am completely unable to have them communicate with another LAN connected to the same ASA. To rephrase this, I am unable to send traffic from one interface of a given ASA to another interface of the same ASA. My configuration is the following : ! hostname Fuji ! interface Ethernet0/0 speed 100 duplex full nameif outside security-level 0 ip address 10.0.0.2 255.255.255.0 no shutdown ! interface Ethernet0/1 speed 100 duplex full nameif cs4 no shutdown security-level 100 ip address 10.1.4.1 255.255.255.0 ! interface Ethernet0/2 speed 100 duplex full no shutdown ! interface Ethernet0/2.15 vlan 15 nameif cs5 security-level 100 ip address 10.1.5.1 255.255.255.0 ! interface Ethernet0/2.16 vlan 16 nameif cs6 security-level 100 ip address 10.1.6.1 255.255.255.0 ! interface Management0/0 speed 100 duplex full nameif management security-level 100 ip address 10.6.0.252 255.255.255.0 ! access-list nat_cs4 extended permit ip 10.1.4.0 255.255.255.0 any access-list acl_cs4 extended permit ip 10.1.4.0 255.255.255.0 any access-list nat_cs5 extended permit ip 10.1.5.0 255.255.255.0 any access-list acl_cs5 extended permit ip 10.1.5.0 255.255.255.0 any access-list nat_cs6 extended permit ip 10.1.6.0 255.255.255.0 any access-list acl_cs6 extended permit ip 10.1.6.0 255.255.255.0 any ! access-list nat_outside extended permit ip any any access-list acl_outside extended permit ip any 10.1.4.0 255.255.255.0 access-list acl_outside extended permit ip any 10.1.5.0 255.255.255.0 access-list acl_outside extended permit ip any 10.1.6.0 255.255.255.0 ! nat (outside) 0 access-list nat_outside nat (cs4) 0 access-list nat_cs4 nat (cs5) 0 access-list nat_cs5 nat (cs6) 0 access-list nat_cs6 ! static (outside,cs4) 0.0.0.0 0.0.0.0 netmask 0.0.0.0 static (outside,cs5) 0.0.0.0 0.0.0.0 netmask 0.0.0.0 static (outside,cs6) 0.0.0.0 0.0.0.0 netmask 0.0.0.0 ! static (cs4,outside) 10.1.4.0 10.1.4.0 netmask 255.255.255.0 static (cs4,cs5) 10.1.4.0 10.1.4.0 netmask 255.255.255.0 static (cs4,cs6) 10.1.4.0 10.1.4.0 netmask 255.255.255.0 ! static (cs5,outside) 10.1.5.0 10.1.5.0 netmask 255.255.255.0 static (cs5,cs4) 10.1.5.0 10.1.5.0 netmask 255.255.255.0 static (cs5,cs6) 10.1.5.0 10.1.5.0 netmask 255.255.255.0 ! static (cs6,outside) 10.1.6.0 10.1.6.0 netmask 255.255.255.0 static (cs6,cs4) 10.1.6.0 10.1.6.0 netmask 255.255.255.0 static (cs6,cs5) 10.1.6.0 10.1.6.0 netmask 255.255.255.0 ! access-group acl_outside in interface outside access-group acl_cs4 in interface cs4 access-group acl_cs5 in interface cs5 access-group acl_cs6 in interface cs6 ! router ospf 1 network 10.0.0.0 255.255.255.0 area 1 network 10.1.4.0 255.255.255.0 area 1 network 10.1.5.0 255.255.255.0 area 1 network 10.1.6.0 255.255.255.0 area 1 log-adj-changes ! There is nothing really complicated in this configuration. It just NATs from one interface to another and that's it. I have tried enabling same-security-traffic permit inter-interface but that doesn't help. I therefore must be missing something a little bit more complicated. Does anyone know why I cannot foward traffic from one interface to another ? Thank you in advance for your help, Antoine

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13  | Next Page >