Access the main object of a SWF file in memory
Hey.I'm trying to access the main object of a SWF file in memory. Consider the following code:
package test {}
import flash.display.Sprite;
import flash.utils.ByteArray;
SerializableAttribute public class Main extends Sprite {}
public void Main (): void {}
var b:ByteArray = new ByteArray();
b.writeObject (this); This main object is what I'm trying to access
}
}
}
However, when I do a trace (b.length), the value I get does not match the length of the actual SWF file, then perhaps that there is another way.
I am trying to achieve the same type of content that you would get if you load an external SWF using loadBytes, unless I want to access the principal object of SWF (running in memory) in this way.
I have this even possible?
Thank you.
Hey.
Well, I never knew a solution to it (if it is still possible to what I asked). However, I believe that I've implemented a workaround solution that should be enough for my needs. Perhaps it may help someone else too:
Although I can not (seem to) get the SWF running access itself to memory, I can load another copy of itself. When I tested the copy loaded (in memory) and compared with the content of the file on the disk, using a hex editor, content match!
This allows me to do things like control totals and which do not. An implementation is to use this technique to guard against the 'cache-hacking' of sovereign wealth funds.
Tags: Adobe Animate
Similar Questions
-
call the parent of a loaded swf file functions?
Hi all
I have a main Flash file that load other SWF files using loader objects. I want to be able to call the methods of this main purpose since then in the loaded SWF files. For example, I want the file loaded in order to add an event listener on the stage of the main file. I found this example:
That seems to do what I want, but I can't understand how to implement it in my setup.
My "main" file that loads other sovereign funds is called "main.swf" and has a main document class.
My loaded file is called start.swf and has a class of documents 'Start '.
in my main constructor:
var ethics_content:Loader = new Loader();
ethics_content. Load (new URLRequest ('start.swf'));
in the constructor of my departure:
If (this.parent.parent! = null) {/ / IF the STATEMENT FAILS}
var parentObj:Object = this.parent.parent as an object;
trace ("parentObj has been found.'");
} else {}
trace ("this .parent .parent is null.");
}
stage.addEventListener (MouseEvent.CLICK, handle_click); GENERATES AN ERROR WHEN IT IS LOADED TO THE HAND. SWFtrace ("step: ' + Stadium"); RETURNS A [STAGE] OBJECT BY OPERATING BY ITSELF, BUT NULL WHEN IT IS EXECUTED IN THE HAND. SWF
trace ("root:" + root); RETURNS AN OBJECT [START] WHEN RUN BY ITSELF OR WITHIN THE HAND. SWF
trace ("parent: ' + parent"); RETURNS A [STAGE] OBJECT BY OPERATING BY ITSELF, BUT NOTHING OF IN THE HAND. SWF
trace ("this .parent:" + this.parent); RETURNS OBJECT STAGE ITSELF, NOTHING OF IN THE HAND. SWF
trace ("root.parent:" + root.parent); RETURNS THE SCENE OBJECT BY ITSELFHow to get to the scene of a loaded SWF file? Or at least, how can I call a function in my main class from the loaded file start.swf so I can move the functionality I need the main.swf file?
Any help is greatly appreciated.
If your main swf loader is not added to the display list when it try {branch} is running, the charger will not have a parent.
-
Shorten the length of the blade according to the State of an inserted SWF file
My question may be advanced. I am using Captivate 4 for this project.
I am trying to create a manual online that describes a technical system.
I created multiple SWF files for the various components and inserted them into a master project of Captivate. I use the table of contents in the main project to provide navigation components.
My problem is that the SWF file to show the various components have a visible bar of 'control'. Since it is an event (without audio) we slowed down (some say too slow) for slow readers. But given the control bar allows readers 'faster' the ability to speed upward and etc.
My question, so if a user it accelerates and reaches the end of the file SWF slide continues until the 'period' is over. For example, I have an embedded SWF which is 66 seconds long, the blade must be 66 seconds long to allow it to play fully. I tried to adjust various settings and the settings of the imported video, but no matter what the video should be 66 seconds before I can do anything with the slide that hosts it.
Any ideas? I do not control the imported SWF file (which is actually a published Captivate project) and I do not master the file SWF Captivate "accommodation".
Main reason for which is "broken apart", is can I outsource the various resources so I individual file charges "on-demand" and does not have a massive SWF file.
Before asking, I thought using the Aggregater, but it does not work in Internet Explorer (HTM file) and will not cross the Preloader and my audience does not flash drives as I do.
Hi Ziqiel, hope I will find the solution.
I use the same technique as you Captivate 3. I insert the SWF on a main project. So, I insert a clickable area with options to "Stop the project until user click ' and 'no action '. You place this box anywhere on your slide where the swf file. It shut down the main project, but your swf will continue to play until the user clicks a button to continue.
It is clear to you? And is it useful?
-
access the document object in the framework
access the document object in the framework
------------------------------------------------
Hi, MVP!There are 2 frames, frame1 and frame2, in my web page. I want to access the document using vb frame1 object and the web browser. How can I write codes front right to do?
Thank you
Hi Stanley.K,
Your question of Windows is more complex than what is generally answered in the Microsoft Answers forums, since it relates to coding in Visual Basic Application Script. It should be better in Visual Basic on MSDN Forums.
Please post your question in the MSDN Forums by visiting the following link:
http://social.msdn.Microsoft.com/forums/en-us/vbgeneral/threads
-
original title: I need to know what means this message and I can remove it from my computer
doess someone knows what this message means? Could not load the manifest attribute of the main class of C; \program files\frostwire\commons-logging, pot every time I look at this subject in my file, it appears, I'm not good at all with computers but I know im short-term memory or space on this computer and I tried to go into my programs and delete, can you please help me understand what I can and can not delete to give me more space? Thanks, im running Windows Vista! If you would like more information, I'm sorry, just ask me? Thanks again, I hope someone can help me! :(
This discussion forum on Microsoft Security Essentials antimalware. You can get help in the Microsoft Vista answers forums - http://answers.microsoft.com/en-us/windows/forum/windows_vista
Jim
-
Unable to access the doc object
Hello
I'm unable to access the doc object, as in doc.mailForm ().
I tried to access this object as follows, a field event and a global module:
This.doc (undefined)
App.doc (undefined)
Event.Target.doc (undefined)
doc (blocks JavaScript).
The app object is OK, I can use app.alert ().
I use Designer version 8.2.1, using a dynamic XML form.
Just use event.target which will return the doc object.See the code example belowvar doc = event.target;doc. Print();doc.saveAs ();doc.closeDoc ();Nith
-
I can't delete / unload the example swf files external when the carousel.swf (portfolio) appears and press the button about the content overlaps the carousel (portfolio). How can I delete / unload an external swf file in the main flash file and load a SWF, so that at the same time remove garbage collection memory operation?
This is the error messages I receive: "TypeError: Error #2007: child parameter must be non null.»
at flash.display::DisplayObjectContainer/removeChild()
" to index_fla::MainTimeline/Down3().
Import nl.demonsters.debugger.MonsterDebugger;
var d: MonsterDebugger = new MonsterDebugger (this);
stage.scaleMode = StageScaleMode.NO_SCALE;
internship. Align = StageAlign.TOP_LEFT;
stage.addEventListener (Event.RESIZE, resizeHandler);
is the charger for the portfolio page swf
var loader: Loader;
var loader2:Loader;
var loader3:Loader;
var loader1:Loader;
resize the content
function resizeHandler(event:Event):void {}
resizes the portfolio page to Center
Loader.x = (stage.stageWidth - loader.width) *. 5;
Loader.y = (stage.stageHeight - loader.height) *. 5;
resizes on page to Center
loader3.x = (stage.stageWidth - 482) *.5 - 260;
loader3.y = (stage.stageHeight - 492) *.5 - 140;
* loader2.x = (stage.stageWidth - 658.65) *. 5;
loader2.y = (stage.stageHeight - 551.45) *. 5; * /
}
addEventListener (Event.ENTER_FRAME, onEnterFrame, false, 0, true);
function onEnterFrame(ev:Event):void {}
var requesterb:URLRequest = new URLRequest ("carouselLoader.swf");
Charger = null;
loader = new Loader();
Loader.Name = "carousel1.
Adds gallery.swf in the scene at the beginning of the film
loader.contentLoaderInfo.addEventListener (IOErrorEvent.IO_ERROR, ioError);
function ioError(event:IOErrorEvent):void {}
trace (Event);
}
try {}
Loader.Load (requesterb);
} catch (SecurityError: error) {}
trace (Error);
}
addChild (loader);
Loader.x = (stage.stageWidth - 739) *. 5;
Loader.y = (stage.stageHeight - 500) *. 5;
stopover gallery.swf duplication and more on enter frame
removeEventListener (Event.ENTER_FRAME, onEnterFrame);
}
PORTFOLIO BUTTON
Add eventlistner so that gallery.swf can be loaded
MovieClip (root),.nav.portfolio.addEventListener (MouseEvent.MOUSE_DOWN, down, false, 0, true);
function Down(event:MouseEvent):void {}
Re add listener for contact.swf and about.swf
MovieClip (root).nav.info.addEventListener (MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
MovieClip (root).nav.about.addEventListener (MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
discharge of entry gallery.swf frame if users press portfolio in nav button
var applicant: URLRequest = new URLRequest ("carouselLoader.swf");
Charger = null;
loader = new Loader();
Loader.Name = "carousel."
loader.contentLoaderInfo.addEventListener (IOErrorEvent.IO_ERROR, ioError);
function ioError(event:IOErrorEvent):void {}
trace (Event);
}
try {}
Loader.Load (requester);
} catch (SecurityError: error) {}
trace (Error);
}
addChild (loader);
Loader.x = (stage.stageWidth - 739) *. 5;
Loader.y = (stage.stageHeight - 500) *. 5;
removeChild (getChildByName ("about"));
removeChild (getChildByName ("carousel1"));
delete eventlistner and prevents duplication of the gallery.swf
MovieClip (root).nav.portfolio.removeEventListener (MouseEvent.MOUSE_DOWN, down);
}
INFORMATION BUTTON
Add eventlistner so that info.swf can be loaded
MovieClip (root).nav.info.addEventListener (MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
function Down1(event:MouseEvent):void {}
This adds the EventListener for portfolio so that the end user can re-post if they wish.
MovieClip (root),.nav.portfolio.addEventListener (MouseEvent.MOUSE_DOWN, down, false, 0, true);
MovieClip (root).nav.about.addEventListener (MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
var applicant: URLRequest = new URLRequest ("contactLoader.swf");
loader2 = null;
loader2 = new Loader();
loader2. Name = "contact".
loader2.contentLoaderInfo.addEventListener (IOErrorEvent.IO_ERROR, ioError);
function ioError(event:IOErrorEvent):void {}
trace (Event);
}
try {}
loader2. Load (requester);
} catch (SecurityError: error) {}
trace (Error);
}
addChild (loader2);
loader2.x = (stage.stageWidth - 658.65) *. 5;
loader2.y = (stage.stageHeight - 551.45) *. 5;
delete eventlistner and prevents duplication of the info.swf
MovieClip (root).nav.info.removeEventListener (MouseEvent.MOUSE_DOWN, Down1);
}
ON THE BUTTON
Add eventlistner so that info.swf can be loaded
MovieClip (root).nav.about.addEventListener (MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
function Down3(event:MouseEvent):void {}
This adds the EventListener for portfolio so that the end user can re-post if they wish.
MovieClip (root),.nav.portfolio.addEventListener (MouseEvent.MOUSE_DOWN, down, false, 0, true);
MovieClip (root).nav.info.addEventListener (MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
var applicant: URLRequest = new URLRequest ("aboutLoader.swf");
loader3 = null;
loader3 = new Loader();
loader3. Name = "a connection"
loader3.contentLoaderInfo.addEventListener (IOErrorEvent.IO_ERROR, ioError);
function ioError(event:IOErrorEvent):void {}
trace (Event);
}
try {}
loader3. Load (requester);
} catch (SecurityError: error) {}
trace (Error);
}
addChild (loader3);
loader3.x = (stage.stageWidth - 482) *.5 - 260;
loader3.y = (stage.stageHeight - 492) *.5 - 140;
removeChild (getChildByName ("carousel"));
removeChild (getChildByName ("carousel1"));
delete eventlistner and prevents duplication of the info.swf
MovieClip (root).nav.about.removeEventListener (MouseEvent.MOUSE_DOWN, Down3);
}
Stop();
You call unload() on objects that you cancelled - where the error.
You should do something like:
{if (loader2)}
loader2. Unload();
}
As for the null value passed into the function - null is a default value. In this way, you can call the low past nothing:
Down()
Or you can use it as a handler in which case it will be called by the Auditor:
Down (mouseEventInstnace);
-
How to access the main .mxml file component control?
I have a .mxml main while in which I imported custom "popUpWindow" component using the statement "import components.popUpWindow". In main .mxml file, I show more later this component in the form of pop-up window using the Popup Manager class:
var popUpWin:IFlexDisplayObject;
popUpWin = PopUpManager.createPopUp (Thi, popUpWindow, true);
Once the component is displayed, how can I access using the actionscript component TextInput control (specifically the .text property) my main .mxml file?
Thank youbdeen I think you have it bad: P I think he wants to access a property in the main application window.
Give the textInput id and then on your main application you can do this for example:
var test: String = popUpWin.textInputName.text;
Please note that it is recommended to do a casting for the popup window:
popUpWin = popUpWindow (PopUpManager.createPopUp (Thi, popUpWindow, true)); -
Separating the main.qml in .qml different files, is more pushed page
Hi all
My main.qml became very long (NavigationPane with a Page with a container with a label and ListView and a certain objects attached) and I started to break up. Before that, when I chose a line in the list, it pushed successfully to the details of the page. However, when I copy and pasted all within the Page to another qml file that I put in main.qml as object, it is more pushed the detail of the page. I can't for the life of understand me. I saw / experienced with numerous examples of applications where he worked (Battambang in particular), but cannot see a difference between my folders and those.
Here are the files, dismembered. When the PillListPage.qml content is copied in main.qml, everything works fine.
//main.qml// Grid view with detail project template import bb.cascades 1.0 //import bb.platform 1.0 import bb.system 1.0 import "stringConcatenation.js" as StringConcatenation NavigationPane { id: navigationPane //contains time label and grid list view firstPage: PillListPage { } onCreationCompleted: { // this slot is called when declarative scene is created // write post creation initialization here console.log("NavigationPane - onCreationCompleted()") // enable layout to adapt to the device rotation // don't forget to enable screen rotation in bar-bescriptor.xml (Application->Orientation->Auto-orient) OrientationSupport.supportedDisplayOrientation = SupportedDisplayOrientation.All; } onPopTransitionEnded: { // Transition is done destroy the Page to free up memory page.destroy() } }
//PillListPage.qmlimport bb.cascades 1.0 Page { id: pgMain content: Container { id: rootContainer verticalAlignment: VerticalAlignment.Center horizontalAlignment: HorizontalAlignment.Center Label { id: timeLabel text: { var currentTime = Qt.formatDateTime(new Date(), "h:mm AP"); return currentTime; } } //Label //PillListView ListView { id: listView // set object name to let listView be discoverable from C++ objectName: "listView" layout: GridListLayout { verticalCellSpacing: 100 cellAspectRatio: 4.0 columnCount: 1 horizontalCellSpacing: 10.0 } listItemComponents: [ // define component which will represent list item GUI appearence ListItemComponent { type: "item" // list item GUI appearence component is defined in external MyListItem.qml file MyListItem { } } ] onTriggered: { // When an item is selected we push the detail Page in the chosenItem file attribute. var chosenItem = dataModel.data(indexPath); // Create the content page and push it on top to drill down to it. var contentpage = pillDetailPageDefinition.createObject(); // Set the content properties to reflect the selected image. contentpage.contentImageURL = chosenItem.thumbnail contentpage.contentName = chosenItem.name + ", " + chosenItem.mass // Push the content page to the navigation stack navigationPane.push(contentpage); } layoutProperties: StackLayoutProperties { spaceQuota: 1.0 } focusPolicy: FocusPolicy.Default } //end of pill list } //end root Container // Attached objects of the Main Content Page attachedObjects: [ ComponentDefinition { id: pillDetailPageDefinition source: "PillDetailPage.qml" } //ComponentDefinition ] }
Some superfluous code (user interface format stuff) has been removed. I did essentially the same thing with the grid list Basic project template. Help, please! My only guess is that perhaps he does not know which is the data model, once he is out of main.qml. Is there something in c ++ I have to do or something I should even in the QML?
There is no runtime error and the app loaded successfully, with the only problem being that when I click on a list item, there is no response/transition to the details page.
However, I found a solution of mine. I pushed my detail view using a function that is called in the onTriggered signal in the list. Copy the following code is a basic example of what I mean I did simply by separating the code of the project template "grid with details view:
//main.qml // Grid view with detail project template import bb.cascades 1.0 NavigationPane { id: navigationPane firstPage: MainPageContent {} attachedObjects: [ ComponentDefinition { id: secondPageDefinition source: "DetailPage.qml" } ] function setDetailItem(item) { // show detail page var page = secondPageDefinition.createObject(); page.text = item.text page.image = item.image navigationPane.push(page) } onCreationCompleted: { // this slot is called when declarative scene is created // write post creation initialization here console.log("NavigationPane - onCreationCompleted()") // enable layout to adapt to the device rotation // don't forget to enable screen rotation in bar-bescriptor.xml (Application->Orientation->Auto-orient) OrientationSupport.supportedDisplayOrientation = SupportedDisplayOrientation.All; } }
//MainPageContent.qml import bb.cascades 1.0 Page { id: pgMain content: Container { ListView { id: listView // set object name to let listView to be discoverable from C++ objectName: "listView" layout: GridListLayout { } listItemComponents: [ // define component which will represent list item GUI appearence ListItemComponent { type: "item" // list item GUI appearence component is defined in external MyListItem.qml file MyListItem { } } ] onTriggered: { console.log("selected_index: " + indexPath) var curr_item = dataModel.data(indexPath) // show detail page for selected item setDetailItem(curr_item) } horizontalAlignment: HorizontalAlignment.Fill layoutProperties: StackLayoutProperties { spaceQuota: 1.0 } } } }
Since I saw your response until after that I had changed my code, I can't test, but it can work. Thanks for the help!
-
Access denied when you try to access the folder CSC (location of offline files)
Original title: instead of playing the files offline.
I have installation folder for a user on the windows machine offline sync with an external drive of SAN. I noticed that the files do not synchronize with the SAN drive, so I changed the location to another drive of SAN. I disconnect old SAN offline synchronization and redirect the folder to the new SAN disk. I realized that he is a lot of files don't not sync from the old drive to SAN. but he was already disconnected. How can I find these files. I couldn't access the CSC folder in windows. Access denied even though I have the administrator rights on the machine.
Help, please.
This is the location of the file for files Offin on Windows 7. C:\windows\CSC
Make sure you have full rights to the folder to access the files. If this isn't the case, follow the steps in http://technet.microsoft.com/en-us/library/cc753659.aspx to take possession of the file and the content it contains.
I would also advise to go through http://answers.microsoft.com/en-us/windows/forum/windows_7-files/offline-files-access-is-denied/b1adc231-a4c2-4a5b-80b8-93269851febf for a possible solution.
Let us know if that helps.
-
Publish the sensitive project as a swf file
Anyone know if it is possible to publish a swf file (created in Captivate 8) reactive project?
We found that when published in html5, it is not compatible with all browsers. We want to offer a flash and html5 version but I can't find this option to publish.
Hello
I think you will discover the path you need to take is carefully create a new project that's not reactive, then copy and paste the sensitive to the inadmissible project assets. Then, you create a SWF from that.
Note that if you publish a project inadmissible that you choose to publish in the form of people both SWF and HTML5 and point to the page htm multiscreen. This page should detect the browser and direct people to the SWF version if they are able to use the SWF and for the HTML5 version if they are not capable.
See you soon... Rick
-
Captivate 7 - where can I find the settings of publication for swf files?
In fact, we created a tool for creating swf files that our company publishes files Captivate and Adobe Connect. With our last update to Captivate 7 we can now successfully publish on YouTube (finally) but now the swf file settings have dissappeaered - we need for our customer publications.
1. How can we publish Captivate 7 records in swf?
2. If they have been taken-someone ' a has a routine to workaround?
Thank you so much - we have searched high and low to find answers.
Peter
You can deploy MP4, from a file-cpvc also internally, but this is pure video, non-interactive.
The classic way to create a simulation with Captivate uses automatic Capture (file cptx), where you have the choice between the demonstration, Simulation and training simulation assessment (with an increase of degree of interactivity). And these files can be published to SWF/HTML (interactive) PDF format...
-
To access the display object on the stage of another class
I Googled that nothing helps, I only found how to manipulate the scene itself and not a display on that object and I'm noob enough to not be able to figure it out from there. :/
I have a clip on the main timeline with the instance name displayName. I created a button that should change this framework displayName will to (in order to... makes you guess? display the name of the button.) Awesome. )
So, I'm trying to write the code in a reusable manner and have everything related to a class called GeoPuzzle buttons. Inside the GeoPuzzle I instantiate a touch event and run code. However, the function should be able to change displayName in the main part of the timeline and, of course, the compiler says displayName does not exist because I'm in a class and I don't mean the scene.
Here's the code simplified in the class:
package com.freerangeeggheads.puzzleography {}
import flash.display.MovieClip;
import flash.events.TouchEvent;
SerializableAttribute public class extends MovieClip {} GeoPuzzle
declaring variables
public void setInitial (abbrev:String, fullName:String, isLocked:Boolean): void {}
Set the parameters
this.addEventListener (TouchEvent.TOUCH_BEGIN, geoTouchBeginHandler);
}
public void GeoPuzzle (): void {}
}
public void geoTouchBeginHandler (e:TouchEvent): void {}
e.target.addEventListener (TouchEvent.TOUCH_END, geoTouchEndHandler);
other methods
nameDisplay.gotoAndStop (e.target.abbrev);
}
public void geoTouchEndHandler (e:TouchEvent): void {}
other methods
nameDisplay.gotoAndStop ("USA");
}
}
}The lines in bold are my problem. Now this code does not actually as it is the case if you find an error in it, Yes, I have no idea what the problem is, but he DID run forward and these lines always gave me wrong so I'll try to help out on multiple fronts.
How can I say displayName to change its current image within the display object class?
Thank you!
any display list object can refer to any display list object, but this is not necessarily good OOP.
in any case, for your class reference displayName:
. DisplayName MovieClip (this.parent)
-
Can I get rid of the white box behind my swf file?
I would like for the space behind my swf animation does not appear as a white box while the browser loads the swf file, but rather to show what is on the page behind the loading file.
I think that someone had once told me what to do to prevent this, but I can't find that info now.
In your Flash publish together transparent window mode settings.
-
don't play only in the preview of captivate project SWF files
I tried to import a file .swf product of Camtasia 6.0 in a captivate project 3.0, after doing so when I'm in any .cp with files .swf in them and I try to get an overview of the project files .swf will not play. All the files published .exe will play, as do the .swf files displayed individually simply not to Captivate. Any ideas?I found the answer - I had upgraded to Flash 10 and it is not compatible with Captivate 3. I uninstalled Flash 10 and installed Flash 9 and now I can listen to extracts projects which have files .swf in them.
Maybe you are looking for
-
HEy everybody I would like to ask how can I cancel a void cause Go I don't want no more
-
I have a 8570W with ordiginal of ram 4 GB 1.5V. I've just updated my 8570w with more than 4 GB (4 GB 1.35v micron technology). Now laptop may still works fine, but I wonder to work for a long time (to come): is there a risk to my systerm when I use 2
-
Try to load Halo 2 for Vista and get a message that the game could not initialize and that maybe it's because another application of windows live gaming (such as halo 2 dedicated server can run on the same machine). If it's that I did not here. any i
-
Recurring pop up with the Connection Wizard Internet asking me to create a new internet account. But I don't need a coz we are on broadband. How do you stop it. Run Windows XP and office small business
-
Cyber-Security will not go away. have tried to uninstall, does not!