Actionscript 3 :: Parent.AddChild Not Working After Protecting Swf Using SWFProtection?

Apr 22, 2011

I usually, use SWF Protection, to protect my swf's from decompiling. It also adds a load bar to the swf.

The problem is that I have codes like this:

logo= new marca();
parent.addChild(logo);
logo.mouseEnabled=false;

I use parent, because I need to put the movie clip above everything, because my application allows the user to add a lot of things to the stage, so a don't want anything covering the logo.

The application works well while unprotected, but If I protect it using SWF Protection, then, I get just white screen. Nothing appears after loading.

Is there another way, to put a movieclip above everything, without being necessery to add a ON ENTER FRAME LISTENER, to update the movieclip deph, to keep it above everything?

View 2 Replies


Similar Posts:


ActionScript 3.0 :: AddChild() Not Working On A Parent Class Of MovieClip

Oct 27, 2009

What I describe here is not correct. My full code had some other things in it that was the reason I couln't see mc2. The code described under is actually working!

I have custom class (MyContainer) that extends Sprite. Then:

Code:
var mycon:MyContainer = new MyContainer();
var mc1:Sprite = new Ball(); // Ball is a sprite in my library
var mc2:Sprite = new Ball();

[Code]....

it works, but I dont want that, as MyContainer has custom variables and functions I use. A simple: if (mycon is DisplayObjectContainer) evaluates to true.

View 0 Replies

ActionScript 3.0 :: Difference Between AddChild And Parent.addChild?

Aug 11, 2009

I'm trying to resolve an issue that reared it's ugly head yesterday.Frame one of main timeline I have the following code:

Code:
import flash.display.MovieClip;
import flash.events.MouseEvent;

[code]....

The newMC doesn't show up.If I add 'parent.' in front of the addChild then it appears.mc_LibItem has a base class of "flash.display.MovieClip" and is exporting for ActionScript and on frame one.For grins I created a new .fla and began messing around with the same addChild idea and it worked.

View 14 Replies

ActionScript 3.0 :: Referencing Stage - Add Bullets To The Stage Rather Than Using Parent.parent.parent.addChild?

Jul 10, 2009

I'm currently making a platform game and when the player shoots i want to add the bullets to the stage. The players gun class is in charge of adding bullets. The "players gun" is a child of "players gun holder" which is a child of "player" which is a child of the stage. is there a better or more dynamic way for the "players gun" to add bullets to the stage rather than using parent.parent.parent.addChild (bullet);

View 2 Replies

ActionScript 3.0 :: AddChild To Parents Parent?

Dec 19, 2009

There is the stage, the level object then the player object in the level. The player object has a sub-object that is a weapon. When I fire the weapon a bullet is to be placed on the level stage. At the moment I have this code in the weapon class when the weapon is fired.

[Code]....

