Jump to content
Search Community

ExternalInterface

clepal test
Moderator Tag

Recommended Posts

Greetings All,

I've been using the classes for animations for a month now (paid up member) and I must say they are top notch. I am looking for some pointers to extend my project that I am working on.

 

The flash project is basically a empty container when loading up (nothing on the stage) and the user creates text fields via a webform / Javascript - ExternalInterfaces.addcallback methods.

 

All flash and javascript methods for the textfield creation/update/delete are all working great using my own methods.

 

I am looking to speed up the process using the greensock classes doing the same thing for video:

 

Sequence of process is as follows:

1. User selects movie file (flv name) & javascript passes the string into flash (all working)

 

2. The VideoLoader class creates the video and everything is fine.

 

The questions are:

a. Since I only want to have one video on the stage, how can I pass a different file name (update method) to the same instance of the VideoLoader class to load the video at the same index i.e. behind text fields? I can call unload ok, what would be the best why of doing this?

 

b. How can I change the width, height, x & Y elements to a video instance that is on the stage i.e. update do I have to use ContentDisplay? or Transformer Manager? I dont need to tween the elements or do you think this maybe the best option i.e. create an instance of TweenMax.To and then pass the variables to the methods.

 

Any help would be much appreciated.

 

thanks for your help

 

Best regards

 

clepal

Link to comment
Share on other sites

Hi all,

 

Update

I have managed to change the Height and Width values using video.content.fitWidth & fitHeight - (solved)

 

I have also managed to change the X & Y values using TweenMax(video.content, 1, ValueOfX/ValueOfY) - (solved)

 

I am not sure how to change the source of video on the VideoLoader instance? Can this be done?

 

Any help would be much appreciated

 

regards

 

clepal

Link to comment
Share on other sites

I am not sure how to change the source of video on the VideoLoader instance? Can this be done?

Do you mean that you want to change the URL associated with the VideoLoader? If so, sure - just change the "url" property :)

 

In most cases, though, I'd probably just create a new VideoLoader instance for the new URL anyway. Seems cleaner to me.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...