ActionScript 3.0 :: StartDrag Not Working Within A Loaded Swf?

Oct 14, 2009

I'm trying to work with a movie clip that I am loading into my main SWF. When run alone the draggable rail works fine but once loaded into the actual main SWF it won't drag. I put an on EnterFrame on it so that when I click it reads out some data and that still works within the main swf. Is there some sort of restriction on what loaded content can do?

import flash.display.MovieClip;import flash.events.MouseEvent;
var upper_left = rail.x;var upper_top = rail.y;var travel = rail.height-handle.height;

[Code].....

View 12 Replies


Similar Posts:


ActionScript 3.0 :: StartDrag() Not Working When Loaded Into A Bigger Movieclip?

Oct 8, 2010

I am working on a simple drag and drop game which works fine by itself.

But the problem is that when this slide is loaded into a bigger gameloader swf. The x axis does not update itself.

Thus when the draggerable gets drag, it moves in relative to gameloader's stage size instead of its own stage size..

Is there any ways that I can lock coordinates of the X and Y axis to that of the game instead of the gameloader?

View 0 Replies

ActionScript 3.0 :: Loaded External MP3 Player, StartDrag Not Working

Oct 23, 2010

all of the other buttons on an external movie are workign but the volume slider is not...

when i load the external file (the mp3 player) it works fine.