(In case it helps you know my skill level, I'm currently reading Foundation Game Design with Flash by Rex van dur Spuy and am a PHP web developer, also played around with Flex - ActionScript is still new to me)

View 5 Replies

ActionScript 3.0 :: Parent Addchild Without Inherit Its X&y Coordinate?

Dec 27, 2010

Is there anyway to implement the parent addchild without its parent x and y coordinate?

ActionScript Code:
iamparent.x =100
iamparent.y=100;[code]....

the final coordinate of the child would be x=200, y=200. But, is there anyway that that i cant addChild with only respect to the coordinate of iamchild?

View 5 Replies

ActionScript 3.0 :: Changing Parent MC With RemoveChild() And AddChild()

Sep 6, 2011

I have a ball MC that is a child of a ship MC, and when the ship fires the ball I need to make the ball MC a child of the stage instead of the ship. Here's the code I have (contained in ball.as, this function is called when the ball is fired)

public function prep():void {
ship.removeChild(this);
screen.addChild(this);

[Code].....

View 4 Replies

ActionScript 3.0 :: AddChild Does Not Get The Child Sit Inside Parent Object

Oct 23, 2009

I am trying to get a circle shape and a text-field sit inside a square sprite, using addChild() method. Both the children seem not to agree sitting in the lap of their parent; and are sitting at a distance, instead. If I create a square symbol on the stage and run the application, everything is fine.

[Code].....

View 3 Replies

ActionScript 3.0 :: AddChild From Class To Parent In Main Package?

Feb 16, 2011

I have a main package that adds the background image to the project, from here on im trying to have seperate classes that add objects to the background as a parent and control these objects.my code in the main package:

package
{
import Dinos_Control;

[code]....

View 3 Replies

ActionScript 3.0 :: AddChild() Display The Movie Clip Outside Of The Parent?

Nov 9, 2011

I use the method addChild() to add a Movie Clip intoa nother one.mc1.addChild(mc2);But once the Movie Clip is added (and the second Movie Clip is higher than the first one) then it's displayed outside the first Movie Clip. Is there a way to prevent to display outside the parent?

View 6 Replies

ActionScript 3.0 :: AddChild(e.currentTarget) - Bring Cards Out Of Their Parent Column And On To The Main Stage When They Are Selected

Sep 30, 2011

I'm working on a spider solitaire game and I need a way to bring cards out of their parent column and on to the main stage when they are selected. Here's my current code:

[Code]...

However, the above gives me an error on the stage.addChild line. "1118: Implicit coercion of a value with static type Object to a possible unrelated type flash.display: DisplayObject."

View 1 Replies

ActionScript 3.0 :: AddChild Not Working In Some Classes?

Oct 8, 2010

I want to create a class named Principal which will be imported to the stage. This class Principal imports another class named Menu. And the application should do the same for any other 'division' of the website (content, footer etc).If i use the addChild in the Principal class, it works well. If i do the same in Menu, doesnt work. I cant 'return the box' to the Principal class and append the child there, but this will crack all the stuff.Now, the code:

Code:
package
{

[code].....

View 1 Replies

ActionScript 2.0 :: AddChild Not Working In TextField?

Jun 23, 2011

this is the very simple actionscript i tried to display one textfield but nothing will display is output

Script code:

package {
import flash.display.Sprite;
import flash.display.Stage;

[Code]....

View 1 Replies

ActionScript 3.0 :: AddChild Not Working In TextField?

Jun 23, 2011

this is the very simple actionscript i tried to display one textfield but nothing will display is output

Script code:
package {
import flash.display.Sprite;

[code].....

View 1 Replies

Actionscript 3 :: AddChild To Stage And AddEventListener Not Working Together?

Jul 18, 2011

I just wanna add an image from my library on the stage and have an event listener on it so when i click on it, it will do something. imgFromMyLib is already set to the image i want from my library.

import flash.display.Bitmap;
import flash.events.*;
import flash.display.Sprite;[code].....

View 2 Replies

ActionScript 3.0 :: AddChild Not Working With Library Clip?

Aug 16, 2009

I'm having a problem adding a library clip to my stageI can do no problem if I have a testFLV.fla that has a library clip called test_clip with the linkage set to: com.attach_clips.Clip.

Code:
import com.app.views.mediaDisplay;
import com.attach_clips.Clip;

[code]......

View 0 Replies

Actionscript 3.0 :: Flash's MovieClip AddChild() Is Not Working?

Sep 21, 2011

I have gotten the AR tutorials from [url]....and are having fun with the flarsquidderkit for multiple pattern detection.However I would like to have a start page, and a high score page for the game based on this, and have tough time figuring how to make the timeline code works for this.

flarsquidderkit have extended papervision3d and has its own 3DdisplayObject, and the flash's MovieClip addChild() is not working.how to extend the movieClip class when my document class has already extended another super class,and also if I can control the score via timeline instead of dumping every single thing in to the document class?

1180:Call to a possibly undefined method AddFrameScript
Code: Select allpublic class MultiFLARExample extends PVFLARBaseApplication {

View 2 Replies

ActionScript 3.0 :: Full Browser Not Working With AddChild?

Aug 31, 2009

Full Browser not working with addChild

I'm working on a full browser site - it has 3 MovieClips, header_mc, body_mc and footer_mc.

When the browser resizes, the header and footer stay the same height and the body height changes.

It's all working fine when I have the MovieClips on the stage and named.

[URL]

Code:
stage.scaleMode=StageScaleMode.NO_SCALE;
stage.align=StageAlign.TOP_LEFT;
//

[Code].....

View 3 Replies

ActionScript 3.0 :: Flash AddChild On ENTER_FRAME Not Working

Dec 16, 2010

I can't get my MC onto the stage. All I'm trying to do right now is just get the bloody thing to show up.

Here's my code. I'm not getting any errors, but my mc is not coming up. I have it set to export for Flash.

import flash.display.MovieClip;
import flash.display.StageAlign;
import flash.display.StageScaleMode;

[Code].....

View 8 Replies

ActionScript 3.0 :: AddChild Not Working With Library Clip (attachMovie Migration)?

Aug 16, 2009

I'm having a problem adding a library clip to my stage I can do no problem if I have a testFLV.fla that has a library clip called test_clip with the linkage set to: com.attach_clips.Clip.
 
import com.app.views.mediaDisplay;import com.attach_clips.Clip;
public class FLVTest extends Sprite {    private var _mediaDisplay:mediaDisplay;        public function FLVTest()     {        this._mediaDisplay = new mediaDisplay(null);        var clip_1_mc:Clip=new Clip();        var clip_1_mc:Clip=new Clip();        this.addChild(clip_1_mc);        clip_1_mc.x=100;    }}
 
If I use the same concept in my mediaDisplay class, the clip isn't added to the stage.   Obviously it's got to be a scope issue since 'this' in the first examplerepresents the .fla itself but in mediaDisplay this doesn't have a stage object.
 
package com.app.views {
 import flash.display.Sprite;    import com.attach_clips.Clip;        public class mediaDisplay extends Sprite     {    public function mediaDisplay(attachControls:Sprite)         {            var clip_1_mc:Clip=new Clip();            this.addChild(clip_1_mc);            clip_1_mc.x=100;         };    }}
   
how I could 'attach' test_clip to the stage from mediaDisplay?

View 13 Replies

ActionScript 3.0 :: DispatchEvent To Parent Not Working?

Sep 9, 2009

As I'm working on a simple XML photo gallery, I am having a bit of trouble making my Slide class successfully dispatch an MOUSE_OVER and MOUSE_OUT event to the Main class.

Main.as

Code:
// add a new slide
var slide:Slide = new Slide(_slideHolder, "slide_" + no, _xml.img[no], x, no);
slide.addEventListener(Event.COMPLETE, imageLoaded);

[Code]....

When I hover over my sprites, the functions inside Slide.as gets triggered - but they don't pass the event to Main.as as I would have expected.

Strange thing is that the Event.COMPLETE gets triggered inside Main.as.

View 1 Replies

IDE :: Why Does Parent Correct Function Not Working

Sep 19, 2009

In actions in my .fla file I create a new object of a class (addChild) which is in an separate .as file. Now, in my .as file I want to call a function in the .fla file. This should be the parent right? So, I try parent.correct(); which does not work. I get the error #1061 (call to a possibly undefined method). However, when I do this:
var par:* = parent;
par.correct();
Everything works. Why is this?

View 3 Replies

ActionScript 3.0 :: RemoveChild In Parent MovieClip Not Working

Jun 2, 2011

I am trying to remove a movieclip from my main timeline but it is not working. you click a button that is in a movieclip that is dynamically added to the stage and it is supposed to remove a movieclip from the main stage. I added a trace to see if it was grabbing the right movieclip and it is. The error message that I am getting is:

TypeError: Error #1009: Cannot access a property or method of a null object reference.

package MarketingQuestionaire
{
import flash.display.MovieClip;
import flash.display.DisplayObject;

[Code]....

View 3 Replies

Protecting Front End Part Of SWF From Decompilers

May 19, 2009

I know there are softwares which can protect the swf files from decompilers; where the actionscript appears to be gibberish once decompiled. My question is is there any way i can make sure the swf catcher cant find the swf file to download?

View 2 Replies

Professional :: Protecting Files Against Download?

Oct 4, 2011

Right now, if someone types in a popup window comes up asking if they want to download the file.I want my swf files (I'm building a site on the Gaia flash framework) to have access to all of my flv's/videos, but I don't want people to be able to download them.e Flash IDE to 'protect' your swfs (though I know there are ways around that) - but for flv's do those have to go in some type of special folder with a .htaccess file to protect them - and if so, how do I let my swf's communicate with the flv's and load them when necessary.

View 8 Replies

ActionScript 3.0 :: Password Protecting A Swf: Effective Or Not?

Feb 15, 2012

I've created a password variable w/input text on the first frame of a swf to enable private viewing of a swf; so if you dont know the password you cant procedd to frame 2, to see the whole thing.

View 21 Replies

ActionScript 2.0 :: Protecting Variables Using LoadVars?

Feb 9, 2009

I'm experimenting with loading an array of elements into my Flash project using the LoadVars property (I'm using Flash 8 - AS 2) The elements are queried from MySQL using PHP to a page named "elements.php" and loaded into the Flash file. It works fine, but I'd like to be able to protect the "elements.php" page so that the variables queried from this page cannot be viewed by someone who types the absolute path to the elements.php file in the browser address bar [[URL]. Using includes, I'm able to protect other pages in my site from direct assess but these methods don't seem to work when the URL is called from within my SWF file.

My fear is that someone might decompile the swf to reveal the LoadVars URL present in the actionscript. I know there are ways to obfuscate the code, but I'm not sure how well these methods really work. I also understand it is practically impossible to completely hide the code from someone who is REALLY intent on getting it, but I'd like to make it as difficult as possible.

View 3 Replies

ActionScript 2.0 :: Protecting Second Frame Content?

Oct 18, 2011

So the first frame will be password protected if someone know the password he can go to next frame. I want that passwords was in .txt file (so every password have his own .txt file). And if someone type correct password and go to next frame the .txt file of this password will be deleted (so you can use password only once). I want to put this game to my website so the txt files will be in online folder.

View 0 Replies

ActionScript 2.0 :: Protecting SWF From Hotlinking Or Rehosting

Jun 17, 2005

I've made a game in flash that I want to upload onto my site but I don't want it to be able to get hotlinked to or hosted from/on another site.

What would be a good way to prevent this?

I first thought of getting a varible from a text file and using an IF function on load to check if that var was loaded but that would only prevent Hosting.

I then tried putting the var in the html code for the swf but that don't seem to work so well, when I refresh the page the movie randomly seems to play normally or goto my "this is stolen" screen.

View 4 Replies

ActionScript 3.0 :: Child Call To Parent Function Not Working

Jan 12, 2010

I have a main MovieClip that creates a new instance of an imported class which is a page in the application. This class tries to call a function on the main MovieClip and it's not finding it. I've done this in the past without any problems with separate swf files and loaders, and with movieclips in a library. I'm at a loss on how to resolve this. Here's what I'm doing (simplified for posting):

[Code]....

View 5 Replies







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