Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Flex > Flex 2, 3 & 4

Reply
 
Thread Tools Rate Thread Display Modes
Old 10-01-2008, 04:08 PM   #1
markblue777
Registered User
 
Join Date: Jun 2008
Posts: 30
Default Flex 3 and embeding

Hi all,
I have a problem. My problem is in flex 3 and with embeding a swf.
In my swf i have just a simple little pop up window with 5 text fields in it (dynamic and named)

what i want to do is embed it into my application then get access to it so i can get access to the text fields within it so i can change them.

now i can get the movie clip fine (i can add it to the scene and remove it)
however if i try to access a textfield on it i get the error of.

"ReferenceError: Error #1069: Property popUp not found on Main_popUpMenu and there is no default value."

in my swf i have the movie clip named pop.

so in thoery

m_mc.pop.heading.text = "test";

should change the text for the heading text field. However it does not and it just shows the error above. I have spent a couple of hours on this now and still no luck. Does anyone have any thoughts.
Regards
Mark
markblue777 is offline   Reply With Quote
Old 10-01-2008, 06:46 PM   #2
arkum
Senior Member
 
Join Date: Nov 2005
Posts: 321
Default

Maybe...

In your (Flash)PublishSettings/settings untick 'automatically Declare Stage Instances', then in your Document class, create public vars for your Textfields.

Then when you try to access properties of the swf, cast it to your Document class -

if your doc class is called MyLovelyDocClass, you would then access the textfields like so...

MyLovelyDocClass(myEmbededSWF).myTextField1.text = "Whatever"

hth
arkum is offline   Reply With Quote
Old 10-03-2008, 08:14 AM   #3
markblue777
Registered User
 
Join Date: Jun 2008
Posts: 30
Default

Hi arkum,
Thanks for the reply. i got around it by loading it in instead of embedding it i dont no why it never embeded but it is working now .

on another side note when i embed i do [Embed(source = "/../img/Havana.swf")]

So i am therefore goin back a directory and looking in an img folder. obviously i dont want this to happen as i want it to be [Embed(source = "img/Havana.swf")] so it looks in the current directory it is is. But when i do this it just does not find the files to embed (even though the files and folder is there. Any thoughts?
Regards
Mark
markblue777 is offline   Reply With Quote
Old 10-03-2008, 09:21 AM   #4
arkum
Senior Member
 
Join Date: Nov 2005
Posts: 321
Default

What does your folder structure look like - where is your mxml file in relation to the swf you want to embed?
arkum is offline   Reply With Quote
Old 10-03-2008, 09:32 AM   #5
markblue777
Registered User
 
Join Date: Jun 2008
Posts: 30
Default

Hey arkum,
I did not no it was relative to the mxml. i thought it was relative to the where the swf was. i moved it to the location of my mxml and it worked fine.
Cheers
Mark
markblue777 is offline   Reply With Quote
Old 10-03-2008, 09:50 AM   #6
arkum
Senior Member
 
Join Date: Nov 2005
Posts: 321
Default

Nice.
arkum is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Font embeding, using flash AS3 and Flex 3 jocce ActionScript 3.0 25 11-18-2008 09:05 PM
Embeding Fonts and sending them in xml deepika Flex 2, 3 & 4 0 09-05-2008 07:08 PM
Embeding assets pmedina ActionScript 3.0 0 06-09-2008 04:31 PM
communicate Flex to embeding swf Tsjuder ActionScript 3.0 0 12-18-2007 08:31 AM
embeding svgz images melrip Flex 2, 3 & 4 0 02-08-2007 06:31 AM


All times are GMT. The time now is 04:22 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.