Code:
/* volumeStartDragging(event:MouseEvent):void
* Returns a mathematical value that we can use to adjust the volume
* the value is the relation of the volume ball to the line

[Code].....

View 1 Replies

ActionScript 3.0 :: StartDrag In 3D Not Working?

Apr 1, 2010

The Language Reference states:
 
"Three-dimensional display objects follow the mouse and Sprite.startDrag() moves the object within the three-dimensional plane defined by the display object. Or, if the  display object is a two-dimensional object and the child of a three-dimensional object, the two-dimensional  object moves within the three dimensional plane defined by the  three-dimensional parent object."
 
However, this does not seem to be the case.  I have a 2D object which is the child of a 3D object, but startDrag will not work on the child.  If I remove any tweens in code from the parent's rotationY then startDrag will work.    If I have any reference to rotationY it will not work, even if it is set to 0.

[Code]...

View 4 Replies

ActionScript 3.0 :: Can't Get StartDrag Working

May 20, 2009

I have a MovieClip with other MovieClips inside of it. On each of the MovieClips inside, I have added a MOUSE_DOWN event and in the handler, I call e.target.startDrag(false, null);

But it doesnt seem to work :/

I have traced out the target name. I have tried current target and traced out it's name. THey both trace correctly. The target is being reached and it is the corect target. But the startDrag function doesnt make the MovieClip draggable.

View 6 Replies

ActionScript 3.0 :: StartDrag() Not Working For Child?

Jan 20, 2011

I have a movie clip that I want to drag, but it gives odd behavior. If I add the MC using:addchild(MC)it works fine. The problem occurs when I try to add it as a child of another MC:base.addchild(MC)When I do it like this the drag does not work (nothing happens). If I drag the parent, the child drags with it, but attempting to drag the child on its own does not work.  The function used is:

function pickUp(event:MouseEvent):void {
if (drawMode == NONE) {
event.target.startDrag();

[code]........

View 11 Replies

ActionScript 3.0 :: StartDrag Within A Loaded SWF

Jun 16, 2011

I have an index file in which I load my external .swf. One of the external .swf has a drag and drop quiz. And as you can guess, the startDrag doesn't work! In fact, when I publish within Flash it works just fine, but when played within the index file, it stops working!

For your information : all my files are in AS3.
 
So here's a bit of my code.

var interbouton : Number = 10;
//I have 7 items that I can dragfor(var i:Number=0; i<7;i++){ var dragBtn :MovieClip = new Drag();

[Code]....

View 2 Replies

ActionScript 3.0 :: Enterframe StartDrag Not Working With RotationX?

Jun 10, 2009

I created a full flash template website loading external swf's.Lately, I managed to add a fake3D rotation with AS3 and CS4 to this global template with enterFrame.Problem : some of my external swf use a vertical scroller also using an enterframe function based on a startDrag bar with the x / y position of the mouse, the scroller dont work anymore.

View 8 Replies

Flash :: Canvas Moved On StartDrag() Without Calling Set X / Y Or Move() - How Does StartDrag() Exactly Work In As3 / Flex

Feb 11, 2011

i have an .as class that extends mx.containers.Canvas (it's a draggable border of a resizable component), it becomes draggable on MOUSE_DOWN and stops being draggable on MOUSE_UP, MOUSE_OUT and ROLL_OUT. before calling startDrag() i create a Rectangle to define the drag area, i also have a _dragging: Boolean variable to control if it's draggable at the moment. the problem is that when i click this border it jumps to a negative coordinate without calling startDrag or switching _dragging to true.

i've overriden get x, set x, get y, set y and move() methods in order to solve it but the only thing i got was the fact that position changes without calling coords setters or move(), but at the moment it's changed a getter is called and returns new (negative) value so my question is what happens on startDrag() and how to filter unwanted incoming coords values?

View 3 Replies

Actionscript 3 :: Flash - StartDrag() Within StartDrag() On Child MovieClip

May 19, 2011

as you can see, I have a container MC which I have added to the stage. I set its drag constraints using a Rectangle(). I then add the 'cat' child movieclip to the container, and I want this to be dragable too. However, as soon as I click on my cat when testing the MC. It shoots to point x=0 y=0 on the stage and doesn't move.

The container MC can be moved without any trouble.

If I remove the rectangle bounds from the containers startdrag() function. both MC's can be dragged without any issue.

//panning ability
my_x = 800 - myImage.width;
my_y = 480 - myImage.height;

[Code]....

View 3 Replies

ActionScript 3.0 :: Loaded Swfs Not Working When Loaded Through Xml?

Jun 10, 2010

I have a "photo" gallery that loads numerous SWFs through xml, one by one on click. All works fine. All my SWF work fine stand alone. But when I load them into the player, many swf dont work properly.in example, I have textinput textfields in many of the swfs, which work fine on their own but not when loaded into the player. Then I have a word search game that works fine when alone, not when in player. I can see there is something as my mouse cursor changes into the "button finger", but nothing visual.

All drag and drop assigments work fine etc. I have no idea whats up. I have receantly switched to as3 and in as2 there was _lockroot declaration that solved similar problems, but now in as3 (where it supposedly should be automatic) it doesnt work. As it seems that it cannot recognise it own stage value, or selection_focus when loadedinside another swf through xml.Using cs4, as3.

View 4 Replies

ActionScript 2.0 :: Loaded From XML Not Working?

Dec 25, 2005

I remember this was discussed earlier, but I cant find the right keywords MX2004 saved as player6 + AS1

The code:

Code:
stop();
menuLoaded = 0;
menuLength = 0;[code]....

View 9 Replies

FLV Play Options Not Working Once Loaded To Web

Oct 30, 2009

On my website: www.iferanart.com under the animations tab I have several animations that I embeded using Flash's premade option: "SkinOverPlay SeekStop.swf" player. The only change made to it was the color.My problem is that, as you can see when you go to the website and click on an animation, there are no play options at all.I have no idea what to do to fix this because when I publish preview they are there...but once I loaded the website to the server..nothing. The website is coded in AS3, built with Flash CS4.

View 3 Replies

ActionScript 2.0 :: Can Not Working On Loaded Movie?

Dec 17, 2009

i have a chat page in flash, that works.but when i load the chat true a loader (loadmovie) it works but only the cam is not working (own cam).in my chat.swf this works

if (Camera.names.length > 0)
{
cam = Camera.get();[code].....

to view a local copy of the cam.the same fuction works it i put it in the loader.swf but when the chat.swf is loaded into the loader.swf the fuction does not work anymore.also not working when loaded true the loader

cam.onStatus = function (data)
{
tracer.text = data.code;[code].....

and works when loading the chat.swf directly.viewing camstreams works, but publishing and local view dont works

View 2 Replies

ActionScript 3.0 :: Tab Order Not Working In Loaded Swf?

Jun 10, 2011

I have a movie with a scrollpane component that loads an external swf. The loaded swf has input text fields with tabIndex defined. When testing the external swf alone, the tab order works fine. When testing it within the main movie, it doesn't, probably because hitting tab focusses on the elements on the main timeline.

I have tried various things with tabChildren, stage.focus, tabEnabled to no avail - probably because I am not doing it right.

View 0 Replies

ActionScript 2.0 :: XLM Loaded SWF/PHP Form Not Working?

Jan 7, 2006

I am using XML to load an external SWF that has a form using PHP. (Tutorial from, also using XML box resize tutorial to load from with XML) The form works, as far as sending the email correcly, but it does not goto the next frame that says with back button, so it may be confusing to the user if it doesn't do anything when the click send.On the form it has this actionscript attached:

onClipEvent(data){
// show welcome screen
_root.nextFrame();

[code].....

View 2 Replies

IDE :: Links Within Dynamically Loaded MC Not Working?

Apr 17, 2009

I have several external SWFs loading into another SWF shell that contains all the files. The problem that I am running into is when some of the external SWF's are loaded into the shell the links stop working. I am using the getURL script to call a javascript function on one link and the same getURL on another link to call the mailto function.

When I test these files on my system and the web, both individually and in the shell, everything works perfectly. However, as soon as I embed the shell SWF into an html page these links don't work and won't do anything. But other links in different external SWF using the getURL script to simply navigate to another html page works perfectly.

View 1 Replies

ActionScript 3.0 :: Fullscreen Not Working Correctly In Loaded Swf?

Dec 11, 2008

I have a swf loading an external SWF which is a video player. The video player loads fine into the SWF, but if I hit full screen it goes full screen but I cant see anything. Its all black. I can still see the "hit escape to exit" bubble thing.If I embed the video player by itself(ie. ISNT loaded into a swf) the full screen function works fine.

View 3 Replies

ActionScript 2.0 :: CS4: Loaded SWF OnRelease Function Not Working?

Aug 19, 2009

I am working in CS4, but using as2 as the publish setting since the swf I need to load in was previously done in as2.I have an interface that I am loading a logo.swf into. This logo has animation that works properly both in test and in the browser. There is, however, a function in the logo.swf that is not working.

this.onRelease = function() {
getURL("http://www.yourdomainhere.com");
}

When I test with the IDE this is clickable within the interface, but when I view via the webpage it is not. AllowScriptAccess was set to sameDomain, but I have also tried that set to always.

View 3 Replies

ActionScript 3.0 :: Files Loaded On Server Not Working?

Jan 26, 2010

If I run the site locally on a web server, it works fine. BUT, when I upload to my hosted server, it stops working.I have an SWF that loads another SWF, using a relative path and as I said, this works perfectly well until I upload it.Any ideas anyone.. has anyone had a similar problem. Am using Actionscript 3 and publishing to Flash Player 10. Just so you know

View 2 Replies

ActionScript 1/2 :: Rotation Not Working When SWF Is Loaded In Html?

Mar 18, 2009

I created a clock with an hour, minutes and seconds hand. The clock movieclip has two frames to it and on the first frame, the following code:

seconds = _global.clockTime*6;
minutes = (_global.clockTime/60)*6;
hours = ((_global.clockTime*30)/3600) + 120;

[Code]...

View 1 Replies

ActionScript 3.0 :: Scrollbar Not Working When Loaded Into External Swf?

Apr 13, 2010

I recently purchased a scrollbar from the exchange marketplace and it works beautifully within it's own swf but as soon as I load it into a second swf (the main "start movie") it doesn't work. When I click on it to scroll, the tracker sticks to my pointer (like a mouse follower) and won't release until I click on a button leading me into another movie. The scrollbar component came with an external caurina file which is where I think the issue is coming from. I think it's having trouble finding the associated code when inside the second movie.  I've tried all sorts of parent vs root scripts to try and get it to jump a level to recognize the source of the original code.

View 5 Replies

ActionScript 3.0 :: Banner Ad Not Working As External Loaded Swf

Feb 10, 2011

I built a banner ad which works fine when I test it in flash. I then put it inside another flash movie in which it is loaded as an external swf ,my portfolio, and it it loads and only runs the 1st line of code animation and I can see the text that is waiting (outside the visual dimensions of the banner) I am also getting this error....what is going on?

[Code]...

View 3 Replies

ActionScript 3.0 :: Button Not Working Under Loaded Content?

Aug 28, 2011

Plain and simple, I have a button that does not work if it exists on a layer below a loaded SWF. If I drag the button layer up above the layer where the eternal SWF is loading into and publish, the button works fine, yet if the button is below the layer that the clip is loading into it does not work at all, even when no content appears over the button. There is no button at all in the loaded clip that would interfere...

View 5 Replies

ActionScript 3.0 :: CurrentLabel Not Working On Loaded .SWF File?

Mar 18, 2012

I am trying to get this to work for ages but doesnt seem to work out quite well this is my code:

[Code]...

View 1 Replies

ActionScript 2.0 :: External Links Within A Loaded SWF Not Working?

Aug 18, 2009

I have my parent swf created with the external swfs loading properly.once they are loaded, the links within the externally loaded swf's are not working. Here is the code I am using:

on (release) {
//Movieclip GotoAndStop Behavior
this.gotoAndStop("first");
//End Behavior

[code]....

View 3 Replies

ActionScript 2.0 :: Drag Drop Not Working In Loaded Swf

Apr 1, 2010

I have a container which loads an external swf having drag drop functions. when the loaded swf is played separately it works fine. But when it is loaded into the container the dragging doesnt works. My coding for drag drop in the loaded swf is as follows.

on (press){
startDrag(_root.img1, true, 100, 130, 700, 700);
_root.img1.swapDepths(1);
b.stop();

[Code]....

View 1 Replies

ActionScript 2.0 :: SetMask Not Working With Loaded Images?

May 14, 2004

I am trying to use apply setMask to a movieclip which loaded external jpg's.

The set mask doesnt work and returns the following error:

*** Security Sandbox Violation ***
SecurityDomain 'domain@demoImageName.jpg'
tried to access incompatible context 'file:///C|/DOCUME%7E1/jay/LOCALS%7E1/Temp/Untitled%2D1.swf'

View 3 Replies

ActionScript 2.0 :: Working With Loaded Text - Animations?

Oct 12, 2005

Im having a tought time here with my text thats loaded from a xml file. It displays fine if its just in a movie clip thats just in one frame, but once i try to animate with the text ( like a side scrolling news header ) the text doesnt display. How am i supposed to work with the text?

View 8 Replies

ActionScript 2.0 :: Scroller Not Working With Loaded Xml Buttons

Sep 21, 2006

i attach some buttons according to the tutorial from kirupa to a "menu_mc" mc.everything goes well. the buttons do attach.. the text inside them is visible!i make a scroller (also from a tutorial from over here) that scrolls a "contentMain" mc.everything goes well.... it scrolls.when i put the menu_mc inside the contentMain...... the buttons do attach, the scroller works fine... but the text inside my buttons is not visible.

1. can you tell me what's the problem? why don't the texts show?

2. how can I call the "scrolling()" function from inside that contentMain mc ... without using _root ?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved